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
commit d3312bb6ac
2 changed files with 3 additions and 2 deletions

View file

@ -154,7 +154,7 @@ class renderable extends \table_sql implements \renderable {
$manage = ''; $manage = '';
// We don't need to check for capability at course level since, user is never shown this page, // 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 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. // 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, $editurl = new \moodle_url($CFG->wwwroot. '/admin/tool/monitor/edit.php', array('ruleid' => $rule->id,
'courseid' => $rule->courseid, 'sesskey' => sesskey())); '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); $icon = $OUTPUT->action_link($deleteurl, new \pix_icon('t/delete', get_string('deleterule', 'tool_monitor')), $action);
$manage .= $icon; $manage .= $icon;
} else { } else {
$manage = '-'; $manage = get_string('nopermission', 'tool_monitor');
} }
return $manage; 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['minutes'] = 'in minutes:';
$string['name'] = 'Name of the rule: '; $string['name'] = 'Name of the rule: ';
$string['name_help'] = "Choose a name for the rule."; $string['name_help'] = "Choose a name for the rule.";
$string['nopermission'] = "No permission";
$string['pluginname'] = 'Event monitor'; $string['pluginname'] = 'Event monitor';
$string['processevents'] = 'Process events'; $string['processevents'] = 'Process events';
$string['ruleareyousure'] = 'Are you sure you want to delete rule "{$a}"?'; $string['ruleareyousure'] = 'Are you sure you want to delete rule "{$a}"?';