Skip to content
Snippets Groups Projects
Commit 40b9776c authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms Committed by Rasmus Fuhse
Browse files

fixes #3186

Closes #3186

Merge request studip/studip!2572
parent 928a48c6
No related branches found
No related tags found
No related merge requests found
...@@ -243,12 +243,12 @@ class Calendar_ScheduleController extends AuthenticatedController ...@@ -243,12 +243,12 @@ class Calendar_ScheduleController extends AuthenticatedController
$this->render_template('calendar/schedule/_entry_course'); $this->render_template('calendar/schedule/_entry_course');
} else if ($id) { } else if ($id) {
$entry_columns = CalendarScheduleModel::getScheduleEntries($GLOBALS['user']->id, 0, 0, $id); $entry_columns = CalendarScheduleModel::getScheduleEntries($GLOBALS['user']->id, 0, 0, $id);
$entries = []; if (count($entry_columns) > 0) {
$entry_columns = array_pop($entry_columns); $entries = array_pop($entry_columns)->getEntries();
if ($entry_columns) { $this->show_entry = array_pop($entries);
$entries = $entry_columns->getEntries(); } else {
$this->show_entry = null;
} }
$this->show_entry = array_pop($entries);
$this->render_template('calendar/schedule/_entry_schedule'); $this->render_template('calendar/schedule/_entry_schedule');
} }
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment