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

fixes #78

parent 550ad14d
No related branches found
No related tags found
No related merge requests found
Showing
with 115 additions and 92 deletions
...@@ -9,14 +9,13 @@ class MyInstitutesController extends AuthenticatedController ...@@ -9,14 +9,13 @@ class MyInstitutesController extends AuthenticatedController
if (!$GLOBALS['perm']->have_perm("root")) { if (!$GLOBALS['perm']->have_perm("root")) {
Navigation::activateItem('/browse/my_institutes'); Navigation::activateItem('/browse/my_institutes');
} }
$this->user_id = $GLOBALS['auth']->auth['uid']; $this->user_id = $GLOBALS['user']->id;
PageLayout::setHelpKeyword("Basis.MeineEinrichtungen"); PageLayout::setHelpKeyword('Basis.MeineEinrichtungen');
PageLayout::setTitle(_("Meine Einrichtungen")); PageLayout::setTitle(_('Meine Einrichtungen'));
} }
public function index_action() public function index_action()
{ {
$this->institutes = MyRealmModel::getMyInstitutes(); $this->institutes = MyRealmModel::getMyInstitutes();
if ($this->check_for_new($this->institutes)) { if ($this->check_for_new($this->institutes)) {
...@@ -24,6 +23,11 @@ class MyInstitutesController extends AuthenticatedController ...@@ -24,6 +23,11 @@ class MyInstitutesController extends AuthenticatedController
} }
$this->nav_elements = MyRealmModel::calc_single_navigation($this->institutes); $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) public function decline_inst_action($inst_id)
...@@ -31,22 +35,24 @@ class MyInstitutesController extends AuthenticatedController ...@@ -31,22 +35,24 @@ class MyInstitutesController extends AuthenticatedController
$institut = Institute::find($inst_id); $institut = Institute::find($inst_id);
$ticket_check = Seminar_Session::check_ticket(Request::option('studipticket')); $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['decline_inst'] = true;
$this->flash['inst_id'] = $inst_id; $this->flash['inst_id'] = $inst_id;
$this->flash['name'] = $institut->name; $this->flash['name'] = $institut->name;
$this->flash['studipticket'] = Seminar_Session::get_ticket(); $this->flash['studipticket'] = Seminar_Session::get_ticket();
} 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 { } else {
if (Request::get('cmd') == 'kill' && $ticket_check && Request::get('cmd') != 'back') { PageLayout::postError(_('Datenbankfehler'));
$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')));
}
} }
} }
$this->redirect('my_institutes/index'); $this->redirect('my_institutes/index');
...@@ -56,14 +62,14 @@ class MyInstitutesController extends AuthenticatedController ...@@ -56,14 +62,14 @@ class MyInstitutesController extends AuthenticatedController
{ {
$institutes = MyRealmModel::getMyInstitutes(); $institutes = MyRealmModel::getMyInstitutes();
foreach ($institutes as $index => $institut) { 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'); $this->redirect('my_institutes/index');
} }
function check_for_new($my_obj) protected function check_for_new($my_obj): bool
{ {
if(!empty($my_obj)) { if(!empty($my_obj)) {
foreach ($my_obj as $inst) { foreach ($my_obj as $inst) {
...@@ -75,8 +81,7 @@ class MyInstitutesController extends AuthenticatedController ...@@ -75,8 +81,7 @@ class MyInstitutesController extends AuthenticatedController
return false; return false;
} }
protected function check_institute($institute): bool
function check_institute($institute)
{ {
if ($institute['visitdate'] || $institute['last_modified']) { if ($institute['visitdate'] || $institute['last_modified']) {
if ($institute['visitdate'] <= $institute["chdate"] || $institute['last_modified'] > 0) { if ($institute['visitdate'] <= $institute["chdate"] || $institute['last_modified'] > 0) {
...@@ -98,4 +103,35 @@ class MyInstitutesController extends AuthenticatedController ...@@ -98,4 +103,35 @@ class MyInstitutesController extends AuthenticatedController
return false; 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')
);
}
}
} }
<?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'])) : ?> <? if (isset($flash['decline_inst'])) : ?>
<?= QuestionBox::create( <?= QuestionBox::create(
sprintf( sprintf(
...@@ -24,18 +32,16 @@ ...@@ -24,18 +32,16 @@
<table class="default" id="my_institutes"> <table class="default" id="my_institutes">
<caption><?= _('Meine Einrichtungen') ?></caption> <caption><?= _('Meine Einrichtungen') ?></caption>
<colgroup> <colgroup>
<col width="10px"> <col style="width: 25px">
<col width="25px">
<col> <col>
<col width="<?= $nav_elements * 27 ?>px"> <col style="width: <?= $nav_elements * 32 ?>px">
<col width="45px"> <col style="width: 45px">
</colgroup> </colgroup>
<thead> <thead>
<tr> <tr>
<th></th> <th></th>
<th></th> <th><?= _('Name') ?></th>
<th><?= _("Name") ?></th> <th><?= _('Inhalt') ?></th>
<th style="text-align: center"><?= _("Inhalt") ?></th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
...@@ -44,20 +50,21 @@ ...@@ -44,20 +50,21 @@
<? $lastVisit = $values['visitdate']; ?> <? $lastVisit = $values['visitdate']; ?>
<? $instid = $values['institut_id'] ?> <? $instid = $values['institut_id'] ?>
<tr> <tr>
<td style="width:1px"></td>
<td> <td>
<?= InstituteAvatar::getAvatar($instid)->getImageTag(Avatar::SMALL, ['title' => $values['name']]) ?> <?= InstituteAvatar::getAvatar($instid)->getImageTag(Avatar::SMALL, ['title' => $values['name']]) ?>
</td> </td>
<td style="text-align: left"> <td style="text-align: left">
<a href="<?= URLHelper::getLink('dispatch.php/institute/overview', ['auswahl' => $instid]) ?>"> <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> </a>
</td> </td>
<td style="text-align: left; white-space: nowrap"> <td style="text-align: left; white-space: nowrap">
<? if (!empty($values['navigation'])) : ?> <? if (!empty($values['navigation'])) : ?>
<ul class="my-courses-navigation">
<? foreach (MyRealmModel::array_rtrim($values['navigation']) as $key => $nav) : ?> <? 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)) : ?> <? if (isset($nav) && $nav->isVisible(true)) : ?>
<a href="<?= <a href="<?=
UrlHelper::getLink('dispatch.php/institute/overview', UrlHelper::getLink('dispatch.php/institute/overview',
...@@ -65,17 +72,18 @@ ...@@ -65,17 +72,18 @@
'redirect_to' => strtr($nav->getURL(), '?', '&')]) ?>" <?= $nav->hasBadgeNumber() ? 'class="badge" data-badge-number="' . intval($nav->getBadgeNumber()) . '"' : '' ?>> 'redirect_to' => strtr($nav->getURL(), '?', '&')]) ?>" <?= $nav->hasBadgeNumber() ? 'class="badge" data-badge-number="' . intval($nav->getBadgeNumber()) . '"' : '' ?>>
<?= $nav->getImage()->asImg(20, $nav->getLinkAttributes()) ?> <?= $nav->getImage()->asImg(20, $nav->getLinkAttributes()) ?>
</a> </a>
<? elseif (is_string($key)) : ?> <? else: ?>
<?= Assets::img('blank.gif', ['widtd' => 20, 'height' => 20]); ?> <span class="empty-slot" style="width: 20px"></span>
<? endif ?> <? endif ?>
<? endforeach ?> <? endforeach ?>
</li>
<? endif ?> <? endif ?>
</td> </td>
<td style="text-align: left; white-space: nowrap"> <td style="text-align: left; white-space: nowrap">
<? if (Config::get()->ALLOW_SELFASSIGN_INSTITUTE && $values['perms'] == 'user') : ?> <? if (Config::get()->ALLOW_SELFASSIGN_INSTITUTE && $values['perms'] === 'user') : ?>
<a href="<?=$controller->url_for('my_institutes/decline_inst/'.$instid)?>"> <a href="<?= $controller->decline_inst($instid) ?>">
<?= Icon::create('door-leave', 'inactive', ['title' => _("aus der Einrichtung austragen")])->asImg(20) ?> <?= Icon::create('door-leave')->asImg(20, ['title' => _("aus der Einrichtung austragen")]) ?>
</a> </a>
<? else : ?> <? else : ?>
<?= Assets::img('blank.gif', ['size' => '20']) ?> <?= Assets::img('blank.gif', ['size' => '20']) ?>
...@@ -86,24 +94,3 @@ ...@@ -86,24 +94,3 @@
</tbody> </tbody>
</table> </table>
<? endif ?> <? 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);
...@@ -584,12 +584,12 @@ class MyRealmModel ...@@ -584,12 +584,12 @@ class MyRealmModel
* Get all user assigned institutes based on simple or map * Get all user assigned institutes based on simple or map
* @return array * @return array
*/ */
public static function getMyInstitutes() public static function getMyInstitutes(): array
{ {
$memberShips = InstituteMember::findByUser($GLOBALS['user']->id); $memberShips = InstituteMember::findByUser($GLOBALS['user']->id);
if (empty($memberShips)) { if (empty($memberShips)) {
return null; return [];
} }
$institutes = []; $institutes = [];
$insts = new SimpleCollection($memberShips); $insts = new SimpleCollection($memberShips);
......
...@@ -15,7 +15,7 @@ class CoreAdmin extends CorePlugin implements StudipModule ...@@ -15,7 +15,7 @@ class CoreAdmin extends CorePlugin implements StudipModule
public function getIconNavigation($course_id, $last_visit, $user_id) public function getIconNavigation($course_id, $last_visit, $user_id)
{ {
$navigation = new Navigation(_('Verwaltung'), 'dispatch.php/course/management'); $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; return $navigation;
} }
......
...@@ -21,7 +21,7 @@ class CoreCalendar extends CorePlugin implements StudipModule ...@@ -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 = 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; return $navigation;
} }
......
...@@ -38,7 +38,7 @@ class CoreDocuments extends CorePlugin implements StudipModule, OERModule ...@@ -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. * Now this module should put a copy of $material in its own area of the given course.
* @param OERMaterial $material * @param OERMaterial $material
* @param Course $course * @param Course $course
* @return void * @return array|FileType
*/ */
static public function oerModuleIntegrateMaterialToCourse(OERMaterial $material, Course $course) static public function oerModuleIntegrateMaterialToCourse(OERMaterial $material, Course $course)
{ {
...@@ -98,7 +98,7 @@ class CoreDocuments extends CorePlugin implements StudipModule, OERModule ...@@ -98,7 +98,7 @@ class CoreDocuments extends CorePlugin implements StudipModule, OERModule
_('Dateibereich'), _('Dateibereich'),
"dispatch.php/{$range_type}/files" "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) $condition = "INNER JOIN folders ON (folders.id = file_refs.folder_id)
WHERE folders.range_type = :range_type WHERE folders.range_type = :range_type
......
...@@ -53,7 +53,7 @@ class CoreElearningInterface extends CorePlugin implements StudipModule ...@@ -53,7 +53,7 @@ class CoreElearningInterface extends CorePlugin implements StudipModule
) )
]); ]);
} elseif ($result['count']) { } elseif ($result['count']) {
$nav->setImage(Icon::create('learnmodule', Icon::ROLE_INACTIVE), [ $nav->setImage(Icon::create('learnmodule', Icon::ROLE_CLICKABLE), [
'title' => sprintf( 'title' => sprintf(
ngettext( ngettext(
'%d Lernmodul', '%d Lernmodul',
......
...@@ -56,7 +56,7 @@ class CoreOverview extends CorePlugin implements StudipModule ...@@ -56,7 +56,7 @@ class CoreOverview extends CorePlugin implements StudipModule
]); ]);
$nav->setBadgeNumber($result['neue']); $nav->setBadgeNumber($result['neue']);
} elseif ($result['count']) { } elseif ($result['count']) {
$nav->setImage(Icon::create('news', Icon::ROLE_INACTIVE), [ $nav->setImage(Icon::create('news', Icon::ROLE_CLICKABLE), [
'title' => sprintf( 'title' => sprintf(
ngettext( ngettext(
'%d Ankündigung', '%d Ankündigung',
......
...@@ -38,7 +38,7 @@ class CoreParticipants extends CorePlugin implements StudipModule ...@@ -38,7 +38,7 @@ class CoreParticipants extends CorePlugin implements StudipModule
$first_nav = reset($sub_nav); $first_nav = reset($sub_nav);
$navigation = new Navigation($first_nav->getTitle(), $first_nav->getURL()); $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; return $navigation;
} }
...@@ -55,7 +55,7 @@ class CoreParticipants extends CorePlugin implements StudipModule ...@@ -55,7 +55,7 @@ class CoreParticipants extends CorePlugin implements StudipModule
} }
$navigation = new Navigation(_('Teilnehmende'), $url); $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 // Check permission, show no indicator if not at least tutor
if (!$GLOBALS['perm']->have_studip_perm('tutor', $course_id, $user_id)) { if (!$GLOBALS['perm']->have_studip_perm('tutor', $course_id, $user_id)) {
......
...@@ -60,7 +60,7 @@ class CoreSchedule extends CorePlugin implements StudipModule ...@@ -60,7 +60,7 @@ class CoreSchedule extends CorePlugin implements StudipModule
]); ]);
$nav->setBadgeNumber($result['neue']); $nav->setBadgeNumber($result['neue']);
} else { } else {
$nav->setImage(Icon::create('schedule', Icon::ROLE_INACTIVE), [ $nav->setImage(Icon::create('schedule', Icon::ROLE_CLICKABLE), [
'title' => sprintf( 'title' => sprintf(
ngettext( ngettext(
'%d Termin', '%d Termin',
......
...@@ -61,7 +61,7 @@ class CoreScm extends CorePlugin implements StudipModule ...@@ -61,7 +61,7 @@ class CoreScm extends CorePlugin implements StudipModule
); );
} }
} else { } else {
$image = Icon::create('infopage', Icon::ROLE_INACTIVE); $image = Icon::create('infopage', Icon::ROLE_CLICKABLE);
if ($result['count'] == 1) { if ($result['count'] == 1) {
$title = $scm->tab_name; $title = $scm->tab_name;
} else { } else {
......
...@@ -18,7 +18,7 @@ class CoreStudygroupAdmin extends CorePlugin implements StudipModule ...@@ -18,7 +18,7 @@ class CoreStudygroupAdmin extends CorePlugin implements StudipModule
public function getIconNavigation($course_id, $last_visit, $user_id) public function getIconNavigation($course_id, $last_visit, $user_id)
{ {
$navigation = new Navigation(_('Verwaltung'), "dispatch.php/course/studygroup/edit/?cid={$course_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; return $navigation;
} }
......
...@@ -17,7 +17,7 @@ class CoreStudygroupParticipants extends CorePlugin implements StudipModule ...@@ -17,7 +17,7 @@ class CoreStudygroupParticipants extends CorePlugin implements StudipModule
public function getIconNavigation($course_id, $last_visit, $user_id) public function getIconNavigation($course_id, $last_visit, $user_id)
{ {
$navigation = new Navigation(_('Teilnehmende'), "dispatch.php/course/studygroup/members/{$course_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) { 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)); $navigation->setImage(Icon::create('persons+new', Icon::ROLE_ATTENTION));
} }
......
...@@ -73,7 +73,7 @@ class CoreWiki extends CorePlugin implements StudipModule ...@@ -73,7 +73,7 @@ class CoreWiki extends CorePlugin implements StudipModule
$nav->setBadgeNumber($result['neue']); $nav->setBadgeNumber($result['neue']);
} else { } else {
$nav->setURL('wiki.php'); $nav->setURL('wiki.php');
$nav->setImage(Icon::create('wiki', Icon::ROLE_INACTIVE, [ $nav->setImage(Icon::create('wiki', Icon::ROLE_CLICKABLE, [
'title' => sprintf( 'title' => sprintf(
ngettext( ngettext(
'%d Wiki-Seite', '%d Wiki-Seite',
......
...@@ -101,7 +101,7 @@ class CoursewareModule extends CorePlugin implements SystemPlugin, StudipModule, ...@@ -101,7 +101,7 @@ class CoursewareModule extends CorePlugin implements SystemPlugin, StudipModule,
} }
} }
$nav = new Navigation(_('Courseware'), 'dispatch.php/course/courseware'); $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'), 'title' => _('Courseware'),
]); ]);
......
...@@ -62,7 +62,7 @@ class GradebookModule extends CorePlugin implements SystemPlugin, StudipModule ...@@ -62,7 +62,7 @@ class GradebookModule extends CorePlugin implements SystemPlugin, StudipModule
$icon = $changed $icon = $changed
? Icon::create('assessment+new', Icon::ROLE_NEW) ? 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 = new Navigation($title, 'dispatch.php/course/gradebook/overview');
$navigation->setImage($icon, ['title' => $title]); $navigation->setImage($icon, ['title' => $title]);
......
...@@ -82,7 +82,7 @@ class IliasInterfaceModule extends CorePlugin implements StudipModule, SystemPlu ...@@ -82,7 +82,7 @@ class IliasInterfaceModule extends CorePlugin implements StudipModule, SystemPlu
) )
]); ]);
} elseif ($result['count_modules']) { } elseif ($result['count_modules']) {
$nav->setImage(Icon::create('learnmodule', Icon::ROLE_INACTIVE), [ $nav->setImage(Icon::create('learnmodule', Icon::ROLE_CLICKABLE), [
'title' => sprintf( 'title' => sprintf(
ngettext( ngettext(
'%d Lernobjekt', '%d Lernobjekt',
...@@ -93,7 +93,7 @@ class IliasInterfaceModule extends CorePlugin implements StudipModule, SystemPlu ...@@ -93,7 +93,7 @@ class IliasInterfaceModule extends CorePlugin implements StudipModule, SystemPlu
) )
]); ]);
} elseif ($result['count_courses']) { } elseif ($result['count_courses']) {
$nav->setImage(Icon::create('learnmodule', Icon::ROLE_INACTIVE), [ $nav->setImage(Icon::create('learnmodule', Icon::ROLE_CLICKABLE), [
'title' => sprintf( 'title' => sprintf(
ngettext( ngettext(
'%d ILIAS-Kurs', '%d ILIAS-Kurs',
......
...@@ -42,7 +42,7 @@ class LtiToolModule extends CorePlugin implements StudipModule, SystemPlugin, Pr ...@@ -42,7 +42,7 @@ class LtiToolModule extends CorePlugin implements StudipModule, SystemPlugin, Pr
$icon = $changed $icon = $changed
? Icon::create('link-extern+new', Icon::ROLE_NEW) ? 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 = new Navigation($title, 'dispatch.php/course/lti');
$navigation->setImage($icon, ['title' => $title]); $navigation->setImage($icon, ['title' => $title]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment