Skip to content

Allow members to retake quizzes #684

@victorandree

Description

@victorandree

Background

Right now, if you've taken a quiz (successfully), you cannot redo it. It would be useful, however, to retake a quiz as a refresher. For example, if the wood room is reopening, taking the relevant quizzes can be a good way to freshen up your knowledge.

This was brought up in this Slack thread: https://stockholmmakerspace.slack.com/archives/C4MM2M5EV/p1764326574309419.

What happens?

  • You can still load a quiz that you've taken, but when you press the Start! button, the call to GET quiz/quiz/1/next_question returns {"data":null,"status":"ok"}.
  • This moves the frontend component to the "done" state, rendering the completion screen.

The logic for filtering questions is driven by

@service.route("/quiz/<int:quiz_id>/next_question", method=GET, permission=USER)
, which filters out questions that the user has answered correctly.

The simplest solution is therefore probably for this endpoint to accept a timestamp parameter, ignoring questions answered before a point in time. This would be in line with the suggestion by @HalfVoxel in this Slack thread: https://stockholmmakerspace.slack.com/archives/C9LB8R8VB/p1764333141905889?thread_ts=1764332637.657959&cid=C9LB8R8VB.

The model for questions and answers supports multiple answers per question per member. But let's be careful about what might happen if there's >1 correct answer per question per member. Would it mess up any statistics, for example?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions