Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit cfe243d

Browse files
committed
Make sure to provide an answer
1 parent 2f73dd1 commit cfe243d

File tree

1 file changed

+24
-23
lines changed

1 file changed

+24
-23
lines changed

runestone/clickableArea/js/clickable.js

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ export default class ClickableArea extends RunestoneBase {
173173
this.logBookEvent({
174174
event: "clickableArea",
175175
act: this.clickedIndexArray.join(";"),
176+
answer: this.clickedIndexArray.join(";"),
176177
div_id: this.divid,
177178
correct: storageObj.correct,
178179
});
@@ -276,7 +277,7 @@ export default class ClickableArea extends RunestoneBase {
276277
if (
277278
this.ccIndex < this.ccArray.length &&
278279
this.ccCounter ===
279-
Math.floor(this.ccArray[this.ccIndex].split(",")[0]) &&
280+
Math.floor(this.ccArray[this.ccIndex].split(",")[0]) &&
280281
Math.floor(this.ccArray[this.ccIndex].split(",")[1]) === 0
281282
) {
282283
this.manageNewClickable(tComponentArr[t].children[i]);
@@ -285,7 +286,7 @@ export default class ClickableArea extends RunestoneBase {
285286
} else if (
286287
this.ciIndex < this.ciArray.length &&
287288
this.ccCounter ===
288-
Math.floor(this.ciArray[this.ciIndex].split(",")[0]) &&
289+
Math.floor(this.ciArray[this.ciIndex].split(",")[0]) &&
289290
Math.floor(this.ciArray[this.ciIndex].split(",")[1]) === 0
290291
) {
291292
this.manageNewClickable(tComponentArr[t].children[i]);
@@ -302,13 +303,13 @@ export default class ClickableArea extends RunestoneBase {
302303
if (
303304
this.ccIndex < this.ccArray.length &&
304305
tmp ===
305-
Math.floor(
306-
this.ccArray[this.ccIndex].split(",")[1]
307-
) &&
306+
Math.floor(
307+
this.ccArray[this.ccIndex].split(",")[1]
308+
) &&
308309
this.ccCounter ===
309-
Math.floor(
310-
this.ccArray[this.ccIndex].split(",")[0]
311-
)
310+
Math.floor(
311+
this.ccArray[this.ccIndex].split(",")[0]
312+
)
312313
) {
313314
this.manageNewClickable(
314315
tComponentArr[t].children[i].children[j]
@@ -320,13 +321,13 @@ export default class ClickableArea extends RunestoneBase {
320321
} else if (
321322
this.ciIndex < this.ciArray.length &&
322323
tmp ===
323-
Math.floor(
324-
this.ciArray[this.ciIndex].split(",")[1]
325-
) &&
324+
Math.floor(
325+
this.ciArray[this.ciIndex].split(",")[1]
326+
) &&
326327
this.ccCounter ===
327-
Math.floor(
328-
this.ciArray[this.ciIndex].split(",")[0]
329-
)
328+
Math.floor(
329+
this.ciArray[this.ciIndex].split(",")[0]
330+
)
330331
) {
331332
this.manageNewClickable(
332333
tComponentArr[t].children[i].children[j]
@@ -430,15 +431,15 @@ export default class ClickableArea extends RunestoneBase {
430431
}
431432
$(this.feedBackDiv).html(
432433
"Incorrect. You clicked on " +
433-
this.correctNum +
434-
" of the " +
435-
this.correctArray.length.toString() +
436-
" correct elements and " +
437-
this.incorrectNum +
438-
" of the " +
439-
this.incorrectArray.length.toString() +
440-
" incorrect elements. " +
441-
this.feedback
434+
this.correctNum +
435+
" of the " +
436+
this.correctArray.length.toString() +
437+
" correct elements and " +
438+
this.incorrectNum +
439+
" of the " +
440+
this.incorrectArray.length.toString() +
441+
" incorrect elements. " +
442+
this.feedback
442443
);
443444
$(this.feedBackDiv).attr("class", "alert alert-danger");
444445
}

0 commit comments

Comments
 (0)