diff --git a/app/controllers/course/members.php b/app/controllers/course/members.php index 93aa5f88e62028ff05c50b80440c61d736104123..be4c19cf999592984942a4450ce172c5ef3c6a05 100644 --- a/app/controllers/course/members.php +++ b/app/controllers/course/members.php @@ -1093,7 +1093,7 @@ class Course_MembersController extends AuthenticatedController $users = []; if ($cmd === 'singleuser') { $users[] = $user_id; - } else { + } elseif (isset($this->flash['users']) && is_array($this->flash['users'])) { // create a usable array foreach ($this->flash['users'] as $user => $val) { if ($val) { diff --git a/app/views/course/gradebook/students/index.php b/app/views/course/gradebook/students/index.php index ac4c3709bea1b5d4640483dac95dd084f46a69c8..fb39eed1c6cb21257872380be1d1965700424347 100644 --- a/app/views/course/gradebook/students/index.php +++ b/app/views/course/gradebook/students/index.php @@ -1,3 +1,12 @@ +<?php +/** + * @var Course_Gradebook_StudentsController $controller + * @var float $total + * @var string[] $categories + * @var float[] $subtotals + * @var array<string, Grading\Definition> $groupedDefinitions + */ +?> <article class="gradebook-student"> <header> <h1><?= _("Gesamt") ?></h1> @@ -31,7 +40,7 @@ <tbody> <? foreach ($groupedDefinitions[$category] as $definition) { - $instance = $groupedInstances[$definition->id]; + $instance = $groupedInstances[$definition->id] ?? null; $grade = $controller->formatAsPercent($instance ? $instance->rawgrade : 0); $feedback = $instance ? $instance->feedback : ''; ?> diff --git a/app/views/questionnaire/question_types/vote/vote_evaluation.php b/app/views/questionnaire/question_types/vote/vote_evaluation.php index 6b8b2532ff8bcf67a3003c00c5dff940dbbe6746..6f97c04c2f27119aa0a35bd901072e1ff2c69e95 100644 --- a/app/views/questionnaire/question_types/vote/vote_evaluation.php +++ b/app/views/questionnaire/question_types/vote/vote_evaluation.php @@ -93,7 +93,7 @@ rsort($ordered_results); title="<?= _('Zeige wieder alle Ergebnisse ohne Filterung an.') ?>" onclick="STUDIP.Questionnaire.removeFilter('<?= htmlReady($vote['questionnaire_id']) ?>'); return false;"> <?= Icon::create('filter2', Icon::ROLE_CLICKABLE)->asImg(16, ['class' => 'text-bottom']) ?> - (<?= $percentage ?>% | <?= (int) $results[$key] ?>/<?= $countAnswers ?>) + (<?= $percentage ?>% | <?= (int) ($results[$key] ?? 0) ?>/<?= $countAnswers ?>) </a> <? else : ?> <a href=""