Skip to content
Snippets Groups Projects
Commit 574d990f authored by Thomas Hackl's avatar Thomas Hackl
Browse files

TIC #879

parent 04e73511
No related branches found
No related tags found
No related merge requests found
...@@ -380,6 +380,9 @@ class Admission_CoursesetController extends AuthenticatedController ...@@ -380,6 +380,9 @@ class Admission_CoursesetController extends AuthenticatedController
$this->set_id = $courseset->getId(); $this->set_id = $courseset->getId();
$this->courses = Course::findMany($courseset->getCourses(), "ORDER BY VeranstaltungsNummer, Name"); $this->courses = Course::findMany($courseset->getCourses(), "ORDER BY VeranstaltungsNummer, Name");
$this->applications = AdmissionPriority::getPrioritiesStats($courseset->getId()); $this->applications = AdmissionPriority::getPrioritiesStats($courseset->getId());
$this->participant_restriction = $courseset->hasAdmissionRule('ParticipantRestrictedAdmission');
$distinct_members = []; $distinct_members = [];
$multi_members = []; $multi_members = [];
foreach($this->courses as $course) { foreach($this->courses as $course) {
......
...@@ -115,7 +115,7 @@ if ($flash['error']) { ...@@ -115,7 +115,7 @@ if ($flash['error']) {
<div id="instcourses"> <div id="instcourses">
<?= $coursesTpl; ?> <?= $coursesTpl; ?>
</div> </div>
<? if (count($courseIds) && $courseset->getAdmissionRule('ParticipantRestrictedAdmission')) : ?> <? if (count($courseIds)) : ?>
<div> <div>
<?= LinkButton::create(_('Ausgewählte Veranstaltungen konfigurieren'), <?= LinkButton::create(_('Ausgewählte Veranstaltungen konfigurieren'),
$controller->url_for('admission/courseset/configure_courses/' . $courseset->getId()), $controller->url_for('admission/courseset/configure_courses/' . $courseset->getId()),
......
...@@ -7,12 +7,16 @@ ...@@ -7,12 +7,16 @@
<th><?= _("versteckt")?></th> <th><?= _("versteckt")?></th>
<th><?= _("vorläufige Anmeldung")?></th> <th><?= _("vorläufige Anmeldung")?></th>
<th><?= _("verbindliche Anmeldung")?></th> <th><?= _("verbindliche Anmeldung")?></th>
<? if ($participant_restriction) : ?>
<th><?= _("max. Teilnehmende")?></th> <th><?= _("max. Teilnehmende")?></th>
<? endif ?>
<th><?= _("Teilnehmende aktuell")?></th> <th><?= _("Teilnehmende aktuell")?></th>
<th><?= _("Anmeldungen")?></th> <th><?= _("Anmeldungen")?></th>
<? if ($participant_restriction) : ?>
<th><?= _("Warteliste")?></th> <th><?= _("Warteliste")?></th>
<th><?= _("Plätze")?></th> <th><?= _("Plätze")?></th>
<th><?= _("Nachrücken")?></th> <th><?= _("Nachrücken")?></th>
<? endif ?>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
...@@ -26,9 +30,12 @@ ...@@ -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_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_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> <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> <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><?= $course->getNumParticipants() ?></td>
<td><?= sprintf("%d / %d", $applications[$course->id]['c'],$applications[$course->id]['h']) ?></td> <td><?= sprintf("%d / %d", $applications[$course->id]['c'],$applications[$course->id]['h']) ?></td>
<? if ($participant_restriction) : ?>
<td style="white-space:nowrap"> <td style="white-space:nowrap">
<input <?=$editable?> type="checkbox" name="configure_courses_disable_waitlist[<?= $course->id?>]" value="1" <?= $course->admission_disable_waitlist ? '' : 'checked' ?> <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)) ?>" title="<?= htmlReady(sprintf(_('Warteliste für %s aktivieren'), $course->name)) ?>"
...@@ -48,6 +55,7 @@ ...@@ -48,6 +55,7 @@
title="<?= htmlReady(sprintf(_('Aktivieren des automatischen Nachrückens aus der Warteliste für %s'), $course->name)) ?>" title="<?= htmlReady(sprintf(_('Aktivieren des automatischen Nachrückens aus der Warteliste für %s'), $course->name)) ?>"
<? if (!$course->admission_disable_waitlist_move) echo 'checked'; ?>> <? if (!$course->admission_disable_waitlist_move) echo 'checked'; ?>>
</td> </td>
<? endif ?>
</tr> </tr>
<? endforeach ?> <? endforeach ?>
</tbody> </tbody>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment