This is a basic implementation of the actual content generation in the workshop
generator. Note the we do not generate actual grading form data (which is what
the grading strategy plugins would do), just their results.
This is built upon original work by Michael Hughes. We now have separate
settings for deleting workshop submissions, assessments and for resetting the
workshop phase.
The methods workshop::delete_submission() and workshop::delete_assessment() did
not delete files (embedded and attachments) associated with the given
submission or assessment. This is fixed now.
Additionally, the delete_assessment() method now cleans-up records from the
table workshop_grades, too. This internal workshop API still does not give
workshop subplugins a chance to clean up their data, should they store them in
their own tables instead of the workshop_grades one. This should be improved in
the future yet.
This is unrelated to the issue but was spotted while testing it. The order of
format_text() and file_rewrite_pluginfile_urls() was incorrect and threw
debugging message. Fixed now.
The availability restrictions that apply to user lists (group, grouping)
now apply in workshop:
* In user lists.
* When randomly allocating users (also now works as expected if you use
group mode and a grouping with the activity).
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.
This event was missed in the previous workshop add_to_log change over. The
switch phase event has been moved into the workshop::switch_phase() method.
Also workshop::log() has been deprecated. Developers should use the event
classes to log events.