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
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user