From 736fa5d07abb73e27d3f82c3fca556b377fd83b8 Mon Sep 17 00:00:00 2001 From: tgloeggl <tgloeggl@uos.de> Date: Mon, 10 Sep 2018 13:42:31 +0200 Subject: [PATCH] fix schedule for uos/4.2 --- AvailSchedule.class.php | 8 ++++---- templates/schedule.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/AvailSchedule.class.php b/AvailSchedule.class.php index 536085e..7bfd272 100755 --- a/AvailSchedule.class.php +++ b/AvailSchedule.class.php @@ -27,10 +27,10 @@ class AvailSchedule extends StudipPlugin implements SystemPlugin { parent::__construct(); - $sem_type = $_SESSION['SessSemName']['art_num']; + $sem_type = Context::getArtNum(); if (isset($sem_type) && !$GLOBALS['SEM_CLASS'][$GLOBALS['SEM_TYPE'][$sem_type]['class']]['studygroup_mode'] && - Navigation::hasItem('/course/members') && $GLOBALS['perm']->have_studip_perm('tutor', $_SESSION['SessSemName'][1])) { + Navigation::hasItem('/course/members') && $GLOBALS['perm']->have_studip_perm('tutor', Context::getId())) { $navigation = Navigation::getItem('/course/members'); $navigation->addSubNavigation('conflicts', new Navigation(_('Verfügbarkeit'), PluginEngine::getLink('availschedule/show'))); } @@ -39,13 +39,13 @@ class AvailSchedule extends StudipPlugin implements SystemPlugin function show_action() { - $seminar_id = Request::option('cid'); + $seminar_id = Context::getId(); if (!$seminar_id || !$GLOBALS['perm']->have_studip_perm('tutor', $seminar_id)) { die; } - PageLayout::setTitle($GLOBALS['SessSemName']['header_line'] . ' - ' . _('Verfügbarkeitsplan')); + PageLayout::setTitle(Context::getHeaderLine() . ' - ' . _('Verfügbarkeitsplan')); Navigation::activateItem('/course/members/conflicts'); $template_path = $this->getPluginPath() . '/templates'; diff --git a/templates/schedule.php b/templates/schedule.php index 386a379..fc9e33d 100755 --- a/templates/schedule.php +++ b/templates/schedule.php @@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ?> <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> - <td class="blank" align="center"> + <td class="blank"> <br/> <? $semester = new SemesterData(); -- GitLab