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.
This commit is contained in:
David Mudrak 2011-03-03 15:35:50 +01:00
parent 48fe5c6cf9
commit ea118bed0c
2 changed files with 2 additions and 2 deletions

View File

@ -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';

View File

@ -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', ''));
}
}