Updated code to restrict list of users. Also includes changes to
ensure that a cm_info object is available (required for availability
checks).
There is a tweak to upgradelib to reflect the different fields used.
(Note that upgradelib is not used during upgrade, but only when
converting assignments from the old assignment module.)
MDL-45965 assign: add notification capability
Adds a new capability that adds flexibility to what users receive grader
submission messages. Includes phpunit tests. Function is based off of
get_graders() but is separate because it is bad form to have a
capability that is dependent on another capabilities setting.
When different ID's are set for each sequence a number
of unit test failures appear. They have been corrected
to allow unit tests to pass with the new generator in place.
Having a I click on we can use all our selectors rather
than having multiple steps for the same purpose. This
step allow us to manage JS native dialogues without
having to fail a scenario.
Credit for Mohamed Alsharaf.
The behat script is to test the batch action to lock and unlock submissions.
The new definitions are to prevent the "unexpected alert open" error in Selenium.
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.
It may fail in fast systems as the JS animation
to remove the delete comment may be slower than
the following steps where we check that the element
is not there anymore.
Also performed the following -
1) Deprecated the assignment's add_to_log function (part of it's functionality exists in the base class to set the legacy log data).
2) Edited existing events to use the new base class.
3) Renamed event_test.php to events_test.php to match the rest of core.
4) Moved the event tests from locallib_test.php to events_test.php.
5) When setting legacy data use lang_string, rather than get_string, as we may not be using them if legacy log is disabled.
- In an assignment with file submissions enabled,
students can upload a set number of files.
- In assignments with file uploading enabled
the Student can use File Picker to upload files.