Matching Question Not Evaluated in Quiz Results

Created on 20 May 2024, about 1 year ago

**Description:**
I encountered an issue with the Quiz module when using matching questions. After taking a quiz that includes a matching question, the quiz results section displays an incorrect score with a question mark. Specifically, it shows: `Score: ? of 2`. Upon inspecting the code, I found that the `q-waiting` class is added when `$entity` is not evaluated. However, the overall score for the quiz is calculated correctly.

**Steps to Reproduce:**
1. Install and enable the Quiz module.
2. Create a new quiz and add a question of type "Matching".
3. Take the quiz and submit your answers.
4. Navigate to the quiz results section.

**Expected Behavior:**
The quiz results should display the correct score for the matching question.

**Actual Behavior:**
The quiz results display an incorrect score with a question mark: `Score: ? of 2`. The `q-waiting` class is added to the question when `$entity` is not evaluated.

**Code Inspection:**
In the code of the Quiz module, the `q-waiting` class is added when `$entity` is not evaluated. This is causing the issue with the score display for matching questions.

**Additional Information:**
- Drupal version: 9.5.11
- Quiz module version: 6.x-dev"
- PHP version: 8.1.27

Attached screenshot for your reference

πŸ“Œ Task
Status

Active

Version

9.5

Component
OtherΒ  β†’

Last updated about 19 hours ago

Created by

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024