Merge pull request #4928 from christianbeeznest/ofaj-21109

Exercise: Fix error when object link is null  - refs BT#21109
pull/4929/head
christianbeeznest 2 years ago committed by GitHub
commit 524102087b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      public/main/exercise/exercise.class.php

@ -6537,7 +6537,7 @@ class Exercise
$course = api_get_course_entity($this->course_id);
$link = $exercise->getFirstResourceLinkFromCourseSession($course);
if ($link->isDraft()) {
if ($link && $link->isDraft()) {
$this->active = 0;
}

Loading…
Cancel
Save