MDL-35711 mod_assign Trigger submission event when submit button click is not requred

This commit is contained in:
Ruslan Kabalin 2012-10-01 09:57:25 +01:00 committed by Dan Poltawski
parent eb214fdb4e
commit 184a5ef9e5

View File

@ -3755,6 +3755,17 @@ class assign {
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;
}