Closed christianp closed 4 years ago
Hi, I would like to work on this issue
@artemdou Thanks! Please have a look at our guidelines on contributing to Numbas
Hi, I've been working on this issue for a while now but something is going wrong when I test whether it is able to load or not and I can't seem to fix it. I changed the chooseQuestionSubset, makeQuestionList, and load methods in runtime/scripts/exam.js as well as the initQuestionList in themes/default/files/scripts/exam-display.js and thought the shuffling is working fine when I exit the test and try to reload it, it shows me the loading bar but never the actual test. Do you have any idea what is going wrong because I can't think of where the problem may occur?
@artemdou thanks for sticking with this! If you make a pull request, I can look at your code and find the problem.
@christianp Hi, as you may have seen I already made a pull request in this repository and it seems to be working fine so I started changing the editor repository, adding a suffleQuestionGroups field and I come across this error
Unable to process binding "checked: function(){return shuffleQuestionGroups }" Message: shuffleQuestionGroups is not defined
The new field is modeled after the showQuestionGroupNames property so I don't understand what I am missing. If you could take a look and give me some direction I would really appreciate it
@artemdou for the problem with the editor: if you're inside a foreach
block, you might need to use $parent.shuffleQuestionGroups
.
At the moment, you can ask for the questions inside question groups to appear in a random order, but you can't do the same with question groups themselves. You might want to do this so that you don't always get a question on the same topic at the start of the exam.
To do this:
bin/exam.py
, add a fieldshuffleQuestionGroups
and make sure it's loaded infromDATA
and output intoxml
.runtime/scripts/exam.js
, changechooseQuestionSubset
so it shuffles the groups, if necessary. You'll also need to change theload
method to restore the order of the groups, which will probably also involve changingsetSuspendData
inruntime/scripts/scorm-storage.js
to save the order of the question groups. Checking this works will require running an exam inside a SCORM player - I can do this if it's too much effort.