Merge branch 'MDL-35710' of git://github.com/netspotau/moodle-mod_assign

This commit is contained in:
Dan Poltawski 2012-10-16 10:01:46 +08:00
commit eed6cd1987
2 changed files with 9 additions and 4 deletions

View File

@ -32,7 +32,7 @@ assessable_content_uploaded
->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.
->content = // The text content entered by the user (empty if no content submitted)
->content = // The text content entered by the user (empty if no content submitted).
->pathnamehashes = // An array of pathnamehashes of the files submitted by the user (var not passed if not set).
assessable_file_uploaded
@ -43,10 +43,12 @@ assessable_file_uploaded
->userid = // The user id that the attempt belongs to.
->pathnamehashes = // An array of pathnamehashes of the files submitted by the user (var not passed if not set).
assessable_content_done
assessable_submitted
->modulename = 'assign';
->cmid = // The cmid of the assign.
->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 File

@ -3325,14 +3325,17 @@ class assign {
$this->add_to_log('submit for grading', $this->format_submission_for_log($submission));
$this->notify_graders($submission);
$this->notify_student_submission_receipt($submission);
// Trigger assessable_content_done event to show completion
// 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;
events_trigger('assessable_content_done', $eventdata);
$eventdata->params = array(
'submission_editable' => false,
);
events_trigger('assessable_submitted', $eventdata);
}
}
return true;