Show one question per card in the take-quiz screen, with prev/next arrows
Some checks failed
CI/CD / build-test-deploy (pull_request) Failing after 2s

Replaces the single long scrollable list of every question with one
card at a time plus arrow navigation, so a student's focus stays on
the current question instead of the whole quiz at once.
This commit is contained in:
danamir
2026-08-09 00:55:01 +03:00
parent 63bdd7dd74
commit ef119dc0dc
4 changed files with 89 additions and 20 deletions

View File

@@ -53,6 +53,9 @@ let rec update (token: string option) (msg: Msg) (model: Model) : Model * Cmd<Ms
updated, cmd
| AnswerSaved _ -> { model with Error = None }, Cmd.none
| AnswerSaveFailed(_, err) -> { model with Error = Some err }, Cmd.none
| GoToQuestion index ->
let clamped = index |> max 0 |> min (List.length model.Data.Questions - 1)
{ model with CurrentIndex = clamped }, Cmd.none
| Tick ->
let updated = { model with RemainingSeconds = remainingSeconds model.Data DateTimeOffset.UtcNow }
// The server is the actual authority (it now rejects any answer