MDL-39743 assign: Fix missing capability check for "grant extension"

This commit is contained in:
Ashley Holman
2013-05-29 12:04:22 +08:00
committed by Damyon Wiese
parent 8daf98a10f
commit e9efc2baa2
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ class mod_assign_grading_batch_operations_form extends moodleform {
if ($instance['submissiondrafts']) {
$options['reverttodraft'] = get_string('reverttodraft', 'assign');
}
if ($instance['duedate']) {
if ($instance['duedate'] && has_capability('mod/assign:grantextension', $instance['context'])) {
$options['grantextension'] = get_string('grantextension', 'assign');
}
if ($instance['attemptreopenmethod'] == ASSIGN_ATTEMPT_REOPEN_METHOD_MANUAL) {