From d2bbb76d7a19383598ffee534fce84a4f5f95ee4 Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Willms <tleilax+studip@gmail.com> Date: Tue, 23 Nov 2021 14:49:44 +0000 Subject: [PATCH] fixes #78 --- app/controllers/my_institutes.php | 78 +++++++++++----- app/views/my_institutes/index.php | 89 ++++++++----------- lib/classes/MyRealmModel.php | 4 +- lib/modules/CoreAdmin.class.php | 2 +- lib/modules/CoreCalendar.class.php | 2 +- lib/modules/CoreDocuments.class.php | 4 +- lib/modules/CoreElearningInterface.class.php | 2 +- lib/modules/CoreOverview.class.php | 2 +- lib/modules/CoreParticipants.class.php | 4 +- lib/modules/CoreSchedule.class.php | 2 +- lib/modules/CoreScm.class.php | 2 +- lib/modules/CoreStudygroupAdmin.class.php | 2 +- .../CoreStudygroupParticipants.class.php | 2 +- lib/modules/CoreWiki.class.php | 2 +- lib/modules/CoursewareModule.class.php | 2 +- lib/modules/GradebookModule.class.php | 2 +- lib/modules/IliasInterfaceModule.class.php | 4 +- lib/modules/LtiToolModule.class.php | 2 +- 18 files changed, 115 insertions(+), 92 deletions(-) diff --git a/app/controllers/my_institutes.php b/app/controllers/my_institutes.php index 62decebaa4c..0bdff852d75 100644 --- a/app/controllers/my_institutes.php +++ b/app/controllers/my_institutes.php @@ -9,14 +9,13 @@ class MyInstitutesController extends AuthenticatedController if (!$GLOBALS['perm']->have_perm("root")) { Navigation::activateItem('/browse/my_institutes'); } - $this->user_id = $GLOBALS['auth']->auth['uid']; - PageLayout::setHelpKeyword("Basis.MeineEinrichtungen"); - PageLayout::setTitle(_("Meine Einrichtungen")); + $this->user_id = $GLOBALS['user']->id; + PageLayout::setHelpKeyword('Basis.MeineEinrichtungen'); + PageLayout::setTitle(_('Meine Einrichtungen')); } public function index_action() { - $this->institutes = MyRealmModel::getMyInstitutes(); if ($this->check_for_new($this->institutes)) { @@ -24,6 +23,11 @@ class MyInstitutesController extends AuthenticatedController } $this->nav_elements = MyRealmModel::calc_single_navigation($this->institutes); + + $this->setupSidebar( + $this->institutes, + $this->check_for_new($this->institutes) + ); } public function decline_inst_action($inst_id) @@ -31,22 +35,24 @@ class MyInstitutesController extends AuthenticatedController $institut = Institute::find($inst_id); $ticket_check = Seminar_Session::check_ticket(Request::option('studipticket')); - if (Request::option('cmd') != 'kill' && Request::get('cmd') != 'back') { + if (Request::option('cmd') !== 'kill' && Request::get('cmd') !== 'back') { $this->flash['decline_inst'] = true; $this->flash['inst_id'] = $inst_id; $this->flash['name'] = $institut->name; $this->flash['studipticket'] = Seminar_Session::get_ticket(); - } else { - if (Request::get('cmd') == 'kill' && $ticket_check && Request::get('cmd') != 'back') { - $query = "DELETE FROM user_inst WHERE user_id = ? AND Institut_id = ? AND inst_perms = 'user'"; - $statement = DBManager::get()->prepare($query); - $statement->execute([$GLOBALS['user']->id, $inst_id]); - - if ($statement->rowCount() > 0) { - PageLayout::postMessage(MessageBox::success(sprintf(_("Die Zuordnung zur Einrichtung %s wurde aufgehoben."), "<b>" . htmlReady($institut->name) . "</b>"))); - } else { - PageLayout::postMessage(MessageBox::error(_('Datenbankfehler'))); - } + } elseif (Request::get('cmd') === 'kill' && $ticket_check && Request::get('cmd') !== 'back') { + $changed = InstituteMember::deleteBySQL( + "user_id = ? AND Institut_id = ? AND inst_perms = 'user'", + [$this->user_id, $inst_id] + ); + + if ($changed > 0) { + PageLayout::postSuccess(sprintf( + _('Die Zuordnung zur Einrichtung %s wurde aufgehoben.'), + '<strong>' . htmlReady($institut->name) . '</strong>' + )); + } else { + PageLayout::postError(_('Datenbankfehler')); } } $this->redirect('my_institutes/index'); @@ -56,14 +62,14 @@ class MyInstitutesController extends AuthenticatedController { $institutes = MyRealmModel::getMyInstitutes(); foreach ($institutes as $index => $institut) { - MyRealmModel::setObjectVisits($institutes[$index], $institut['institut_id'], $GLOBALS['user']->id, $timestamp); + MyRealmModel::setObjectVisits($institutes[$index], $institut['institut_id'], $this->user_id, $timestamp); } - PageLayout::postMessage(MessageBox::success(_('Alles als gelesen markiert!'))); + PageLayout::postSuccess(_('Alles als gelesen markiert!')); $this->redirect('my_institutes/index'); } - function check_for_new($my_obj) + protected function check_for_new($my_obj): bool { if(!empty($my_obj)) { foreach ($my_obj as $inst) { @@ -75,8 +81,7 @@ class MyInstitutesController extends AuthenticatedController return false; } - - function check_institute($institute) + protected function check_institute($institute): bool { if ($institute['visitdate'] || $institute['last_modified']) { if ($institute['visitdate'] <= $institute["chdate"] || $institute['last_modified'] > 0) { @@ -98,4 +103,35 @@ class MyInstitutesController extends AuthenticatedController return false; } + + private function setupSidebar(array $institutes, bool $reset) + { + $links = Sidebar::Get()->addWidget(new ActionsWidget()); + if ($reset) { + $links->addLink( + _('Alles als gelesen markieren'), + $this->tabularasaURL(time()), + Icon::create('accept') + ); + } + if ($GLOBALS['perm']->have_perm('dozent') && count($institutes) > 0) { + $links->addLink( + _('Einrichtungsdaten bearbeiten'), + URLHelper::getURL('dispatch.php/settings/statusgruppen'), + Icon::create('institute+edit') + ); + } + if ($GLOBALS['perm']->have_perm('autor')) { + $links->addLink( + _('Einrichtungen suchen'), + URLHelper::getURL('dispatch.php/search/globalsearch#GlobalSearchInstitutes'), + Icon::create('institute+add') + ); + $links->addLink( + _('Studiendaten bearbeiten'), + URLHelper::getURL('dispatch.php/settings/studies'), + Icon::create('person') + ); + } + } } diff --git a/app/views/my_institutes/index.php b/app/views/my_institutes/index.php index c92309aa0ee..e663d9e5295 100644 --- a/app/views/my_institutes/index.php +++ b/app/views/my_institutes/index.php @@ -1,3 +1,11 @@ +<?php +$is_important = function (?Navigation $nav): bool { + return $nav + && $nav->getImage() instanceof Icon + && in_array($nav->getImage()->getRole(), [Icon::ROLE_ATTENTION, Icon::ROLE_STATUS_RED]); +}; +?> + <? if (isset($flash['decline_inst'])) : ?> <?= QuestionBox::create( sprintf( @@ -24,18 +32,16 @@ <table class="default" id="my_institutes"> <caption><?= _('Meine Einrichtungen') ?></caption> <colgroup> - <col width="10px"> - <col width="25px"> + <col style="width: 25px"> <col> - <col width="<?= $nav_elements * 27 ?>px"> - <col width="45px"> + <col style="width: <?= $nav_elements * 32 ?>px"> + <col style="width: 45px"> </colgroup> <thead> <tr> <th></th> - <th></th> - <th><?= _("Name") ?></th> - <th style="text-align: center"><?= _("Inhalt") ?></th> + <th><?= _('Name') ?></th> + <th><?= _('Inhalt') ?></th> <th></th> </tr> </thead> @@ -44,66 +50,47 @@ <? $lastVisit = $values['visitdate']; ?> <? $instid = $values['institut_id'] ?> <tr> - <td style="width:1px"></td> <td> <?= InstituteAvatar::getAvatar($instid)->getImageTag(Avatar::SMALL, ['title' => $values['name']]) ?> </td> <td style="text-align: left"> <a href="<?= URLHelper::getLink('dispatch.php/institute/overview', ['auswahl' => $instid]) ?>"> - <?= htmlReady($GLOBALS['INST_TYPE'][$values["type"]]["name"] . ": " . $values["name"]) ?> + <?= htmlReady($GLOBALS['INST_TYPE'][$values['type']]['name'] . ': ' . $values['name']) ?> </a> </td> <td style="text-align: left; white-space: nowrap"> - <? if (!empty($values['navigation'])) : ?> - <? foreach (MyRealmModel::array_rtrim($values['navigation']) as $key => $nav) : ?> - <? if (isset($nav) && $nav->isVisible(true)) : ?> - <a href="<?= - UrlHelper::getLink('dispatch.php/institute/overview', - ['auswahl' => $instid, - 'redirect_to' => strtr($nav->getURL(), '?', '&')]) ?>" <?= $nav->hasBadgeNumber() ? 'class="badge" data-badge-number="' . intval($nav->getBadgeNumber()) . '"' : '' ?>> - <?= $nav->getImage()->asImg(20, $nav->getLinkAttributes()) ?> - </a> - <? elseif (is_string($key)) : ?> - <?= Assets::img('blank.gif', ['widtd' => 20, 'height' => 20]); ?> - <? endif ?> - <? endforeach ?> - <? endif ?> + <? if (!empty($values['navigation'])) : ?> + <ul class="my-courses-navigation"> + <? foreach (MyRealmModel::array_rtrim($values['navigation']) as $key => $nav) : ?> + <li class="my-courses-navigation-item <? if ($is_important($nav)) echo 'my-courses-navigation-important'; ?>"> + <? if (isset($nav) && $nav->isVisible(true)) : ?> + <a href="<?= + UrlHelper::getLink('dispatch.php/institute/overview', + ['auswahl' => $instid, + 'redirect_to' => strtr($nav->getURL(), '?', '&')]) ?>" <?= $nav->hasBadgeNumber() ? 'class="badge" data-badge-number="' . intval($nav->getBadgeNumber()) . '"' : '' ?>> + <?= $nav->getImage()->asImg(20, $nav->getLinkAttributes()) ?> + </a> + <? else: ?> + <span class="empty-slot" style="width: 20px"></span> + <? endif ?> + <? endforeach ?> + </li> + <? endif ?> </td> <td style="text-align: left; white-space: nowrap"> - <? if (Config::get()->ALLOW_SELFASSIGN_INSTITUTE && $values['perms'] == 'user') : ?> - <a href="<?=$controller->url_for('my_institutes/decline_inst/'.$instid)?>"> - <?= Icon::create('door-leave', 'inactive', ['title' => _("aus der Einrichtung austragen")])->asImg(20) ?> - </a> - <? else : ?> - <?= Assets::img('blank.gif', ['size' => '20']) ?> - <? endif ?> + <? if (Config::get()->ALLOW_SELFASSIGN_INSTITUTE && $values['perms'] === 'user') : ?> + <a href="<?= $controller->decline_inst($instid) ?>"> + <?= Icon::create('door-leave')->asImg(20, ['title' => _("aus der Einrichtung austragen")]) ?> + </a> + <? else : ?> + <?= Assets::img('blank.gif', ['size' => '20']) ?> + <? endif ?> </td> </tr> <? endforeach ?> </tbody> </table> <? endif ?> - - -<?php -$sidebar = Sidebar::Get(); - -$links = new ActionsWidget(); -if ($reset) { - $links->addLink(_('Alles als gelesen markieren'), - $controller->url_for('my_institutes/tabularasa/' . time()), Icon::create('accept', 'clickable')); -} -if ($GLOBALS['perm']->have_perm('dozent') && !empty($institutes)) { - $links->addLink(_('Einrichtungsdaten bearbeiten'), - URLHelper::getURL('dispatch.php/settings/statusgruppen'), Icon::create('institute+edit', 'clickable') ); -} -if ($GLOBALS['perm']->have_perm('autor')) { - $links->addLink(_('Einrichtungen suchen'), - URLHelper::getURL('dispatch.php/search/globalsearch#GlobalSearchInstitutes'), Icon::create('institute+add', 'clickable') ); - $links->addLink(_('Studiendaten bearbeiten'), - URLHelper::getURL('dispatch.php/settings/studies'), Icon::create('person', 'clickable')); -} -$sidebar->addWidget($links); diff --git a/lib/classes/MyRealmModel.php b/lib/classes/MyRealmModel.php index 7b981c3ab24..c832aecaca6 100644 --- a/lib/classes/MyRealmModel.php +++ b/lib/classes/MyRealmModel.php @@ -584,12 +584,12 @@ class MyRealmModel * Get all user assigned institutes based on simple or map * @return array */ - public static function getMyInstitutes() + public static function getMyInstitutes(): array { $memberShips = InstituteMember::findByUser($GLOBALS['user']->id); if (empty($memberShips)) { - return null; + return []; } $institutes = []; $insts = new SimpleCollection($memberShips); diff --git a/lib/modules/CoreAdmin.class.php b/lib/modules/CoreAdmin.class.php index da2efc8079a..b307b6f21bf 100644 --- a/lib/modules/CoreAdmin.class.php +++ b/lib/modules/CoreAdmin.class.php @@ -15,7 +15,7 @@ class CoreAdmin extends CorePlugin implements StudipModule public function getIconNavigation($course_id, $last_visit, $user_id) { $navigation = new Navigation(_('Verwaltung'), 'dispatch.php/course/management'); - $navigation->setImage(Icon::create('admin', Icon::ROLE_INACTIVE, ['title' => _('Verwaltung')])); + $navigation->setImage(Icon::create('admin', Icon::ROLE_CLICKABLE, ['title' => _('Verwaltung')])); return $navigation; } diff --git a/lib/modules/CoreCalendar.class.php b/lib/modules/CoreCalendar.class.php index 81c21f1e4cc..78d4b876e20 100644 --- a/lib/modules/CoreCalendar.class.php +++ b/lib/modules/CoreCalendar.class.php @@ -21,7 +21,7 @@ class CoreCalendar extends CorePlugin implements StudipModule } $navigation = new Navigation(_('Kalender'), "seminar_main.php?auswahl={$course_id}&redirect_to=dispatch.php/calendar/single/"); - $navigation->setImage(Icon::create('schedule', Icon::ROLE_INACTIVE)); + $navigation->setImage(Icon::create('schedule', Icon::ROLE_CLICKABLE)); return $navigation; } diff --git a/lib/modules/CoreDocuments.class.php b/lib/modules/CoreDocuments.class.php index 307a56dd6e6..6588bc888ab 100644 --- a/lib/modules/CoreDocuments.class.php +++ b/lib/modules/CoreDocuments.class.php @@ -38,7 +38,7 @@ class CoreDocuments extends CorePlugin implements StudipModule, OERModule * Now this module should put a copy of $material in its own area of the given course. * @param OERMaterial $material * @param Course $course - * @return void + * @return array|FileType */ static public function oerModuleIntegrateMaterialToCourse(OERMaterial $material, Course $course) { @@ -98,7 +98,7 @@ class CoreDocuments extends CorePlugin implements StudipModule, OERModule _('Dateibereich'), "dispatch.php/{$range_type}/files" ); - $navigation->setImage(Icon::create('files', Icon::ROLE_INACTIVE)); + $navigation->setImage(Icon::create('files')); $condition = "INNER JOIN folders ON (folders.id = file_refs.folder_id) WHERE folders.range_type = :range_type diff --git a/lib/modules/CoreElearningInterface.class.php b/lib/modules/CoreElearningInterface.class.php index db9f603d51d..2a8a183037b 100644 --- a/lib/modules/CoreElearningInterface.class.php +++ b/lib/modules/CoreElearningInterface.class.php @@ -53,7 +53,7 @@ class CoreElearningInterface extends CorePlugin implements StudipModule ) ]); } elseif ($result['count']) { - $nav->setImage(Icon::create('learnmodule', Icon::ROLE_INACTIVE), [ + $nav->setImage(Icon::create('learnmodule', Icon::ROLE_CLICKABLE), [ 'title' => sprintf( ngettext( '%d Lernmodul', diff --git a/lib/modules/CoreOverview.class.php b/lib/modules/CoreOverview.class.php index d4c2b95c961..b0de37a460f 100644 --- a/lib/modules/CoreOverview.class.php +++ b/lib/modules/CoreOverview.class.php @@ -56,7 +56,7 @@ class CoreOverview extends CorePlugin implements StudipModule ]); $nav->setBadgeNumber($result['neue']); } elseif ($result['count']) { - $nav->setImage(Icon::create('news', Icon::ROLE_INACTIVE), [ + $nav->setImage(Icon::create('news', Icon::ROLE_CLICKABLE), [ 'title' => sprintf( ngettext( '%d Ankündigung', diff --git a/lib/modules/CoreParticipants.class.php b/lib/modules/CoreParticipants.class.php index 4b9ded502ec..74ca506bbe7 100644 --- a/lib/modules/CoreParticipants.class.php +++ b/lib/modules/CoreParticipants.class.php @@ -38,7 +38,7 @@ class CoreParticipants extends CorePlugin implements StudipModule $first_nav = reset($sub_nav); $navigation = new Navigation($first_nav->getTitle(), $first_nav->getURL()); - $navigation->setImage(Icon::create('persons', Icon::ROLE_INACTIVE)); + $navigation->setImage(Icon::create('persons', Icon::ROLE_CLICKABLE)); return $navigation; } @@ -55,7 +55,7 @@ class CoreParticipants extends CorePlugin implements StudipModule } $navigation = new Navigation(_('Teilnehmende'), $url); - $navigation->setImage(Icon::create('persons', Icon::ROLE_INACTIVE)); + $navigation->setImage(Icon::create('persons', Icon::ROLE_CLICKABLE)); // Check permission, show no indicator if not at least tutor if (!$GLOBALS['perm']->have_studip_perm('tutor', $course_id, $user_id)) { diff --git a/lib/modules/CoreSchedule.class.php b/lib/modules/CoreSchedule.class.php index 22612ce24f8..950193038b5 100644 --- a/lib/modules/CoreSchedule.class.php +++ b/lib/modules/CoreSchedule.class.php @@ -60,7 +60,7 @@ class CoreSchedule extends CorePlugin implements StudipModule ]); $nav->setBadgeNumber($result['neue']); } else { - $nav->setImage(Icon::create('schedule', Icon::ROLE_INACTIVE), [ + $nav->setImage(Icon::create('schedule', Icon::ROLE_CLICKABLE), [ 'title' => sprintf( ngettext( '%d Termin', diff --git a/lib/modules/CoreScm.class.php b/lib/modules/CoreScm.class.php index 0db6918baa1..f403589e07c 100644 --- a/lib/modules/CoreScm.class.php +++ b/lib/modules/CoreScm.class.php @@ -61,7 +61,7 @@ class CoreScm extends CorePlugin implements StudipModule ); } } else { - $image = Icon::create('infopage', Icon::ROLE_INACTIVE); + $image = Icon::create('infopage', Icon::ROLE_CLICKABLE); if ($result['count'] == 1) { $title = $scm->tab_name; } else { diff --git a/lib/modules/CoreStudygroupAdmin.class.php b/lib/modules/CoreStudygroupAdmin.class.php index 9e8e07cb333..7c67a26f1c4 100644 --- a/lib/modules/CoreStudygroupAdmin.class.php +++ b/lib/modules/CoreStudygroupAdmin.class.php @@ -18,7 +18,7 @@ class CoreStudygroupAdmin extends CorePlugin implements StudipModule public function getIconNavigation($course_id, $last_visit, $user_id) { $navigation = new Navigation(_('Verwaltung'), "dispatch.php/course/studygroup/edit/?cid={$course_id}"); - $navigation->setImage(Icon::create('admin', Icon::ROLE_INACTIVE), ['title' => _('Verwaltung')]); + $navigation->setImage(Icon::create('admin', Icon::ROLE_CLICKABLE), ['title' => _('Verwaltung')]); return $navigation; } diff --git a/lib/modules/CoreStudygroupParticipants.class.php b/lib/modules/CoreStudygroupParticipants.class.php index e0e09ece45d..70663528048 100644 --- a/lib/modules/CoreStudygroupParticipants.class.php +++ b/lib/modules/CoreStudygroupParticipants.class.php @@ -17,7 +17,7 @@ class CoreStudygroupParticipants extends CorePlugin implements StudipModule public function getIconNavigation($course_id, $last_visit, $user_id) { $navigation = new Navigation(_('Teilnehmende'), "dispatch.php/course/studygroup/members/{$course_id}"); - $navigation->setImage(Icon::create('persons', Icon::ROLE_INACTIVE)); + $navigation->setImage(Icon::create('persons', Icon::ROLE_CLICKABLE)); if ($last_visit && CourseMember::countBySQL("seminar_id = :course_id AND mkdate >= :last_visit", ['last_visit' => $last_visit, 'course_id' => $course_id]) > 0) { $navigation->setImage(Icon::create('persons+new', Icon::ROLE_ATTENTION)); } diff --git a/lib/modules/CoreWiki.class.php b/lib/modules/CoreWiki.class.php index ca42b4ba59b..e389a8f0b2a 100644 --- a/lib/modules/CoreWiki.class.php +++ b/lib/modules/CoreWiki.class.php @@ -73,7 +73,7 @@ class CoreWiki extends CorePlugin implements StudipModule $nav->setBadgeNumber($result['neue']); } else { $nav->setURL('wiki.php'); - $nav->setImage(Icon::create('wiki', Icon::ROLE_INACTIVE, [ + $nav->setImage(Icon::create('wiki', Icon::ROLE_CLICKABLE, [ 'title' => sprintf( ngettext( '%d Wiki-Seite', diff --git a/lib/modules/CoursewareModule.class.php b/lib/modules/CoursewareModule.class.php index 78d240018cd..4a9a25b4c2d 100755 --- a/lib/modules/CoursewareModule.class.php +++ b/lib/modules/CoursewareModule.class.php @@ -101,7 +101,7 @@ class CoursewareModule extends CorePlugin implements SystemPlugin, StudipModule, } } $nav = new Navigation(_('Courseware'), 'dispatch.php/course/courseware'); - $nav->setImage(Icon::create('courseware', Icon::ROLE_INACTIVE), [ + $nav->setImage(Icon::create('courseware', Icon::ROLE_CLICKABLE), [ 'title' => _('Courseware'), ]); diff --git a/lib/modules/GradebookModule.class.php b/lib/modules/GradebookModule.class.php index 077dc573606..14b21e7c1dc 100644 --- a/lib/modules/GradebookModule.class.php +++ b/lib/modules/GradebookModule.class.php @@ -62,7 +62,7 @@ class GradebookModule extends CorePlugin implements SystemPlugin, StudipModule $icon = $changed ? Icon::create('assessment+new', Icon::ROLE_NEW) - : Icon::create('assessment', Icon::ROLE_INACTIVE); + : Icon::create('assessment', Icon::ROLE_CLICKABLE); $navigation = new Navigation($title, 'dispatch.php/course/gradebook/overview'); $navigation->setImage($icon, ['title' => $title]); diff --git a/lib/modules/IliasInterfaceModule.class.php b/lib/modules/IliasInterfaceModule.class.php index 4f5a62d00b5..45b33989711 100644 --- a/lib/modules/IliasInterfaceModule.class.php +++ b/lib/modules/IliasInterfaceModule.class.php @@ -82,7 +82,7 @@ class IliasInterfaceModule extends CorePlugin implements StudipModule, SystemPlu ) ]); } elseif ($result['count_modules']) { - $nav->setImage(Icon::create('learnmodule', Icon::ROLE_INACTIVE), [ + $nav->setImage(Icon::create('learnmodule', Icon::ROLE_CLICKABLE), [ 'title' => sprintf( ngettext( '%d Lernobjekt', @@ -93,7 +93,7 @@ class IliasInterfaceModule extends CorePlugin implements StudipModule, SystemPlu ) ]); } elseif ($result['count_courses']) { - $nav->setImage(Icon::create('learnmodule', Icon::ROLE_INACTIVE), [ + $nav->setImage(Icon::create('learnmodule', Icon::ROLE_CLICKABLE), [ 'title' => sprintf( ngettext( '%d ILIAS-Kurs', diff --git a/lib/modules/LtiToolModule.class.php b/lib/modules/LtiToolModule.class.php index 4f2a5107716..c342a9e1dcc 100644 --- a/lib/modules/LtiToolModule.class.php +++ b/lib/modules/LtiToolModule.class.php @@ -42,7 +42,7 @@ class LtiToolModule extends CorePlugin implements StudipModule, SystemPlugin, Pr $icon = $changed ? Icon::create('link-extern+new', Icon::ROLE_NEW) - : Icon::create('link-extern', Icon::ROLE_INACTIVE); + : Icon::create('link-extern', Icon::ROLE_CLICKABLE); $navigation = new Navigation($title, 'dispatch.php/course/lti'); $navigation->setImage($icon, ['title' => $title]); -- GitLab