MDL-49688 navigation: Update to overview report and my index.
authorAdrian Greeve <adrian@moodle.com>
Fri, 27 Mar 2015 08:16:58 +0000 (16:16 +0800)
committerAdrian Greeve <adrian@moodle.com>
Fri, 10 Apr 2015 09:17:32 +0000 (17:17 +0800)
Part of MDL-45774.

grade/report/overview/lib.php
my/index.php

index 1f0614f..0c9dc3a 100644 (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) {
index d212b98..ce73fd3 100644 (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()) {