. /** * Contains functions called by core. * * @package block_myoverview * @copyright 2017 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); /** * The timeline view. */ define('BLOCK_MYOVERVIEW_TIMELINE_VIEW', 'timeline'); /** * The courses view. */ define('BLOCK_MYOVERVIEW_COURSES_VIEW', 'courses'); /** * Returns the name of the user preferences as well as the details this plugin uses. * * @return array */ function block_myoverview_user_preferences() { $preferences = array(); $preferences['block_myoverview_last_tab'] = array( 'type' => PARAM_ALPHA, 'null' => NULL_NOT_ALLOWED, 'default' => BLOCK_MYOVERVIEW_TIMELINE_VIEW, 'choices' => array(BLOCK_MYOVERVIEW_TIMELINE_VIEW, BLOCK_MYOVERVIEW_COURSES_VIEW) ); return $preferences; }