Skip to content

Add learner-safe quiz question retrieval #1204

Open

Description

@KanishJebaMathewM

Context

Learn already supports quiz creation and question management. However, learners need a safe way to retrieve quiz questions without exposing the correct answers.

This can serve as the foundation for the learner-side quiz-taking workflow and the GSoC 2027 Offline-First Learning project.

Proposed Changes

  • Allow authenticated learners who are authorised to access an activity to retrieve its quiz questions.
  • Return question text and available options.
  • Never expose correct answers or internal answer-key data to learners.
  • Reuse existing authentication and activity access checks.
  • Add tests for successful retrieval, unauthenticated access, unauthorised access and answer confidentiality.

Acceptance Criteria

  • Authorised learners can retrieve quiz questions.
  • Unauthorised users cannot access protected quiz content.
  • Correct answers are never exposed in the learner response.
  • Existing quiz authoring functionality remains unaffected.
  • Relevant tests pass.

Scope

This issue covers backend question retrieval and its tests only.

Quiz attempts, answer submission, grading, frontend changes, IndexedDB and offline synchronisation are out of scope for this issue.

Relevant Files

  • learn/src/worker.py
  • learn/tests/test_quizzes.py

Activity

  1. added
    good first issue
    2026-11
    on Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    2026-11good first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions