Question order not consistent

Created on 2 February 2023, almost 2 years ago
Updated 9 August 2024, 3 months ago

Problem/Motivation

When taking a quiz, the order of the questions are not consistent.

This is because when a quiz result is first created, it only sorts questions based on the "weight" field, which is always zero unless the user has manually dragged the questions around on the page, or set the question weight manually.

If you already have results in a quiz, you cannot easily go back and set the weights, either, because this page does not let you edit the order of existing quizzes.

Steps to reproduce

  1. Create a quiz.
  2. Create several questions, and put a number in the description. DO NOT DRAG THE ORDER OF THE QUESTIONS ON THE PAGE.
  3. Take the quiz multiple times. The questions sometimes come up with incorrect ordering.

Proposed resolution

Add another sort order to the query that loads up the questions for a new quiz.

Remaining tasks

Create patch.

User interface changes

None.

API changes

None.

Data model changes

It might be useful to sort questions by title -- but sorting by question id matches what happens in the editing interface.

πŸ› Bug report
Status

Fixed

Version

7.0

Component

Code - Quiz core

Created by

πŸ‡ΊπŸ‡ΈUnited States freelock Seattle

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

Comments & Activities

Production build 0.71.5 2024