MDL-34544: Plagiarism API - add support for control of drafts to new assign
authorKanika Goyal <kanikagoyal999@gmail.com>
Sun, 12 Aug 2012 09:41:54 +0000 (15:11 +0530)
committerDan Marsden <dan@danmarsden.com>
Mon, 3 Sep 2012 01:11:16 +0000 (13:11 +1200)
mod/assign/locallib.php

index 455afd1..bf8c064 100644 (file)
@@ -2574,6 +2574,14 @@ 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
+                $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);
             }
         }
         return true;