fix: crash on empty-quiz overview and answer-mapping, use FlashType enum consistently

- fetchWithQuestionsAndCandidates / fetchWithQuestions used INNER JOINs on
  questions/answers, so quizzes with no questions threw NoResultException (500)
  when opening the overview tab. Switched to LEFT JOINs.
- answerMapping bare \assert() replaced with a proper flash + redirect when
  the quiz has no questions, instead of crashing with AssertionError.
- Three raw 'success' flash strings in QuizController replaced with FlashType::Success.
- Added Dutch translation for "This quiz has no questions yet".
- Two new tests: empty-quiz overview loads (200), answer-mapping redirects with flash.
This commit is contained in:
2026-07-04 22:44:33 +02:00
parent 4c242b0980
commit f6988f4d77
4 changed files with 363 additions and 8 deletions
+4
View File
@@ -621,6 +621,10 @@
<source>This quiz has already been filled in and can no longer be altered</source>
<target>Deze quiz is al ingevuld en kan niet meer worden gewijzigd</target>
</trans-unit>
<trans-unit id="Xq9rT2p" resname="This quiz has no questions yet">
<source>This quiz has no questions yet</source>
<target>Deze test heeft nog geen vragen</target>
</trans-unit>
<trans-unit id="Dptvysv" resname="Time">
<source>Time</source>
<target>Tijd</target>