Skip to content
Snippets Groups Projects
Commit 77a819e1 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

fixes #3544

Closes #3544

Merge request studip/studip!2433
parent e640b421
No related branches found
No related tags found
No related merge requests found
...@@ -111,7 +111,7 @@ class Course_DetailsController extends AuthenticatedController ...@@ -111,7 +111,7 @@ class Course_DetailsController extends AuthenticatedController
return false; return false;
} }
$modul_start = Semester::find($modul->start)->beginn ?: 0; $modul_start = Semester::find($modul->start)->beginn ?: 0;
$modul_end = Semester::find($modul->end)->ende ?: PHP_INT_MAX; $modul_end = $modul->end ? Semester::find($modul->end)->ende : PHP_INT_MAX;
return ($modul_start <= $course_end && $modul_end >= $course_start); return ($modul_start <= $course_end && $modul_end >= $course_start);
}); });
......
...@@ -57,7 +57,7 @@ abstract class ModuleManagementModelTreeItem extends ModuleManagementModel imple ...@@ -57,7 +57,7 @@ abstract class ModuleManagementModelTreeItem extends ModuleManagementModel imple
$types = $types ?: $path; $types = $types ?: $path;
$trails = []; $trails = [];
$class_name = get_class($this); $class_name = get_class($this);
$next = $path[array_search($class_name, $path) + 1]; $next = $path[array_search($class_name, $path) + 1] ?? null;
$parents = $this->getParents($next); $parents = $this->getParents($next);
foreach ($parents as $parent) { foreach ($parents as $parent) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment