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

fixes #3978

Closes #3978

Merge request studip/studip!2828
parent 5d2d1934
No related branches found
No related tags found
No related merge requests found
......@@ -126,7 +126,8 @@ class ModulesNotification
$navigation = MyRealmModel::getAdditionalNavigations($seminar_id, $s_data, null, $user_id, $visit_data[$seminar_id]);
$n_data = [];
foreach ($this->registered_notification_modules as $id => $m_data) {
if (in_array($id, $s_data['notification'])
if (
in_array($id, $s_data['notification'])
&& isset($navigation[$id])
&& $navigation[$id]->getImage()
&& $navigation[$id]->getImage()->getRole() === Icon::ROLE_ATTENTION
......@@ -168,14 +169,14 @@ class ModulesNotification
$base_url = URLHelper::setBaseURL('');
URLHelper::setBaseURl($base_url);
if ($nav instanceof Navigation && $nav->isVisible(true)) {
$url = 'seminar_main.php?again=yes&auswahl=' . $seminar_id . '&redirect_to=' . strtr($nav->getURL(), '?', '&');
$icon = $nav->getImage();
$text = $nav->getTitle();
if (!$text) {
$text = $this->registered_notification_modules[$id]['name'];
}
$text .= ' - ' . $nav->getLinkAttributes()['title'];
return compact('text', 'url', 'icon', 'seminar_id');
$url = 'seminar_main.php?again=yes&auswahl=' . $seminar_id . '&redirect_to=' . strtr($nav->getURL(), '?', '&');
$icon = $nav->getImage();
$text = $nav->getTitle();
if (!$text) {
$text = $this->registered_notification_modules[$id]['name'];
}
$text .= ' - ' . $nav->getLinkAttributes()['title'];
return compact('text', 'url', 'icon', 'seminar_id');
}
}
}
......@@ -94,7 +94,7 @@
<? foreach ($news as $sem_titel => $data) : ?>
<tr class="table_header_bold">
<td style="font-weight: bold;">
<a href="<?= URLHelper::getLink('seminar_main.php', ['again' => 'yes', 'sso' => $sso, 'auswahl' => $data[0]['range_id']]) ?>">
<a href="<?= URLHelper::getLink('seminar_main.php', ['again' => 'yes', 'sso' => $sso, 'auswahl' => $data[0]['seminar_id']]) ?>">
<?= htmlReady($sem_titel) ?>
<?= (($semester = Course::find($data[0]['range_id'])->semester_text) ? ' ('.$semester.')' : '') ?>
</a>
......
......@@ -14,7 +14,7 @@
<? foreach ($news as $sem_titel => $data) : ?>
<?= sprintf(_("In der Veranstaltung \"%s\" gibt es folgende Neuigkeiten:"), $sem_titel) ?>
<?= URLHelper::getURL('seminar_main.php', ['again' => 'yes', 'sso' => $sso, 'auswahl' => $data[0]['range_id']]) ?>
<?= URLHelper::getURL('seminar_main.php', ['again' => 'yes', 'sso' => $sso, 'auswahl' => $data[0]['seminar_id']]) ?>
<? foreach ($data as $module) : ?>
......
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