Skip to content
Snippets Groups Projects
Commit 68965bed authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms Committed by Jan-Hendrik Willms
Browse files

remove consultation widget, fixes #713

parent 00e4f9bf
No related branches found
No related tags found
No related merge requests found
...@@ -145,34 +145,6 @@ class Course_OverviewController extends AuthenticatedController ...@@ -145,34 +145,6 @@ class Course_OverviewController extends AuthenticatedController
Sidebar::get()->addWidget($actions); 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(); $share = new ShareWidget();
if ($this->studygroup_mode) { if ($this->studygroup_mode) {
$share->addCopyableLink( $share->addCopyableLink(
......
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