Skip to content

Commit

Permalink
Allow steps to run when course no longer exits (#222)
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottVerbeek committed Sep 27, 2024
1 parent f0c0fd9 commit 0755d72
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions classes/processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ public function process_courses() {
try {
$course = get_course($process->courseid);
} catch (\dml_missing_record_exception $e) {
// Course no longer exists!
break;
mtrace("The course with id {$process->courseid} no longer exists. New stdClass with id property is created.");
$course = new \stdClass();
$course->id = $process->courseid;
}

if ($process->stepindex == 0) {
Expand Down

0 comments on commit 0755d72

Please sign in to comment.