Skip to content

Commit b36caa3

Browse files
committed
Fix answer shuffling
1 parent 68e4a67 commit b36caa3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

jupyterquiz/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
All files in the package are distributed under the MIT License
1212
'''
1313

14-
__version__ = '2.9.5.1'
14+
__version__ = '2.9.5.2'
1515
from .dynamic import display_quiz, capture_responses

jupyterquiz/js/multiple_choice.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ function check_mc() {
204204
function make_mc(qa, shuffle_answers, outerqDiv, qDiv, aDiv, id) {
205205

206206
var shuffled;
207-
if (shuffle_answers == "True") {
207+
if (shuffle_answers == true) {
208208
//console.log(shuffle_answers+" read as true");
209209
shuffled = getRandomSubarray(qa.answers, qa.answers.length);
210210
} else {
@@ -283,6 +283,7 @@ function make_mc(qa, shuffle_answers, outerqDiv, qDiv, aDiv, id) {
283283
class MCQuestion extends Question {
284284
constructor(qa, id, idx, opts, rootDiv) { super(qa, id, idx, opts, rootDiv); }
285285
render() {
286+
//console.log("options.shuffleAnswers " + this.options.shuffleAnswers);
286287
const numCorrect = make_mc(
287288
this.qa,
288289
this.options.shuffleAnswers,

0 commit comments

Comments
 (0)