MDL-49688 navigation: Update to overview report and my index.

Part of MDL-45774.
This commit is contained in:
Adrian Greeve 2015-03-27 16:16:58 +08:00
parent f45c9b6976
commit 0ef6c85115
2 changed files with 6 additions and 5 deletions

View File

@ -311,7 +311,7 @@ class grade_report_overview extends grade_report {
/**
* Processes the data sent by the form (grades and feedbacks).
* @var array $data
* @param array $data
* @return bool Success or Failure (array of errors).
*/
function process_data($data) {

View File

@ -88,13 +88,14 @@ if (!isguestuser()) { // Skip default home page for guests
if (optional_param('setdefaulthome', false, PARAM_BOOL)) {
set_user_preference('user_home_page_preference', HOMEPAGE_MY);
} else if (!empty($CFG->defaulthomepage) && $CFG->defaulthomepage == HOMEPAGE_USER) {
$PAGE->settingsnav->find('usercurrentsettings', null)->add(get_string('makethismyhome'),
new moodle_url('/my/', array('setdefaulthome'=>true)), navigation_node::TYPE_SETTING);
$PAGE->settingsnav->find('usercurrentsettings', null)->add(get_string('makethismyhome'),
new moodle_url('/my/', array('setdefaulthome' => true)), navigation_node::TYPE_SETTING);
}
} else {
$mycoursenode = $PAGE->navigation->get('mycourses')->make_inactive();
}
}
$mycoursenode = $PAGE->navigation->get('mycourses');
$mycoursenode->collapse = true;
$mycoursenode->make_inactive();
// Toggle the editing state and switches
if ($PAGE->user_allowed_editing()) {