Question Set questions remain hidden after start

Created on 8 October 2021, almost 4 years ago
Updated 1 August 2025, about 1 month ago

Problem/Motivation

In a Question Set with an Introduction Page, the questions remain hidden after the user clicks the "Start Quiz" button. If it has no Introduction Page, it works fine.

Steps to reproduce

On a Drupal 9 site, create a content type with an H5P field.

  1. Create a Question Set with an Introduction Page.
  2. Take the Quiz.
  3. No Questions!
  1. Create a Question Set with no Introduction Page.
  2. Take the Quiz.
  3. Questions!

Proposed resolution

When displaying a QS with an Intro, the div with the questionset has a "hidden" class added to it. Then, when you click the "Start Quiz" button, the div with the intro screen gets hidden, and style="display: block; should be added to the questionset div to override the "hidden" class. At least, that's how it works in my Opigno 8.x version. The buggy one is on my Opigno 9.x site, which is using the dev-3150110-drupal-9-readyness fork version of the H5P module. Both are using version 1.17 of the Question Set library.

Remaining tasks

I think the operative code is in questionset.js around the initializeQuestion(); function, but I'm not smart enough with JavaScript to figure out what's wrong.

πŸ› Bug report
Status

Active

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States firstlut

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024