blob: 5cb0a7d949405e4d83c1102f91095824b13e383b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
<?php
/**
* @var Admin_OverlappingController $controller
* @var SimpleORMapCollection $conflicts
* @var Modul $modul
* @var Semester $selected_semester
* @var Modulteil $modulteil
*/
?>
<? foreach ($modulteil->lvgruppen as $lvgruppe) : ?>
<? foreach ($lvgruppe->getAssignedCoursesBySemester($selected_semester->id, false) as $course) : ?>
<? $course_obj = Course::find($course['seminar_id']) ?>
<? foreach ($course_obj->cycles->findBy('metadate_id', $conflicts->pluck('base_metadate_id')) as $cycle) : ?>
<? $dates = $cycle->dates->filter(function ($c) use ($selected_semester) {
return ($selected_semester->beginn <= $c->date && $selected_semester->ende >= $c->date);
}); ?>
<li>
<? $id = md5($modul->abschnitt_id . $modulteil->id . $course['seminar_id']) ?>
<input id="<?= $id ?>" type="checkbox" checked>
<div class="mvv-ovl-title">
<label for="<?= $id ?>"></label>
<?= htmlReady($course_obj->VeranstaltungsNummer) ?>
<a href="<?= $controller->course_info($course_obj->id) ?>" data-dialog="">
<?= Icon::create('info-circle', Icon::ROLE_INFO, [
'class' => 'text-bottom',
'title' => _('Veranstaltungsdetails')
]) ?>
</a>
<?= htmlReady($course_obj->getFullName('type-name')) ?>
<? if ($course_obj->admission_turnout) : ?>
<?= sprintf(_('(erw. TN %s)'), htmlReady($course_obj->admission_turnout)) ?>
<? endif; ?>
<?= Icon::create('date-cycle', Icon::ROLE_INFO)->asImg(['class' => 'text-bottom']) ?>
<?= sprintf('%s (%sx)', $cycle->toString('short'), count($dates)); ?>
</div>
<ul>
<?= $this->render_partial('admin/overlapping/conflicts', ['cycle' => $cycle, 'base_modul' => $modul, 'selected_semester' => $selected_semester]) ?>
</ul>
</li>
<? endforeach; ?>
<? endforeach; ?>
<? endforeach; ?>
|