3535 * - int processid: the id of the process.
3636 * - int workflowid: the id of the workflow.
3737 * - int stepindex: the index of the step.
38- * - int courseid: the id of the course.
3938 * }
4039 *
4140 * @package tool_lifecycle
@@ -54,12 +53,12 @@ class process_proceeded extends \core\event\base {
5453 */
5554 public static function event_from_process ($ process ) {
5655 $ data = [
57- 'context ' => \context_system::instance (),
56+ 'courseid ' => $ process ->courseid ,
57+ 'context ' => $ process ->context ,
5858 'other ' => [
5959 'processid ' => $ process ->id ,
6060 'workflowid ' => $ process ->workflowid ,
6161 'stepindex ' => $ process ->stepindex ,
62- 'courseid ' => $ process ->courseid ,
6362 ],
6463 ];
6564 return self ::create ($ data );
@@ -84,7 +83,7 @@ public function get_description() {
8483 $ processid = $ this ->other ['processid ' ];
8584 $ workflowid = $ this ->other ['workflowid ' ];
8685 $ stepindex = $ this ->other ['stepindex ' ];
87- $ courseid = $ this ->other [ ' courseid ' ] ;
86+ $ courseid = $ this ->courseid ;
8887
8988 return "The workflow with id ' $ workflowid' finished step ' $ stepindex' successfully for course ' $ courseid' " .
9089 "in the process with id ' $ processid' " ;
@@ -130,7 +129,7 @@ protected function validate_data() {
130129 throw new \coding_exception ('The \'stepindex \' value must be set ' );
131130 }
132131
133- if (!isset ($ this ->other [ ' courseid ' ] )) {
132+ if (!isset ($ this ->courseid )) {
134133 throw new \coding_exception ('The \'courseid \' value must be set ' );
135134 }
136135 }
0 commit comments