mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-35711 mod_assign Trigger submission event when submit button click is not requred
This commit is contained in:
parent
eb214fdb4e
commit
184a5ef9e5
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user