Skip to content
Snippets Groups Projects
Commit beb442d8 authored by Till Glöggler's avatar Till Glöggler
Browse files

remove plugin-activation check, improve sem-status check

parent ccf4fa42
No related branches found
No related tags found
No related merge requests found
......@@ -27,19 +27,12 @@ class AvailSchedule extends StudipPlugin implements SystemPlugin
{
parent::__construct();
if (!$this->isActivated()) {
return;
}
$seminar_id = Request::option('cid', $GLOBALS['SeminarSession']);
$sem_type = $_SESSION['SessSemName']['art_num'];
$sem = Seminar::getInstance($seminar_id);
if (in_array($sem->status, studygroup_sem_types()) === false) {
if (Navigation::hasItem('/course/members') && $GLOBALS['perm']->have_studip_perm('tutor', $seminar_id)) {
$navigation = Navigation::getItem('/course/members');
$navigation->addSubNavigation('conflicts', new Navigation(_('Verfgbarkeit'), PluginEngine::getLink('availschedule/show')));
}
if (isset($sem_type) && !$GLOBALS['SEM_CLASS'][$GLOBALS['SEM_TYPE'][$sem_type]]->studygroup_mode &&
Navigation::hasItem('/course/members') && $GLOBALS['perm']->have_studip_perm('tutor', $_SESSION['SessSemName'][1])) {
$navigation = Navigation::getItem('/course/members');
$navigation->addSubNavigation('conflicts', new Navigation(_('Verfgbarkeit'), PluginEngine::getLink('availschedule/show')));
}
}
......
pluginclassname=AvailSchedule
pluginname=AvailabilitySchedule
origin=elan-ev
version=0.1.2
version=0.1.3
studipMinVersion=2.4
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment