From f0443b84b16281d98ad3cd125e1a1b7681bd1111 Mon Sep 17 00:00:00 2001 From: mihretue Date: Mon, 17 Aug 2026 17:20:16 +0000 Subject: [PATCH] fix(exam): lock the exam form to CHOICE when administration is Online MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Matches the new backend rule (online_exam_requires_choice_form) — picking Online in the exam form now auto-sets Form to Choice and disables that field with an explanatory hint, instead of letting the user pick Essay and only finding out at save time. Co-Authored-By: Claude Sonnet 5 --- .../app/features/exam/pages/ExamPage/index.tsx | 15 ++++++++++++++- apps/backoffice/src/app/i18n/locales/am.ts | 1 + apps/backoffice/src/app/i18n/locales/en.ts | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/apps/backoffice/src/app/features/exam/pages/ExamPage/index.tsx b/apps/backoffice/src/app/features/exam/pages/ExamPage/index.tsx index ed58a449c..75d6243ef 100644 --- a/apps/backoffice/src/app/features/exam/pages/ExamPage/index.tsx +++ b/apps/backoffice/src/app/features/exam/pages/ExamPage/index.tsx @@ -254,6 +254,12 @@ function ExamForm({ onChange={setForm} size="sm" required + disabled={adminMethod === "ONLINE"} + description={ + adminMethod === "ONLINE" + ? t("exam.form.onlineChoiceOnlyHint") + : undefined + } />