MDL-65956 mod_assign: Add proper capability checks and error handling

This commit is contained in:
Mihail Geshoski
2019-11-25 10:49:21 +08:00
parent a5f618d6a9
commit 8dc45b37b7
3 changed files with 35 additions and 3 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ class mod_assign_grading_batch_operations_form extends moodleform {
if ($instance['submissiondrafts']) {
$options['reverttodraft'] = get_string('reverttodraft', 'assign');
}
if (has_capability('mod/assign:grade', $instance['context'])) {
if (has_capability('mod/assign:editothersubmission', $instance['context'])) {
$options['removesubmission'] = get_string('removesubmission', 'assign');
}
if ($instance['duedate'] && has_capability('mod/assign:grantextension', $instance['context'])) {