aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Hackl <hackl@data-quest.de>2022-04-07 14:12:52 +0000
committerThomas Hackl <hackl@data-quest.de>2022-04-07 14:12:52 +0000
commit574d990f6b019e87912971bd06fb4b5ac3db74c9 (patch)
treeec6a9950a3ac25bae13116be1b05fd81fb80ee51
parent04e73511edcd769780227a19dda6d3d89572a3ce (diff)
TIC #879
-rw-r--r--app/controllers/admission/courseset.php3
-rw-r--r--app/views/admission/courseset/configure.php2
-rw-r--r--app/views/admission/courseset/configure_courses.php8
3 files changed, 12 insertions, 1 deletions
diff --git a/app/controllers/admission/courseset.php b/app/controllers/admission/courseset.php
index 67908df..8641630 100644
--- a/app/controllers/admission/courseset.php
+++ b/app/controllers/admission/courseset.php
@@ -380,6 +380,9 @@ class Admission_CoursesetController extends AuthenticatedController
$this->set_id = $courseset->getId();
$this->courses = Course::findMany($courseset->getCourses(), "ORDER BY VeranstaltungsNummer, Name");
$this->applications = AdmissionPriority::getPrioritiesStats($courseset->getId());
+
+ $this->participant_restriction = $courseset->hasAdmissionRule('ParticipantRestrictedAdmission');
+
$distinct_members = [];
$multi_members = [];
foreach($this->courses as $course) {
diff --git a/app/views/admission/courseset/configure.php b/app/views/admission/courseset/configure.php
index 3c3048d..0a632f9 100644
--- a/app/views/admission/courseset/configure.php
+++ b/app/views/admission/courseset/configure.php
@@ -115,7 +115,7 @@ if ($flash['error']) {
<div id="instcourses">
<?= $coursesTpl; ?>
</div>
- <? if (count($courseIds) && $courseset->getAdmissionRule('ParticipantRestrictedAdmission')) : ?>
+ <? if (count($courseIds)) : ?>
<div>
<?= LinkButton::create(_('Ausgewählte Veranstaltungen konfigurieren'),
$controller->url_for('admission/courseset/configure_courses/' . $courseset->getId()),
diff --git a/app/views/admission/courseset/configure_courses.php b/app/views/admission/courseset/configure_courses.php
index b91c842..6048724 100644
--- a/app/views/admission/courseset/configure_courses.php
+++ b/app/views/admission/courseset/configure_courses.php
@@ -7,12 +7,16 @@
<th><?= _("versteckt")?></th>
<th><?= _("vorläufige Anmeldung")?></th>
<th><?= _("verbindliche Anmeldung")?></th>
+ <? if ($participant_restriction) : ?>
<th><?= _("max. Teilnehmende")?></th>
+ <? endif ?>
<th><?= _("Teilnehmende aktuell")?></th>
<th><?= _("Anmeldungen")?></th>
+ <? if ($participant_restriction) : ?>
<th><?= _("Warteliste")?></th>
<th><?= _("Plätze")?></th>
<th><?= _("Nachrücken")?></th>
+ <? endif ?>
</tr>
</thead>
<tbody>
@@ -26,9 +30,12 @@
<td><input <?=$editable?> type="checkbox" name="configure_courses_hidden[<?= $course->id?>]" value="1" <?= $course->visible ? '' : 'checked'?>></td>
<td><input <?=$editable?> type="checkbox" name="configure_courses_prelim[<?= $course->id?>]" value="1" <?= $course->admission_prelim ? 'checked' : ''?>></td>
<td><input <?=$editable?> type="checkbox" name="configure_courses_binding[<?= $course->id?>]" value="1" <?= $course->admission_binding ? 'checked' : ''?>></td>
+ <? if ($participant_restriction) : ?>
<td><input <?=$editable?> type="text" size="2" name="configure_courses_turnout[<?= $course->id?>]" value="<?= (int)$course->admission_turnout ?>"></td>
+ <? endif ?>
<td><?= $course->getNumParticipants() ?></td>
<td><?= sprintf("%d / %d", $applications[$course->id]['c'],$applications[$course->id]['h']) ?></td>
+ <? if ($participant_restriction) : ?>
<td style="white-space:nowrap">
<input <?=$editable?> type="checkbox" name="configure_courses_disable_waitlist[<?= $course->id?>]" value="1" <?= $course->admission_disable_waitlist ? '' : 'checked' ?>
title="<?= htmlReady(sprintf(_('Warteliste für %s aktivieren'), $course->name)) ?>"
@@ -48,6 +55,7 @@
title="<?= htmlReady(sprintf(_('Aktivieren des automatischen Nachrückens aus der Warteliste für %s'), $course->name)) ?>"
<? if (!$course->admission_disable_waitlist_move) echo 'checked'; ?>>
</td>
+ <? endif ?>
</tr>
<? endforeach ?>
</tbody>