From 7b4c9a0b1c6fc42dae86b4528797bd9b05f120cc Mon Sep 17 00:00:00 2001
From: "Torsten Schulz (local)"
Date: Wed, 15 Apr 2026 14:02:34 +0200
Subject: [PATCH] feat(vocabLesson): add detailed review section for failed
chapter exams
- Introduced a new review section that displays questions, user answers, and correct answers for failed chapter exams.
- Added localization entries for the review section in multiple languages, enhancing user experience and understanding of mistakes.
- Implemented logic to format and present failed exam details, improving feedback for learners.
---
.../src/i18n/locales/ceb/socialnetwork.json | 4 +
.../src/i18n/locales/de/socialnetwork.json | 4 +
.../src/i18n/locales/en/socialnetwork.json | 4 +
.../src/i18n/locales/es/socialnetwork.json | 4 +
.../src/i18n/locales/fr/socialnetwork.json | 4 +
frontend/src/views/social/VocabLessonView.vue | 82 +++++++++++++++++++
6 files changed, 102 insertions(+)
diff --git a/frontend/src/i18n/locales/ceb/socialnetwork.json b/frontend/src/i18n/locales/ceb/socialnetwork.json
index 83ef394..a5fcf57 100644
--- a/frontend/src/i18n/locales/ceb/socialnetwork.json
+++ b/frontend/src/i18n/locales/ceb/socialnetwork.json
@@ -572,6 +572,10 @@
"exerciseExamFailedTitle": "Wala naabot ang minimum nga score",
"exerciseExamFailedBody": "Naayo ka ug {score}% (kinahanglan: {target}%). Padayon pag-praktis sa learning section. Human sa {count} pa nga trainer questions ma-unlock na usab ang chapter test — sugdan nimo pag-usab ang tanan nga pangutana gikan sa sinugdanan.",
"exerciseExamFailedOk": "Okay",
+ "exerciseExamFailedReviewTitle": "Kini nga tubag sayop pa",
+ "exerciseExamFailedQuestionLabel": "Pangutana",
+ "exerciseExamFailedYourAnswerLabel": "Imong tubag",
+ "exerciseExamFailedNoAnswer": "Walay tubag",
"exerciseStatusOpen": "Ablihi",
"exerciseStatusCorrect": "Done",
"exerciseStatusRetry": "Try again",
diff --git a/frontend/src/i18n/locales/de/socialnetwork.json b/frontend/src/i18n/locales/de/socialnetwork.json
index a0c6dfb..c3b7623 100644
--- a/frontend/src/i18n/locales/de/socialnetwork.json
+++ b/frontend/src/i18n/locales/de/socialnetwork.json
@@ -544,6 +544,10 @@
"exerciseExamFailedTitle": "Mindestziel nicht erreicht",
"exerciseExamFailedBody": "Du hast {score}% der Fragen richtig beantwortet (Mindestziel: {target}%). Bitte übe weiter im Lernbereich. Nach {count} weiteren Trainerfragen ist die Kapitel-Prüfung wieder freigeschaltet – dann beginnst du mit allen Fragen von vorn.",
"exerciseExamFailedOk": "Verstanden",
+ "exerciseExamFailedReviewTitle": "Das war noch falsch",
+ "exerciseExamFailedQuestionLabel": "Frage",
+ "exerciseExamFailedYourAnswerLabel": "Deine Antwort",
+ "exerciseExamFailedNoAnswer": "Keine Antwort",
"exerciseStatusOpen": "Offen",
"exerciseStatusCorrect": "Erledigt",
"exerciseStatusRetry": "Nochmal prüfen",
diff --git a/frontend/src/i18n/locales/en/socialnetwork.json b/frontend/src/i18n/locales/en/socialnetwork.json
index 8c9c7f3..00af2bb 100644
--- a/frontend/src/i18n/locales/en/socialnetwork.json
+++ b/frontend/src/i18n/locales/en/socialnetwork.json
@@ -544,6 +544,10 @@
"exerciseExamFailedTitle": "Minimum score not reached",
"exerciseExamFailedBody": "You scored {score}% correct (required: {target}%). Keep practicing in the learning section. After {count} more trainer questions the chapter test unlocks again—you will then retake all questions from the start.",
"exerciseExamFailedOk": "OK",
+ "exerciseExamFailedReviewTitle": "These answers were wrong",
+ "exerciseExamFailedQuestionLabel": "Question",
+ "exerciseExamFailedYourAnswerLabel": "Your answer",
+ "exerciseExamFailedNoAnswer": "No answer",
"exerciseStatusOpen": "Open",
"exerciseStatusCorrect": "Done",
"exerciseStatusRetry": "Try again",
diff --git a/frontend/src/i18n/locales/es/socialnetwork.json b/frontend/src/i18n/locales/es/socialnetwork.json
index 62452a4..77e7976 100644
--- a/frontend/src/i18n/locales/es/socialnetwork.json
+++ b/frontend/src/i18n/locales/es/socialnetwork.json
@@ -542,6 +542,10 @@
"exerciseExamFailedTitle": "No alcanzaste la puntuación mínima",
"exerciseExamFailedBody": "Has acertado el {score}% (mínimo: {target}%). Sigue practicando en el área de aprendizaje. Tras {count} preguntas más del entrenador se desbloqueará de nuevo el test del capítulo y repetirás todas las preguntas desde el principio.",
"exerciseExamFailedOk": "Entendido",
+ "exerciseExamFailedReviewTitle": "Estas respuestas fueron incorrectas",
+ "exerciseExamFailedQuestionLabel": "Pregunta",
+ "exerciseExamFailedYourAnswerLabel": "Tu respuesta",
+ "exerciseExamFailedNoAnswer": "Sin respuesta",
"exerciseStatusOpen": "Pendiente",
"exerciseStatusCorrect": "Hecha",
"exerciseStatusRetry": "Revisar otra vez",
diff --git a/frontend/src/i18n/locales/fr/socialnetwork.json b/frontend/src/i18n/locales/fr/socialnetwork.json
index c895100..f07b2ef 100644
--- a/frontend/src/i18n/locales/fr/socialnetwork.json
+++ b/frontend/src/i18n/locales/fr/socialnetwork.json
@@ -542,6 +542,10 @@
"exerciseExamFailedTitle": "Score minimum non atteint",
"exerciseExamFailedBody": "Vous avez {score}% de bonnes réponses (minimum : {target}%). Continuez à vous entraîner dans la partie apprentissage. Après {count} questions supplémentaires dans l'entraîneur, le test du chapitre se débloque à nouveau et vous reprendrez toutes les questions depuis le début.",
"exerciseExamFailedOk": "Compris",
+ "exerciseExamFailedReviewTitle": "Réponses encore incorrectes",
+ "exerciseExamFailedQuestionLabel": "Question",
+ "exerciseExamFailedYourAnswerLabel": "Votre réponse",
+ "exerciseExamFailedNoAnswer": "Aucune réponse",
"exerciseStatusOpen": "Ouvrir",
"exerciseStatusCorrect": "Complété",
"exerciseStatusRetry": "Revérifier",
diff --git a/frontend/src/views/social/VocabLessonView.vue b/frontend/src/views/social/VocabLessonView.vue
index 1001694..baef318 100644
--- a/frontend/src/views/social/VocabLessonView.vue
+++ b/frontend/src/views/social/VocabLessonView.vue
@@ -957,6 +957,25 @@
target: exerciseTargetScore,
count: exerciseRetryUnlockAttempts
}) }}
+
+
{{ $t('socialnetwork.vocab.courses.exerciseExamFailedReviewTitle') }}
+
+ -
+
+ {{ $t('socialnetwork.vocab.courses.exerciseExamFailedQuestionLabel') }} {{ index + 1 }}:
+ {{ item.question }}
+
+
+ {{ $t('socialnetwork.vocab.courses.exerciseExamFailedYourAnswerLabel') }}:
+ {{ item.userAnswer || $t('socialnetwork.vocab.courses.exerciseExamFailedNoAnswer') }}
+
+
+ {{ $t('socialnetwork.vocab.courses.correctAnswer') }}:
+ {{ item.correctAnswer || '—' }}
+
+
+
+