sillsdev / appbuilder-pwa

Progress Web App template for Scripture App Builder
https://software.sil.org/scriptureappbuilder
MIT License
8 stars 26 forks source link

Quiz questions can be configured to be shuffled. #554

Closed davidmoore1 closed 3 months ago

davidmoore1 commented 4 months ago

Prerequisite: Issue #500 Implement Basic Quiz Functionality

The quiz can be configured to shuffle the questions. The questions are defined in a set order in the original quiz file. When this option is true, then the questions should appear in some random order so that the quiz gives a different order each time it is run. Each question should appear once and only once in a run of the quiz.

For this feature, the quiz feature "shuffle-questions" should be set to "true"

<book id="QUIZ1" type="quiz">
  <name>Premier quiz</name>
  <abbrev>Quiz 1</abbrev>

  <font-choice type="book-collection" />
  <quiz>
    <features type="quiz">
      <feature name="shuffle-questions" value="true"/>
      <feature name="auto-advance" value="false"/>
      <feature name="auto-advance-delay" value="2000"/>
      <feature name="access-type" value="after"/>
      <feature name="access-after" value="QU2"/>
    </features>
  </quiz>
chrisvire commented 3 months ago

@davidmoore1 How does the app builder turn on/off shuffling of questions in SAB?

chrisvire commented 3 months ago

It looks like this feature is currently not exposed through SAB. We can still honor the setting so that it will work when it is (or if someone manually edits the .appDef file.