forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-45296 tests: ensure all submissions exist
The changes performed with the change from create_from_user() to create_from_submission() in practice enforce a new restriction about submissions having to exist in order to fire their lock/unlock events. This did not exist before the change and, also, it seems that the assign api itself, submission->lock() ... also accepts non existing submissions. So I was not 100% sure about how to fix these events: 1) enforcing submission to exist. 2) firing them only if the submission exist. I've gone with 1) for now, making tests to pass. But will raise the question in the Tracker, just in case we have to move to the 2) approach for any reason.
- Loading branch information
Showing
2 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters