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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
|
<?php
/**
* @var Modul $modul
* @var string $affect_id
* @var int $type
* @var StgteilabschnittModul|null $abschnitt_modul
* @var string $code
* @var string $title
*/
$deskriptor = $modul->getDeskriptor($display_language ?? null);
?>
<table class="mvv-modul-details default nohover" data-mvv-id="<?= $modul->id ?>" data-mvv-type="modul">
<colgroup>
<col width="30%">
<col width="70%">
</colgroup>
<thead>
<tr>
<th class="mvv-modul-details-head" data-mvv-field="mvv_modul.code"><?= htmlReady($code ?: $modul->code) ?></th>
<th class="mvv-modul-details-head" data-mvv-field="mvv_modul.kp" style="text-align: right;"><?= sprintf("%d CP", $modul->getReplacedValue('kp')) ?></th>
</tr>
<? if ($modul->fassung_nr): ?>
<tr>
<th colspan="2" style="font-weight: normal;">
<?=
sprintf(_('In der Fassung des <b>%s</b>. Beschlusses vom <b>%s</b>.'),
'<span data-mvv-field="mvv_modul.fassung_nr">' . htmlReady($modul->fassung_nr) . '</span>',
'<span data-mvv-field="mvv_modul.beschlussdatum">' . date('d.m.Y', $modul->beschlussdatum) . '</span>'
)
?>
</th>
</tr>
<? endif; ?>
</thead>
<tbody>
<tr>
<td><strong><?= _('Modulbezeichnung') ?></strong></td>
<td data-mvv-field="mvv_modul.bezeichnung"><?= htmlReady($title ?: $deskriptor->bezeichnung) ?></td>
</tr>
<tr>
<td><strong><?= _('Modulcode') ?></strong></td>
<td data-mvv-field="mvv_modul.code"><?= htmlReady($code ?: $modul->code) ?></td>
</tr>
<tr>
<td><strong><?= _('Semester der erstmaligen Durchführung') ?></strong></td>
<td data-mvv-field="mvv_modul.start"><?= htmlReady($start_semester['name'] ?? '') ?></td>
</tr>
<? if (!empty($institute_name)) : ?>
<tr>
<td><strong><?= _('Fachbereich/Institut') ?></strong></td>
<td data-mvv-field="mvv_modul_inst"><?= htmlReady($institute_name) ?></td>
</tr>
<? endif; ?>
<tr>
<td><strong><?= _('Verwendet in Studiengängen / Semestern') ?></strong></td>
<td>
<? $trails = $modul->getTrails(['StgteilAbschnitt', 'StgteilVersion', 'Studiengang']); ?>
<? $trails = array_filter($trails, function ($trail) {
return $trail['Studiengang']->stat !== 'ausgelaufen';
}); ?>
<? if (count($trails)) : ?>
<? $pathes = $modul->getPathes($trails, ' > ') ?>
<? if (count($pathes) > 9) : ?>
<input type="checkbox" class="mvv-cb-more" id="cb_more_studycourses" checked>
<? endif; ?>
<ul>
<? foreach ($pathes as $i => $path) : ?>
<? $version = $trails[$i]['StgteilVersion']['version_id'] ?? null;?>
<? $statement = DBManager::get()->prepare(
'SELECT `mvv_stgteilabschnitt_modul`.`abschnitt_id` '
. 'FROM mvv_stgteilabschnitt_modul LEFT JOIN mvv_stgteilabschnitt USING(abschnitt_id) '
. 'WHERE modul_id = ? AND version_id = ?');
$statement->execute([$modul->getId(), $version]);
$res = $statement->fetchOne();
$affect_id = $res['abschnitt_id'] ?? null;
?>
<li data-mvv-field="mvv_stgteilabschnitt_modul" data-mvv-id="<?= $affect_id; ?>" data-mvv-cooid="<?= $modul->getId(); ?>">
<?= htmlReady($path)?>
<? if (empty($download) && count($pathes) > 9 && $i == 4) : ?>
<label class="cb-more-label" for="cb_more_studycourses"><?= _('mehr...') ?></label>
<? endif; ?>
</li>
<? endforeach; ?>
</ul>
<? endif; ?>
</td>
</tr>
<tr>
<td><strong><?= _('Modulverantwortliche/r') ?></strong></td>
<td>
<?
$modulVerantwortung = [];
foreach ($modul->contact_assignments->orderBy('position', SORT_NUMERIC) as $contact_assignment) {
if ($GLOBALS['MVV_MODUL']['PERSONEN_GRUPPEN']['values'][$contact_assignment->category]['visible']) {
if (!isset($modulVerantwortung[$contact_assignment->category])) {
$modulVerantwortung[$contact_assignment->category] = [
'name' => $GLOBALS['MVV_MODUL']['PERSONEN_GRUPPEN']['values'][$contact_assignment->category]['name'],
'users' => []
];
}
$modulVerantwortung[$contact_assignment->category]['contacts'][$contact_assignment->contact_id] = [
'name' => $contact_assignment->contact->getDisplayName(),
'id' => $contact_assignment->contact_id
];
}
}
?>
<? foreach ($modulVerantwortung as $group): ?>
<? foreach ($group['contacts'] as $contact): ?>
<div data-mvv-field="mvv_modul_user" data-mvv-coid="<?= $contact['id'] ?>">
<?= htmlReady($contact['name']) ?> (<?= htmlReady($group['name']) ?>)
</div>
<? endforeach; ?>
<? endforeach; ?>
</td>
</tr>
<? if (trim($deskriptor->getReplacedValue('verantwortlich'))): ?>
<tr>
<td><strong><?= _('Weitere verantwortliche Personen') ?></strong></td>
<td>
<?= formatReady($deskriptor->getReplacedValue('verantwortlich')) ?>
</td>
</tr>
<? endif; ?>
<tr>
<td><strong><?= _('Teilnahmevoraussetzungen') ?></strong></td>
<td data-mvv-field="mvv_modul_deskriptor.voraussetzung"><?= formatReady($deskriptor->getReplacedValue('voraussetzung')) ?></td>
</tr>
<tr>
<td><strong><?= _('Kompetenzziele') ?></strong></td>
<td data-mvv-field="mvv_modul_deskriptor.kompetenzziele"><?= formatReady($deskriptor->getReplacedValue('kompetenzziele')) ?></td>
</tr>
<tr>
<td><strong><?= _('Modulinhalte') ?></strong></td>
<td data-mvv-field="mvv_modul_deskriptor.inhalte"><?= formatReady($deskriptor->getReplacedValue('inhalte')) ?></td>
</tr>
<? if (!isset($type) || $type !== 3) : ?>
<tr>
<td><strong><?= ngettext('Lehrveranstaltungsform', 'Lehrveranstaltungsformen', count($modul->modulteile)) ?></strong></td>
<td data-mvv-field="mvv_modulteil_deskriptor.lernlehrform">
<? foreach ($modul->modulteile as $modulteil) : ?>
<? if (trim($modulteil->lernlehrform)) : ?>
<?= $GLOBALS['MVV_MODULTEIL']['LERNLEHRFORM']['values'][$modulteil->lernlehrform]['name'] ?>
<? if (trim($modulteil->sws) && trim($modulteil->sws) != '0') : ?>
(<?= htmlReady($modulteil->sws) . ' ' . _('SWS') ?>)
<? endif; ?>
<br>
<? endif; ?>
<? endforeach; ?>
</td>
</tr>
<? endif; ?>
<tr>
<td><strong><?= ngettext('Unterrichtssprache', 'Unterrichtsprachen', count($modul->languages)) ?></strong></td>
<td data-mvv-field="mvv_modul_language">
<?= htmlReady(implode(', ', $modul->languages->map(function (ModulLanguage $m) { return $m->getDisplayName(); }))); ?>
</td>
</tr>
<tr>
<td><strong><?= _('Dauer in Semestern') ?></strong></td>
<td data-mvv-field="mvv_modul.dauer"><?= htmlReady($modul->dauer) ?> <?= _('Semester') ?></td>
</tr>
<tr>
<td><strong><?= _('Angebotsrhythmus Modul') ?></strong></td>
<td data-mvv-field="mvv_modul_deskriptor.turnus"><?= htmlReady($deskriptor->turnus) ?></td>
</tr>
<tr>
<td><strong><?= _('Aufnahmekapazität Modul') ?></strong></td>
<td data-mvv-field="mvv_modul.kapazitaet">
<?= htmlReady(trim($modul->getReplacedValue('kapazitaet')) ?: _('unbegrenzt')) ?>
<?= MVVController::trim($deskriptor->getReplacedValue('kommentar_kapazitaet'))
? sprintf("(%s)", formatReady($deskriptor->getReplacedValue('kommentar_kapazitaet')))
: '' ?>
</td>
</tr>
<tr>
<td><strong><?= _('Prüfungsebene') ?></strong></td>
<td data-mvv-field="mvv_modul.pruef_ebene">
<?= htmlReady($GLOBALS['MVV_MODUL']['PRUEF_EBENE']['values'][$modul->getReplacedValue('pruef_ebene')] ?? '') ?>
</td>
</tr>
<tr>
<td><strong><?= _('Credit-Points') ?></strong></td>
<td data-mvv-field="mvv_modul.kp"><?= sprintf("%d CP", htmlReady($modul->getReplacedValue('kp'))) ?></td>
</tr>
<tr>
<td><strong><?= _('Modulabschlussnote') ?></strong></td>
<td>
<? if (!isset($type) || $type !== 3) : ?>
<? $nummer_modulteil = 1; ?>
<? $note = []; ?>
<? foreach ($modul->modulteile as $modulteil): ?>
<? // Für die Kenntlichmachung der Modulteile in Listen die Nummer des
// Modulteils und den ausgewählten Namen verwenden.
// Ist keine Nummer vorhanden, dann Durchnummerieren und Standard-
// Bezeichnung verwenden.
if (trim($modulteil->nummer)) {
$num_bezeichnung = $GLOBALS['MVV_MODULTEIL']['NUM_BEZEICHNUNG']['values'][$modulteil->num_bezeichnung]['name'];
$note[] = sprintf('%s %s: %s%%',
'<span data-mvv-id="'. $modulteil->getId().'" data-mvv-type="modulteil">' .
'<span data-mvv-field="mvv_modulteil.num_bezeichnung">' . htmlReady($num_bezeichnung) . '</span>',
'<span data-mvv-field="mvv_modulteil.nummer">' . htmlReady($modulteil->nummer) . '</span>',
'<span data-mvv-field="mvv_modulteil.anteil_note">' . htmlReady($modulteil->anteil_note) . '</span>' .
'</span>'
);
} else {
$num_bezeichnung_default = $GLOBALS['MVV_MODULTEIL']['NUM_BEZEICHNUNG']['default'];
$note[] = sprintf('%s %d: %s%%',
htmlReady($GLOBALS['MVV_MODULTEIL']['NUM_BEZEICHNUNG']['values'][$num_bezeichnung_default]['name']),
htmlReady($nummer_modulteil),
htmlReady($modulteil->anteil_note)
);
$nummer_modulteil++;
} ?>
<? endforeach; ?>
<? if (count($note)) : ?>
<?= implode('; ', $note) . '. ' ?>
<? endif; ?>
<? endif; ?>
<?= formatReady(trim($deskriptor->getReplacedValue('kommentar_note'))) ?>
</td>
</tr>
<tr>
<td><strong><?= _('Faktor der Modulnote für die Endnote des Studiengangs') ?></strong></td>
<td data-mvv-field="mvv_modul.faktor_note"><?= htmlReady($modul->getReplacedValue('faktor_note')) ?></td>
</tr>
<? if (trim($deskriptor->getReplacedValue('kommentar'))) : ?>
<tr>
<td><strong><?= _('Hinweise') ?></strong></td>
<td data-mvv-field="mvv_modul_deskriptor.kommentar"><?= formatReady($deskriptor->getReplacedValue('kommentar')) ?></td>
</tr>
<? endif; ?>
<? foreach ($deskriptor->datafields as $entry) : ?>
<? $df = $entry->getTypedDatafield(); ?>
<tr>
<td><strong><?= htmlReady($df->getName()) ?></strong></td>
<td><?= $df->getDisplayValue(); ?></td>
</tr>
<? endforeach; ?>
<? if ($abschnitt_modul) : ?>
<? $data_fields = $abschnitt_modul->datafields->filter(
fn(DatafieldEntryModel $d): bool => ($d->datafield->object_class ?? '') === '') ?>
<? foreach ($data_fields as $entry) : ?>
<? if (trim($entry->content)) : ?>
<? $df = $entry->getTypedDatafield(); ?>
<tr>
<td><strong><?= htmlReady($df->getName()) ?></strong></td>
<td><?= $df->getDisplayValue(); ?></td>
</tr>
<? endif; ?>
<? endforeach; ?>
<? endif; ?>
</tbody>
</table>
|