From ea118bed0c289b6e39592133d8d3e0e56abff0b9 Mon Sep 17 00:00:00 2001 From: David Mudrak Date: Thu, 3 Mar 2011 15:35:50 +0100 Subject: [PATCH] MDL-20562 Do not use a capability name as a navigation node title Ideally all reports should use their pluginname in the navigation tree. In this particular case, the patch fixes two issues: using the capability name as the report title in the navigation and incorrect pluginname defined for coursereport_log. --- course/report/log/lang/en/coursereport_log.php | 2 +- course/report/log/lib.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/course/report/log/lang/en/coursereport_log.php b/course/report/log/lang/en/coursereport_log.php index 3113eea5502..dc374083dd8 100644 --- a/course/report/log/lang/en/coursereport_log.php +++ b/course/report/log/lang/en/coursereport_log.php @@ -27,4 +27,4 @@ $string['loglive'] = 'Live logs'; $string['log:view'] = 'View course logs'; $string['log:viewlive'] = 'View live logs'; $string['log:viewtoday'] = 'View today\'s logs'; -$string['pluginname'] = 'Live logs'; +$string['pluginname'] = 'Logs'; diff --git a/course/report/log/lib.php b/course/report/log/lib.php index e12de536482..96cbdc70c9a 100644 --- a/course/report/log/lib.php +++ b/course/report/log/lib.php @@ -534,6 +534,6 @@ function log_report_extend_navigation($navigation, $course, $context) { global $CFG, $OUTPUT; if (has_capability('coursereport/log:view', $context)) { $url = new moodle_url('/course/report/log/index.php', array('id'=>$course->id)); - $navigation->add(get_string('log:view', 'coursereport_log'), $url, navigation_node::TYPE_SETTING, null, null, new pix_icon('i/report', '')); + $navigation->add(get_string('pluginname', 'coursereport_log'), $url, navigation_node::TYPE_SETTING, null, null, new pix_icon('i/report', '')); } }