-
Bug
-
Resolution: Duplicate
-
Blocker
-
None
-
2.5.1
-
None
2.5 includes options on assignments to select all submissions (via the 'Select' column in the Submissions table) and "With selected...Lock All Submissions" at the bottom of the submissions page. Additionally one has the option (via the 'Edit' column action menu in the Submissions table) to and "Prevent Submission Changes" for an individual user (as opposed to locking them all).
The expected outcome is that the ability of the users selected to submit the assignment would be "locked" and unavailable for further updates or subsequent submissions.
Any attempt to "prevent Submission Changes" or to "lock" users' submissions yields the following error:
"Coding error detected, it must be fixed by a programmer: PHP catchable fatal error"
We've tested with no submissions, some submissions, all all submissions. Seems related to https://tracker.moodle.org/browse/MDL-35389 but that issue involves no submissions specifically. I'd surmise that, since these options are affected by the assignment setting "Require students to click the submit button" – that might also be involved tangentially, but can find nothing at .org or tracker to confirm that.
Anyway, teachers want to use that option since it's available. I'd note that other items in the "Edit" action menu on the Submissions screen work, such as "Grant extension" and "Update Grade."
On an (nonproduction) instance with debugging enabled, the following messages are output on an attempt to lock submissions:
Debug info: Argument 1 passed to assign_submission_plugin::lock() must be an instance of stdClass, boolean given, called in [dirroot]/mod/assign/locallib.php on line 5315 and defined
Error code: codingerror
Stack trace:
line 406 of /lib/setuplib.php: coding_exception thrown
line 94 of /mod/assign/submissionplugin.php: call to default_error_handler()
line 5315 of /mod/assign/locallib.php: call to assign_submission_plugin >lock()
line 3188 of /mod/assign/locallib.php: call to assign->process_lock()
line 399 of /mod/assign/locallib.php: call to assign->process_grading_batch_operation()
line 53 of /mod/assign/view.php: call to assign->view()
Steps to reproduce the error:
1) In a course with enrolled (enroled) users, turn on editing, create an assignment, turn off editing.
2) Click the assignment, then click the "View/grade all submissions" link.
3) Check one or more enrolled users' selection checkbox to the left (or check the select box at the top, for all)
4) Using the "With selected..." dropdown, select Lock submissions then "Go"