MDL-49324 grade: Ensure report appears in breadcrumbs
authorAndrew Nicols <andrew@nicols.co.uk>
Mon, 1 Feb 2016 05:23:41 +0000 (13:23 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Wed, 24 Feb 2016 06:39:11 +0000 (14:39 +0800)
grade/lib.php

index 52c296d..66cf003 100644 (file)
@@ -1002,6 +1002,11 @@ function print_grade_page_head($courseid, $active_type, $active_plugin=null,
         grade_extend_settings($plugin_info, $courseid);
     }
 
+    // Set the current report as active in the breadcrumbs.
+    if ($active_plugin !== null && $reportnav = $PAGE->settingsnav->find($active_plugin, navigation_node::TYPE_SETTING)) {
+        $reportnav->make_active();
+    }
+
     $returnval = $OUTPUT->header();
 
     if (!$return) {