From 54dbf11a35cac0de6fed1c50114c9583d210a40e Mon Sep 17 00:00:00 2001
From: Thomas Hackl <hackl@data-quest.de>
Date: Mon, 12 Dec 2022 14:58:32 +0000
Subject: [PATCH] Resolve "Fehler in der Veranstaltungsansicht - Neue
 HTML-Struktur"

Closes #1860

Merge request studip/studip!1232
---
 templates/header.php | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/templates/header.php b/templates/header.php
index ec2e0831670..a234358627c 100644
--- a/templates/header.php
+++ b/templates/header.php
@@ -276,6 +276,7 @@ if ($navigation) {
         <? endif; ?>
 
         <?
+        $public_hint = '';
         if (is_object($GLOBALS['user']) && $GLOBALS['user']->id != 'nobody') {
             // only mark course if user is logged in and free access enabled
             $is_public_course = Context::isCourse() && Config::get()->ENABLE_FREE_ACCESS;
@@ -289,9 +290,9 @@ if ($navigation) {
                 // indicate to the template that this course is publicly visible
                 // need to handle institutes separately (always visible)
                 if (isset($GLOBALS['SessSemName']['class']) && $GLOBALS['SessSemName']['class'] === 'inst') {
-                    $header_template->public_hint = _('öffentliche Einrichtung');
+                    $public_hint = _('öffentliche Einrichtung');
                 } else if (Course::findCurrent()->lesezugriff == 0) {
-                    $header_template->public_hint = _('öffentliche Veranstaltung');
+                    $public_hint = _('öffentliche Veranstaltung');
                 }
             }
         }
-- 
GitLab