Permalink
Browse files

MDL-35710 mod_assign Add submission_editable paramenter to event object

This will allow to keep assessable_submitted event object structure consistent
throughout the system, while particular modules could define own parameters
within params variable.

This module defines submission_editable parameter to reflect if user can edit
submission before assessment has been done.
  • Loading branch information...
1 parent f04523f commit c14685e80f66452bd69d5f5f8ec877e16b332330 @kabalin kabalin committed with Damyon Wiese Oct 11, 2012
Showing with 5 additions and 0 deletions.
  1. +2 −0 mod/assign/db/events.php
  2. +3 −0 mod/assign/locallib.php
View
@@ -49,4 +49,6 @@
->itemid = // The submission id of the user submission.
->courseid = // The course id of the course the assign belongs to.
->userid = // The user id that the attempt belongs to.
+ ->params = // Array of module specific parameters
+ -> submission_editable = // Whether user can edit submission before assessment has been done.
*/
View
@@ -3332,6 +3332,9 @@ private function process_submit_for_grading($mform) {
$eventdata->itemid = $submission->id;
$eventdata->courseid = $this->get_course()->id;
$eventdata->userid = $USER->id;
+ $eventdata->params = array(
+ 'submission_editable' => false,
+ );
events_trigger('assessable_submitted', $eventdata);
}
}

0 comments on commit c14685e

Please sign in to comment.