$classname = $pages[$section]['class']; $PAGE = new $classname(); } else { include elispm::file('dashboardpage.class.php'); $PAGE = new dashboardpage(); } $PAGE->requires->css('/local/elisprogram/icons.css'); // ELIS-3042 if (empty($PAGE->nologin) && !isloggedin()) { redirect($CFG->wwwroot); } //calculate the path of curriculum entities corresponding to the most recent click $currentitypath = optional_param('currentitypath', '', PARAM_TEXT); if (!empty($currentitypath)) { //parameter is set directly, so use it $USER->currentitypath = $currentitypath; } else { //determine whether to unset the parameter based on comparing the current //page type with the last entity set $effective_entity_type = $PAGE->get_page_context(); if (isset($USER->currentitypath)) { $parts = explode('/', $USER->currentitypath); $final_part = $parts[count($parts) - 1]; $parts = explode('-', $final_part); if ($parts[0] != $effective_entity_type) { unset($USER->currentitypath); } } } $PAGE->run();