MDL-49412 navigation: Remove redundant reports node
authorAnkit Agarwal <ankit@moodle.com>
Tue, 31 Mar 2015 05:22:26 +0000 (10:52 +0530)
committerAdrian Greeve <adrian@moodle.com>
Fri, 10 Apr 2015 09:18:22 +0000 (17:18 +0800)
Part of MDL-45774.

lib/navigationlib.php

index 2e18723..4771a1d 100644 (file)
@@ -4492,16 +4492,6 @@ class settings_navigation extends navigation_node {
             }
         }
 
-        // Add reports node.
-        $reporttab = $usersetting->add(get_string('activityreports'));
-        $reports = get_plugin_list_with_function('report', 'extend_navigation_user', 'lib.php');
-        foreach ($reports as $reportfunction) {
-            $reportfunction($reporttab, $user, $course);
-        }
-
-        // Check the number of nodes in the report node... if there are none remove the node.
-        $reporttab->trim_if_empty();
-
         // Login as ...
         if (!$user->deleted and !$currentuser && !\core\session\manager::is_loggedinas() &&
                 has_capability('moodle/user:loginas', $coursecontext) && !is_siteadmin($user->id)) {