From 463161ebfd669120ccd747db0c7df405ae2ace2c Mon Sep 17 00:00:00 2001
From: Jan-Hendrik Willms <tleilax+studip@gmail.com>
Date: Mon, 6 May 2024 07:14:06 +0000
Subject: [PATCH] fixes #4104

Closes #4104

Merge request studip/studip!2952
---
 app/controllers/admin/courseplanning.php      | 2 +-
 app/views/admin/courseplanning/pick_color.php | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/app/controllers/admin/courseplanning.php b/app/controllers/admin/courseplanning.php
index b8971e2de1a..44b372db7a3 100644
--- a/app/controllers/admin/courseplanning.php
+++ b/app/controllers/admin/courseplanning.php
@@ -82,7 +82,7 @@ class Admin_CourseplanningController extends AuthenticatedController
         foreach ($this->events as $event) {
             $start_date_time = explode('T', $event['start']);
             $time_elements = explode(':', $start_date_time[1]);
-            if (!$event['comform'] || $time_elements[0] % 2) {
+            if (!$event['conform'] || $time_elements[0] % 2) {
                 Sidebar::get()->getWidget('actions')->addLink(
                     _('Veranstaltungen außerhalb des Rasters'),
                     $this->nonconformURL(),
diff --git a/app/views/admin/courseplanning/pick_color.php b/app/views/admin/courseplanning/pick_color.php
index dbd93a8ea0d..61cc7fc1fd3 100644
--- a/app/views/admin/courseplanning/pick_color.php
+++ b/app/views/admin/courseplanning/pick_color.php
@@ -13,10 +13,12 @@
 
     <div id="event-color-picker"></div>
 
+<? if (!empty($semtype)): ?>
     <label>
         <input name="event_color_semtype" type="checkbox" value="1">
         <?= sprintf(_('Farbtyp für alle VA dieses Typs (%s) übernehmen'), htmlReady($semtype)) ?>
     </label>
+<? endif; ?>
 
     <div data-dialog-button>
         <?= Studip\Button::createAccept(_('Speichern'), 'save') ?>
-- 
GitLab