Permalink
Browse files

MDL-35711 mod_assign Trigger submission event when submit button clic…

…k is not requred
  • Loading branch information...
kabalin authored and danpoltawski committed Oct 1, 2012
1 parent eb214fd commit 184a5ef9e532650d5c9118d8eeaf7f9d3a5f4194
Showing with 11 additions and 0 deletions.
  1. +11 −0 mod/assign/locallib.php
View
@@ -3755,6 +3755,17 @@ private function process_save_submission(&$mform) {
if (!$this->get_instance()->submissiondrafts) {
$this->notify_student_submission_receipt($submission);
$this->notify_graders($submission);
+ // Trigger assessable_submitted event on submission
+ $eventdata = new stdClass();
+ $eventdata->modulename = 'assign';
+ $eventdata->cmid = $this->get_course_module()->id;
+ $eventdata->itemid = $submission->id;
+ $eventdata->courseid = $this->get_course()->id;
+ $eventdata->userid = $USER->id;
+ $eventdata->params = array(
+ 'submission_editable' => true,
+ );
+ events_trigger('assessable_submitted', $eventdata);
}
return true;
}

0 comments on commit 184a5ef

Please sign in to comment.