Skip to content

Commit

Permalink
MDL-20562 Do not use a capability name as a navigation node title
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mudrd8mz committed Mar 4, 2011
1 parent 48fe5c6 commit ea118be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion course/report/log/lang/en/coursereport_log.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@
$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';
2 changes: 1 addition & 1 deletion course/report/log/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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', ''));
}
}

0 comments on commit ea118be

Please sign in to comment.