diff options
| author | Jan-Hendrik Willms <tleilax+github@gmail.com> | 2022-02-24 16:31:20 +0100 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2022-02-28 14:48:48 +0000 |
| commit | 68965bed021bf645e560041af4df60fffa29a5f9 (patch) | |
| tree | a6a45c7b88f3e1b07f683ec9cd9c93c38eb7edcf /app/controllers/course/overview.php | |
| parent | 00e4f9bfae615e009eae9598c2d5da1839b23b46 (diff) | |
remove consultation widget, fixes #713
Diffstat (limited to 'app/controllers/course/overview.php')
| -rw-r--r-- | app/controllers/course/overview.php | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/app/controllers/course/overview.php b/app/controllers/course/overview.php index 1977ed4..9246fe3 100644 --- a/app/controllers/course/overview.php +++ b/app/controllers/course/overview.php @@ -145,34 +145,6 @@ class Course_OverviewController extends AuthenticatedController Sidebar::get()->addWidget($actions); } - if (Config::get()->CONSULTATION_ENABLED) { - $links = $sidebar->addWidget(new LinksWidget()); - $links->setTitle(_('Sprechstunden der Lehrenden')); - - foreach ($this->course->getMembersWithStatus('dozent', true)->pluck('user') as $teacher) { - $consultations = ConsultationBlock::countByRange($teacher); - if ($consultations === 0) { - continue; - } - - $link = ($teacher->id === $GLOBALS['user']->id || $GLOBALS['user']->perms === 'root') - ? 'admin' - : 'overview'; - $disabled = $GLOBALS['user']->id !== $teacher->id - && $GLOBALS['user']->perms === 'dozent' - && !Config::get()->CONSULTATION_ALLOW_DOCENTS_RESERVING; - $links->addLink( - $teacher->getFullName(), - URLHelper::getURL("dispatch.php/consultation/{$link}", [ - 'username' => $teacher->username, - 'cid' => null, - ]), - Icon::create(Avatar::getAvatar($teacher->id)->getURL(Avatar::SMALL)), - compact('disabled') - ); - } - } - $share = new ShareWidget(); if ($this->studygroup_mode) { $share->addCopyableLink( |
