Quiz module incorrectly shows warning about attempts when no result exists

Created on 30 April 2025, 15 days ago

Problem/Motivation

When editing a quiz with no attempt results, the system still displays a warning that the quiz has attempts and should not be edited. This is misleading and prevents editing even when there are no actual attempt results.

Steps to reproduce

  1. Create two quizzes using the Quiz module (7.0.1).
  2. Add separate questions to each quiz.
  3. Do not make any quiz attempts.
  4. Try to edit the first quiz or one of its questions.

Proposed resolution

Check if the quiz actually has attempt results before showing the warning. The message should only appear if attempts truly exist, not just based on metadata or assumptions.

Remaining tasks

  • Confirm that the bug can be consistently reproduced.
  • Fix the condition that triggers the warning message.
  • Add automated test coverage if possible.

User interface changes

The warning message should only be shown when attempts exist. This improves usability and avoids confusion.

API changes

None.

Data model changes

None.

🐛 Bug report
Status

Active

Version

7.0

Component

Code - Quiz core

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024