Skip to content

Commit

Permalink
Merge pull request #3 from catalyst/issue-222-allow-steps-to-run-when…
Browse files Browse the repository at this point in the history
…-course-does-not-exist

Allow steps to run when course no longer exits (learnweb#222)
  • Loading branch information
picnicpete authored Oct 2, 2024
2 parents f0c0fd9 + 0755d72 commit 949acbe
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 949acbe

Please sign in to comment.