Skip to content
Snippets Groups Projects
Commit 4286183b authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

fixes #209

parent 064f64ed
No related branches found
No related tags found
No related merge requests found
<? foreach ($course_collection as $course): <? foreach ($course_collection as $course):
$teachers = CourseMember::findByCourseAndStatus($course['seminar_id'], 'dozent'); $teachers = CourseMember::findByCourseAndStatus($course['seminar_id'], 'dozent');
$collection = SimpleCollection::createFromArray($teachers); $dozenten = SimpleCollection::createFromArray($teachers)->map(function (CourseMember $teacher) {
$dozenten = $collection->map(function (CourseMember $teacher) { return $teacher->getUserFullname('no_title');
return [
'user_id' => $teacher->user_id,
'username' => $teacher->username,
'Nachname' => $teacher->nachname,
'fullname' => $teacher->getUserFullname('no_title_rev'),
];
}); });
$mvv_pathes = [];
if ($with_modules) { if ($with_modules) {
$trail_classes = ['Modulteil', 'StgteilabschnittModul', 'StgteilAbschnitt', 'StgteilVersion']; $trail_classes = ['Modulteil', 'StgteilabschnittModul', 'StgteilAbschnitt', 'StgteilVersion'];
$mvv_object_pathes = MvvCourse::get($course['seminar_id'])->getTrails($trail_classes); $mvv_object_pathes = MvvCourse::get($course['seminar_id'])->getTrails($trail_classes);
...@@ -31,6 +26,12 @@ ...@@ -31,6 +26,12 @@
} }
} }
} }
$mvv_pathes = array_map(function ($path) {
return implode(' > ', reset($path));
}, $mvv_pathes);
$mvv_pathes = array_unique($mvv_pathes);
sort($mvv_pathes);
$sem_class = $course['sem_class']; $sem_class = $course['sem_class'];
?> ?>
...@@ -52,18 +53,24 @@ ...@@ -52,18 +53,24 @@
<? if ($dozenten): ?> <? if ($dozenten): ?>
<tr> <tr>
<th><?= _('Lehrende') ?></th> <th><?= _('Lehrende') ?></th>
<td><? foreach ($dozenten as $dozent): ?> <td>
<?= $colon ? ', ' : '' ?><?= htmlReady($dozent['fullname']) ?><? $this->colon = true; ?> <ul>
<? endforeach; ?></td> <? foreach ($dozenten as $dozent): ?>
<li><?= htmlReady($dozent) ?></li>
<? endforeach; ?>
</ul>
</td>
</tr> </tr>
<? endif; ?> <? endif; ?>
<? if ($mvv_pathes): ?> <? if ($mvv_pathes): ?>
<tr nobr="true"> <tr nobr="true">
<th><?= _('Module') ?></th> <th><?= _('Module') ?></th>
<td> <td>
<? foreach ($mvv_pathes as $i => $mvv_path) : ?> <ul>
<span <? if ($i%2==1) echo 'style="background-color:#eaeaea;"'; ?>><?= htmlReady(implode(' > ', reset(array_values($mvv_path)))) ?></span><br> <? foreach ($mvv_pathes as $mvv_path) : ?>
<li><?= htmlReady($mvv_path) ?></li>
<? endforeach; ?> <? endforeach; ?>
</ul>
</td> </td>
</tr> </tr>
<? endif; ?> <? endif; ?>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment