aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFinn Schneider <schneider@data-quest.de>2026-03-20 14:08:30 +0100
committerFinn Schneider <schneider@data-quest.de>2026-03-20 14:08:30 +0100
commit9e6cb0dcf75010bbd96efbfb5004c72b76b8a7d6 (patch)
treed92118a7e5ce5e0550161ba73443474f6fb75ff8
parente0bcedd0d35a0fc5cdf53dc64dc7a845f7accacd (diff)
archive study programs
-rw-r--r--app/controllers/evaluation/assign.php15
-rw-r--r--app/views/evaluation/archive/index.php12
2 files changed, 22 insertions, 5 deletions
diff --git a/app/controllers/evaluation/assign.php b/app/controllers/evaluation/assign.php
index 64b1d2a..e43c22d 100644
--- a/app/controllers/evaluation/assign.php
+++ b/app/controllers/evaluation/assign.php
@@ -120,8 +120,9 @@ class Evaluation_AssignController extends AuthenticatedController
$new_question = QuestionnaireQuestion::build($question->toArray());
$new_question->setId($new_question->getNewId());
$new_question->questionnaire_id = $questionnaire->getId();
- $new_question->questiondata = $question->questiondata;
+ //$new_question->questiondata = $question->questiondata;
$new_question->mkdate = time();
+ $new_question->chdate = time();
if (isset($question->template_question_id)) {
$new_question->template_question_id = $question->template_question_id;
} else {
@@ -149,15 +150,23 @@ class Evaluation_AssignController extends AuthenticatedController
}
);
+ $study_programs = [];
+ foreach (MvvCourse::get($course->getId())->getTrails(['Studiengang']) as $trail) {
+ if ($trail['Studiengang']) {
+ $study_programs[] = $trail['Studiengang']->name ?? '';
+ }
+ }
+
$eval->course_id = $course->getId();
$eval->template_id = $template_id;
$eval->questionnaire_id = $questionnaire_id;
$eval->semester_id = $GLOBALS['user']->cfg->MY_COURSES_SELECTED_CYCLE;
$eval->applied = 1;
$eval->course_metadata = json_encode([
- 'course_title' => $course->name,
+ 'course_title' => $course->name,
'evaluated_persons' => $persons,
- 'sem_nr' => $course->veranstaltungsnummer
+ 'sem_nr' => $course->veranstaltungsnummer,
+ 'study_programs' => $study_programs
]);
$eval->institute_id = $course->institut_id;
diff --git a/app/views/evaluation/archive/index.php b/app/views/evaluation/archive/index.php
index f72aded..7d11590 100644
--- a/app/views/evaluation/archive/index.php
+++ b/app/views/evaluation/archive/index.php
@@ -20,6 +20,7 @@ use Studip\Button;
<th data-sort="text" scope="col"><?= _('Titel') ?></th>
<th data-sort="text" scope="col"><?= _('Veranstaltung') ?></th>
<th data-sort="digit" scope="col"><?= _('Nr.') ?></th>
+ <th data-sort="text" scope="col"><?= _('Studiengang') ?></th>
<th data-sort="text" scope="col"><?= _('Evaluierte') ?></th>
<th data-sort="digit" scope="col"><?= _('Start') ?></th>
<th data-sort="digit" scope="col"><?= _('Ende') ?></th>
@@ -48,6 +49,13 @@ use Studip\Button;
<?= htmlReady($assignment->course_metadata['sem_nr']) ?>
</td>
<td>
+ <?php if (isset($assignment->course_metadata['study_programs'])) : ?>
+ <?php foreach ($assignment->course_metadata['study_programs'] as $program) : ?>
+ <?= htmlReady($program) ?><br/>
+ <?php endforeach ?>
+ <?php endif ?>
+ </td>
+ <td>
<?php if (isset($assignment->course_metadata['evaluated_persons'])) : ?>
<?php foreach ($assignment->course_metadata['evaluated_persons'] as $person) : ?>
<?= htmlReady($person) ?><br/>
@@ -67,7 +75,7 @@ use Studip\Button;
<?php endforeach ?>
<?php else : ?>
<tr>
- <td colspan="8" style="text-align: center">
+ <td colspan="9" style="text-align: center">
<?= _('Es stehen keine Evaluationen zur Verfügung.') ?>
</td>
</tr>
@@ -75,7 +83,7 @@ use Studip\Button;
</tbody>
<tfoot>
<tr>
- <td colspan="8">
+ <td colspan="9">
<?= Button::create(_("Löschen"), "bulkdelete", [
'formaction' => $controller->bulk('delete'),
'data-confirm' => _("Wirklich löschen?")