Skip to content

Commit 1db3bd0

Browse files
MChoice bugfix: fix for JQuery removal forcing multiple answers
1 parent 3036471 commit 1db3bd0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • bases/rsptx/interactives/runestone/mchoice/js

bases/rsptx/interactives/runestone/mchoice/js/mchoice.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ export default class MultipleChoice extends RunestoneBase {
2525
this.useRunestoneServices = opts.useRunestoneServices;
2626
this.multipleanswers = false;
2727
this.divid = orig.id;
28-
if (this.origElem.getAttribute("data-multipleanswers") === "true" || this.origElem.hasAttribute("data-multipleanswers")) {
28+
if (this.parseBooleanAttribute(this.origElem, "data-multipleanswers")) {
2929
this.multipleanswers = true;
3030
}
3131
this.children = this.origElem.childNodes;
3232
this.random = false;
33-
if (this.origElem.hasAttribute("[data-random]") || this.origElem.hasAttribute("data-random")) {
33+
if (this.parseBooleanAttribute(this.origElem, "data-random")) {
3434
this.random = true;
3535
}
3636
this.correct = null;

0 commit comments

Comments
 (0)