diff --git a/grade/penalty/duedate/settings.php b/grade/penalty/duedate/settings.php index 76d0e4ae354..613e0e96175 100644 --- a/grade/penalty/duedate/settings.php +++ b/grade/penalty/duedate/settings.php @@ -26,9 +26,12 @@ use core\url; defined('MOODLE_INTERNAL') || die(); -if ($hassiteconfig) { - // New category for the plugin. - $ADMIN->add('gradepenalty', new admin_category('gradepenalty_duedate', new lang_string('pluginname', 'gradepenalty_duedate'))); +// New category for the plugin. +$ADMIN->add('gradepenalty', new admin_category('gradepenalty_duedate', new lang_string('pluginname', 'gradepenalty_duedate'))); + +$capabilities = ['gradepenalty/duedate:manage']; + +if ($hassiteconfig || has_any_capability($capabilities, core\context\system::instance())) { // External page to manage the duedate rules. $temp = new admin_externalpage( diff --git a/grade/penalty/duedate/templates/edit_penalty_rule_action_bar.mustache b/grade/penalty/duedate/templates/edit_penalty_rule_action_bar.mustache index 3da94392b4e..8e6b9f73915 100644 --- a/grade/penalty/duedate/templates/edit_penalty_rule_action_bar.mustache +++ b/grade/penalty/duedate/templates/edit_penalty_rule_action_bar.mustache @@ -43,13 +43,13 @@ {{{title}}} -