From 99d7da316b3d5bb448bfcb79d90a22996e693e56 Mon Sep 17 00:00:00 2001 From: Rasmus Fuhse <fuhse@data-quest.de> Date: Tue, 4 Apr 2023 12:21:24 +0000 Subject: [PATCH] Resolve "Fragebogen: Likert komplett kaputt" Closes #2509 Merge request studip/studip!1697 --- .../questionnaire/question_types/likert/likert_evaluation.php | 2 +- .../question_types/rangescale/rangescale_evaluation.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/questionnaire/question_types/likert/likert_evaluation.php b/app/views/questionnaire/question_types/likert/likert_evaluation.php index fa8481f5cd8..9130e768e16 100644 --- a/app/views/questionnaire/question_types/likert/likert_evaluation.php +++ b/app/views/questionnaire/question_types/likert/likert_evaluation.php @@ -40,7 +40,7 @@ $options = $vote->questiondata['options']; foreach ($answers as $answer) { if ($answer['answerdata']['answers'][$key] == $option_index) { $hits++; - if ($answer['user_id'] && $answer['user_id'][0] !== 'n') { + if ($answer['user_id'] && $answer['user_id'][0] !== 'q' && $answer['user_id'][0] !== 'n') { $names[] = $answer->user->getFullName('full'); } } diff --git a/app/views/questionnaire/question_types/rangescale/rangescale_evaluation.php b/app/views/questionnaire/question_types/rangescale/rangescale_evaluation.php index 425e7e3d4ba..6a3947c26a7 100644 --- a/app/views/questionnaire/question_types/rangescale/rangescale_evaluation.php +++ b/app/views/questionnaire/question_types/rangescale/rangescale_evaluation.php @@ -40,7 +40,7 @@ $options = range($vote->questiondata['minimum'], $vote->questiondata['maximum']) foreach ($answers as $answer) { if ($answer['answerdata']['answers'][$key] == $option) { $hits++; - if ($answer['user_id'] && $answer['user_id'][0] !== 'n') { + if ($answer['user_id'] && $answer['user_id'][0] !== 'q' && $answer['user_id'][0] !== 'n') { $names[] = $answer->user->getFullName('full'); } } -- GitLab