-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
3.7.2
-
None
-
MOODLE_37_STABLE
Hi,
There are two places where a submission can be deleted when displaying the table of submissions.
- Item in the edit dropdown in the table
- Item in the select box for batch operations
If I'm not wrong, the capability checked to display these options is not the same (in the table it's "assign:editothersubmission", in the select box it's "assign:grade".
Since "assign:editothersubmission" is not defined by default, teachers do not see this option in the table but see it in the dropdown. The problem is that when confirming batch delete, the capability checked is "assign:editothersubmission", thus leading to a "nopermission" error. See the stack trace below.
Debug info:
Error code: nopermission
$a contents:
Stack trace:
- line 494 of /lib/setuplib.php: moodle_exception thrown
- line 7885 of /mod/assign/locallib.php: call to print_error()
- line 7970 of /mod/assign/locallib.php: call to assign->remove_submission()
- line 4893 of /mod/assign/locallib.php: call to assign->process_remove_submission()
- line 530 of /mod/assign/locallib.php: call to assign->process_grading_batch_operation()
- line 55 of /mod/assign/view.php: call to assign->view()
Again if I am not wrong, simply changing the capability check at line 53 in gradingbatchoperationsform.php solved the issue.
Regards