Skip to content

Commit 0755d72

Browse files
committed
Allow steps to run when course no longer exits (learnweb#222)
1 parent f0c0fd9 commit 0755d72

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: classes/processor.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,9 @@ public function process_courses() {
102102
try {
103103
$course = get_course($process->courseid);
104104
} catch (\dml_missing_record_exception $e) {
105-
// Course no longer exists!
106-
break;
105+
mtrace("The course with id {$process->courseid} no longer exists. New stdClass with id property is created.");
106+
$course = new \stdClass();
107+
$course->id = $process->courseid;
107108
}
108109

109110
if ($process->stepindex == 0) {

0 commit comments

Comments
 (0)