diff --git a/app/controllers/admission/courseset.php b/app/controllers/admission/courseset.php index 67908df2e7f064a4baee4f795ef59710934588ae..86416309689e539f5cf6e3bef66baba2923e4162 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 3c3048d1b847b7450de8b96ab09f6f1fd84e9069..0a632f978ad2a47c1117f239693353a6d66c9b41 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 b91c842b6f5a39c3e18b53b1c4cd9f477dbe0549..60487246fb50ae37260252b9d4b08a0f31d90d73 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>