MDL-65956 mod_assign: Add proper capability checks and error handling
This commit is contained in:
@@ -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'])) {
|
||||
|
||||
Reference in New Issue
Block a user