From fd0768c0e71a00f55d4ba9c60ce94374a41b2909 Mon Sep 17 00:00:00 2001 From: Dan Poltawski Date: Mon, 8 Apr 2013 12:23:52 +0800 Subject: [PATCH] MDL-39015 navigation: remove course reports from navigation Regression from the commit in 278065528aed2e6d712292b09ecdedf3d5b26bfe --- lib/navigationlib.php | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/lib/navigationlib.php b/lib/navigationlib.php index 61331f0816f..2322628efaa 100644 --- a/lib/navigationlib.php +++ b/lib/navigationlib.php @@ -2438,27 +2438,6 @@ class global_navigation extends navigation_node { $participants = $coursenode->add(get_string('participants'), null, self::TYPE_CONTAINER, get_string('participants'), 'participants'); } - // View course reports - if (has_capability('moodle/site:viewreports', $this->page->context)) { // basic capability for listing of reports - $reportnav = $coursenode->add(get_string('reports'), null, self::TYPE_CONTAINER, null, null, new pix_icon('i/stats', '')); - $coursereports = get_plugin_list('coursereport'); // deprecated - foreach ($coursereports as $report=>$dir) { - $libfile = $CFG->dirroot.'/course/report/'.$report.'/lib.php'; - if (file_exists($libfile)) { - require_once($libfile); - $reportfunction = $report.'_report_extend_navigation'; - if (function_exists($report.'_report_extend_navigation')) { - $reportfunction($reportnav, $course, $this->page->context); - } - } - } - - $reports = get_plugin_list_with_function('report', 'extend_navigation_course', 'lib.php'); - foreach ($reports as $reportfunction) { - $reportfunction($reportnav, $course, $this->page->context); - } - } - // Badges. if ($CFG->enablebadges && has_capability('moodle/badges:viewbadges', $this->page->context)) { $url = new moodle_url($CFG->wwwroot . '/badges/view.php',