labmaker-plugin 0.0.270 → 0.0.272

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -823,14 +823,21 @@ const Oo = {
823
823
  pixelFormat(A) {
824
824
  return this.stepperStore.pixelFormat(A);
825
825
  },
826
- choicesComplete() {
827
- let A = document.querySelectorAll(".selectableButton");
828
- for (let c = 0; c < A.length; c++)
829
- A[c].classList.add("is-failure"), A[c].setAttribute("disabled", !0), this.content.choices[c].correct && A[c].classList.add("is-success");
830
- this.stepperStore.finishSteps();
826
+ choicesComplete(A) {
827
+ console.log("complete");
828
+ let c, e = "not correct", a = document.querySelectorAll(".selectableButton");
829
+ for (let i = 0; i < a.length; i++)
830
+ a[i].classList.add("is-failure"), a[i].setAttribute("disabled", !0), this.content.choices[i].correct && (a[i].classList.add("is-success"), c = this.content.choices[i].text);
831
+ A && (e = "correct");
832
+ let r = {
833
+ page: this.stepperStore.stepPage,
834
+ result: e,
835
+ correctAnswer: c
836
+ }, s = this.stepperStore.results.find((i) => i.page === this.stepperStore.stepPage), t = this.stepperStore.results.indexOf(s);
837
+ s ? this.stepperStore.results.fill(s.result = e, t, t++) : this.stepperStore.results.push(r), this.stepperStore.finishSteps();
831
838
  },
832
839
  choicesCheck(A) {
833
- this.getAttempt < Number(this.content.attempts) ? this.content.choices[A].correct === !0 ? (console.log(" it was true"), this.choicesComplete()) : this.stepperStore.attempts = this.getAttempt + 1 : (this.content.choices[A].correct !== !0 && (this.stepperStore.showFeedbackAttempts = !0), this.choicesComplete()), this.feedbackIndex = A, this.stepperStore.showFeedback = !0, setTimeout(() => {
840
+ this.getAttempt < Number(this.content.attempts) ? this.content.choices[A].correct === !0 ? this.choicesComplete(!0) : this.stepperStore.attempts = this.getAttempt + 1 : (this.content.choices[A].correct !== !0 && (this.stepperStore.showFeedbackAttempts = !0), this.choicesComplete(!1)), this.feedbackIndex = A, this.stepperStore.showFeedback = !0, setTimeout(() => {
834
841
  document.getElementById("feedbackClose") && document.getElementById("feedbackClose").focus();
835
842
  });
836
843
  },
@@ -843,7 +850,7 @@ const Oo = {
843
850
  this.content.choices = A;
844
851
  },
845
852
  showFeedback(A) {
846
- return this.stepperStore.getShowFeedback && this.feedbackIndex === A ? (this.content.choices[A].correct && this.choicesComplete(), !0) : !1;
853
+ return !!(this.stepperStore.getShowFeedback && this.feedbackIndex === A);
847
854
  }
848
855
  },
849
856
  mounted() {
@@ -919,7 +926,7 @@ function qo(A, c, e, a, r, s) {
919
926
  _: 1
920
927
  }, 8, ["id", "class"]);
921
928
  }
922
- const Yo = /* @__PURE__ */ t2(Oo, [["render", qo], ["__scopeId", "data-v-0f6d367e"]]);
929
+ const Yo = /* @__PURE__ */ t2(Oo, [["render", qo], ["__scopeId", "data-v-c7ebfbee"]]);
923
930
  const Jo = {
924
931
  components: {},
925
932
  props: ["content"],