Skip to content
Snippets Groups Projects
Unverified Commit ddb70d8c authored by Melanie Treitinger's avatar Melanie Treitinger Committed by GitHub
Browse files

Add check if process exists. (#191)

This prevents courses to be processed which had been rescued by the teacher.
parent 8e08f2d0
No related branches found
No related tags found
No related merge requests found
......@@ -88,7 +88,7 @@ class email extends libbase {
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']) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment