Skip to content

Commit 95a750f

Browse files
committed
debug
1 parent dc688c6 commit 95a750f

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

src/components/Firebase.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -233,13 +233,13 @@ class Firebase {
233233
dynamicHint,
234234
bioInfo,
235235
masteryScore = null,
236-
kcMastery = null,
237-
confirmationMode = "none"
236+
kcMastery = null
238237
) {
239238
if (!DO_LOG_DATA) {
240239
console.debug("Not using firebase for logging (2)");
241240
return;
242241
}
242+
const confirmationMode = this.ltiContext?.confirmationMode ?? "none";
243243
console.debug("trying to log hint: ", hint, "step", step);
244244
if (Array.isArray(hintsFinished) && Array.isArray(hintsFinished[0])) {
245245
hintsFinished = hintsFinished.map((step) => step.join(", "));
@@ -258,7 +258,6 @@ class Firebase {
258258
hintsFinished,
259259
variabilization,
260260
lesson,
261-
confirmationMode,
262261
masteryScore,
263262
kcMastery,
264263
knowledgeComponents: step?.knowledgeComponents,
@@ -284,10 +283,10 @@ class Firebase {
284283
dynamicHint,
285284
bioInfo,
286285
masteryScore = null,
287-
kcMastery = null,
288-
confirmationMode = "none"
286+
kcMastery = null
289287
) {
290288
if (!DO_LOG_DATA) return;
289+
const confirmationMode = this.ltiContext?.confirmationMode ?? "none";
291290
console.debug("step", step);
292291
const data = {
293292
eventType: "hintScaffoldLog",
@@ -304,7 +303,6 @@ class Firebase {
304303
dynamicHint,
305304
bioInfo,
306305
variabilization,
307-
confirmationMode,
308306
masteryScore,
309307
kcMastery,
310308
lesson,
@@ -354,8 +352,9 @@ class Firebase {
354352
return this.writeData("mouseMovement", data);
355353
}
356354

357-
startedProblem(problemID, courseName, lesson, lessonObjectives, confirmationMode = "none") {
355+
startedProblem(problemID, courseName, lesson, lessonObjectives) {
358356
if (!DO_LOG_DATA) return;
357+
const confirmationMode = this.ltiContext?.confirmationMode ?? "none";
359358
console.debug(
360359
`Logging that the problem has been started (${problemID})`
361360
);
@@ -400,9 +399,9 @@ class Firebase {
400399
variables,
401400
courseName,
402401
steps,
403-
lesson,
404-
confirmationMode = "none"
402+
lesson
405403
) {
404+
const confirmationMode = this.ltiContext?.confirmationMode ?? "none";
406405
const data = {
407406
problemID,
408407
problemFinished,

0 commit comments

Comments
 (0)