Merge branch 'MDL-47759-master' of git://github.com/ankitagarwal/moodle

This commit is contained in:
Marina Glancy 2014-10-23 16:35:59 +08:00 committed by Eloy Lafuente (stronk7)
commit 13c9e9c043
2 changed files with 3 additions and 2 deletions

View File

@ -154,7 +154,7 @@ class renderable extends \table_sql implements \renderable {
$manage = '';
// We don't need to check for capability at course level since, user is never shown this page,
// if he doesn't have the capability.
if ($this->hassystemcap || ($rule->courseid !== 0)) {
if ($this->hassystemcap || ($rule->courseid != 0)) {
// There might be site rules which the user can not manage.
$editurl = new \moodle_url($CFG->wwwroot. '/admin/tool/monitor/edit.php', array('ruleid' => $rule->id,
'courseid' => $rule->courseid, 'sesskey' => sesskey()));
@ -175,7 +175,7 @@ class renderable extends \table_sql implements \renderable {
$icon = $OUTPUT->action_link($deleteurl, new \pix_icon('t/delete', get_string('deleterule', 'tool_monitor')), $action);
$manage .= $icon;
} else {
$manage = '-';
$manage = get_string('nopermission', 'tool_monitor');
}
return $manage;
}

View File

@ -67,6 +67,7 @@ $string['messagetemplate_help'] = 'This is the content of the message that will
$string['minutes'] = 'in minutes:';
$string['name'] = 'Name of the rule: ';
$string['name_help'] = "Choose a name for the rule.";
$string['nopermission'] = "No permission";
$string['pluginname'] = 'Event monitor';
$string['processevents'] = 'Process events';
$string['ruleareyousure'] = 'Are you sure you want to delete rule "{$a}"?';