Skip to content

Commit

Permalink
Add check if process exists. (#191)
Browse files Browse the repository at this point in the history
This prevents courses to be processed which had been rescued by the teacher.
  • Loading branch information
melanietreitinger authored Dec 4, 2023
1 parent 8e08f2d commit ddb70d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion step/email/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function process_course($processid, $instanceid, $course) {
public function process_waiting_course($processid, $instanceid, $course) {
// When time runs up and no one wants to keep the course, then proceed.
$process = process_manager::get_process_by_id($processid);
if ($process->timestepchanged < time() - settings_manager::get_settings(
if (null !== $process && $process->timestepchanged < time() - settings_manager::get_settings(
$instanceid,
settings_type::STEP
)['responsetimeout']) {
Expand Down

0 comments on commit ddb70d8

Please sign in to comment.