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

fixes #4222

Closes #4222

Merge request studip/studip!3053
parent 387222b6
No related branches found
No related tags found
No related merge requests found
......@@ -22,14 +22,10 @@ class BrowseNavigation extends Navigation
*/
public function __construct()
{
global $user, $perm;
global $perm;
$courselink = null;
// check if logged in
$coursetext = '';
$courseinfo = '';
$courselink = null;
if (is_object($user) && $user->id != 'nobody') {
if (User::findCurrent()) {
$coursetext = _('Veranstaltungen');
$courseinfo = _('Meine Veranstaltungen & Einrichtungen');
......@@ -37,14 +33,15 @@ class BrowseNavigation extends Navigation
$courselink = 'dispatch.php/admin/courses';
}
} else {
$coursetext = _('Freie');
$coursetext = _('Freie Veranstaltungen');
$courseinfo = _('Freie Veranstaltungen');
$courselink = 'dispatch.php/public_courses';
}
parent::__construct($coursetext, $courselink);
if (!Context::getId()) {
$this->setImage(Icon::create('seminar', 'navigation', ["title" => $courseinfo]));
$this->setImage(Icon::create('seminar', Icon::ROLE_NAVIGATION, ['title' => $courseinfo]));
}
}
......
......@@ -28,15 +28,13 @@ class CourseNavigation extends Navigation
$this->range = $range;
global $user;
// check if logged in
if (User::findCurrent()) {
$coursetext = _('Veranstaltungen');
$courseinfo = _('Meine Veranstaltungen & Einrichtungen');
$courselink = 'dispatch.php/my_courses';
} else {
$coursetext = _('Freie');
$coursetext = _('Freie Veranstaltungen');
$courseinfo = _('Freie Veranstaltungen');
$courselink = 'dispatch.php/public_courses';
}
......
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