diff options
| author | Rasmus Fuhse <fuhse@data-quest.de> | 2026-03-10 16:02:20 +0000 |
|---|---|---|
| committer | Rasmus Fuhse <fuhse@data-quest.de> | 2026-03-10 16:02:20 +0000 |
| commit | 46a45e6ef5d8700e93b3a37dc9ee0e829711fa85 (patch) | |
| tree | 6bc513a6c9c3a31efc2ab445fd06b44bda001036 /app/views/course/timesrooms/createCycle.php | |
| parent | f3fcc1394286888697f20fc22822debf6707d72c (diff) | |
Resolve "Art des Termins wird überschrieben bei Stapelverarbeitung von Terminen"
Closes #6340
Merge request studip/studip!4805
Diffstat (limited to 'app/views/course/timesrooms/createCycle.php')
| -rw-r--r-- | app/views/course/timesrooms/createCycle.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/views/course/timesrooms/createCycle.php b/app/views/course/timesrooms/createCycle.php index c226ab1..2ba98c7 100644 --- a/app/views/course/timesrooms/createCycle.php +++ b/app/views/course/timesrooms/createCycle.php @@ -40,8 +40,14 @@ <label> <?= _('Art') ?> <select name="course_type" id="course_type" class="size-s"> + <? if (!$cycle->isNew() && count(array_unique($types)) !== 1) : ?> + <!-- Use default as placeholder to avoid accidentally overwrite of modified course_type --> + <option value="default" selected>-</option> + <? endif ?> <? foreach ($GLOBALS['TERMIN_TYP'] as $id => $value) : ?> - <option value="<?= $id ?>" <? if(Request::get('course_type') && Request::get('course_type') == $id) :?>selected="selected"<? endif?>><?= htmlReady($value['name']) ?></option> + <option value="<?= htmlReady($id) ?>" <? if(count(array_unique($types)) === 1 && $types[0] == $id) echo 'selected'; ?>> + <?= htmlReady($value['name']) ?> + </option> <? endforeach ?> </select> </label> |
