Skip to content

Commit

Permalink
MDL-35710 mod_assign Add submission_editable paramenter to event object
Browse files Browse the repository at this point in the history
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
kabalin authored and Damyon Wiese committed Oct 12, 2012
1 parent f04523f commit c14685e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mod/assign/db/events.php
Expand Up @@ -49,4 +49,6 @@
->itemid = // The submission id of the user submission. ->itemid = // The submission id of the user submission.
->courseid = // The course id of the course the assign belongs to. ->courseid = // The course id of the course the assign belongs to.
->userid = // The user id that the attempt 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.
*/ */
3 changes: 3 additions & 0 deletions mod/assign/locallib.php
Expand Up @@ -3332,6 +3332,9 @@ private function process_submit_for_grading($mform) {
$eventdata->itemid = $submission->id; $eventdata->itemid = $submission->id;
$eventdata->courseid = $this->get_course()->id; $eventdata->courseid = $this->get_course()->id;
$eventdata->userid = $USER->id; $eventdata->userid = $USER->id;
$eventdata->params = array(
'submission_editable' => false,
);
events_trigger('assessable_submitted', $eventdata); events_trigger('assessable_submitted', $eventdata);
} }
} }
Expand Down

0 comments on commit c14685e

Please sign in to comment.