diff --git a/HTML/Assets/Detectors/Lumilo/BKT_skill_and_error_tracker.js b/HTML/Assets/Detectors/Lumilo/BKT_skill_and_error_tracker.js index 31976d8..759733e 100644 --- a/HTML/Assets/Detectors/Lumilo/BKT_skill_and_error_tracker.js +++ b/HTML/Assets/Detectors/Lumilo/BKT_skill_and_error_tracker.js @@ -248,12 +248,20 @@ function receive_transaction( e ){ prevEq = reinsertParentheses(e.data.context.problem_name.replaceAll(" ", " \+ ").replaceAll("eq", " \= ").replaceAll("\\+", " \+ ")); } + if (e.data.tutor_data.selection.includes("solveLeft")){ + currLeft = "`" + currLeft + "~"; + } + if (e.data.tutor_data.selection.includes("solveRight")){ + currRight = "`" + currRight + "~"; + } + //needs to be expanded... currError = currLeft + " = " + currRight; transitionError = prevEq + " \\n " + currError; console.log("TRANSITION_ERROR: " + transitionError); + } if (currLeftCorrect==1 && currRightCorrect==1){ @@ -317,8 +325,11 @@ function receive_transaction( e ){ console.log(skill); updateSkillLevelsAttemptsErrors(e, skill, stepCounter[currStep]); - skillLevelsAttemptsErrors[skill][2].shift(); - skillLevelsAttemptsErrors[skill][2].push(transitionError); + if(e.data.tool_data.selection.includes("solve") && e.data.tutor_data.selection.includes(String(currRow)) && e.data.tutor_data.action_evaluation.toLowerCase() == "incorrect"){ + skillLevelsAttemptsErrors[skill][2].shift(); + skillLevelsAttemptsErrors[skill][2].push(transitionError); + + } } outputValue = format_areas_of_struggle_data(e) diff --git a/HTML/Assets/Detectors/Lumilo/Idle/idle.js b/HTML/Assets/Detectors/Lumilo/Idle/idle.js index 36e1087..dc83844 100644 --- a/HTML/Assets/Detectors/Lumilo/Idle/idle.js +++ b/HTML/Assets/Detectors/Lumilo/Idle/idle.js @@ -26,7 +26,7 @@ var mailer; //declare and/or initialize any other custom global variables for this detector here -var timerId3; +//var timerId3; var timerId4; var timerId5; @@ -49,7 +49,7 @@ function receive_transaction( e ){ detector_output.step_id = e.data.tutor_data.step_id; //custom processing (insert code here) - clearTimeout(timerId3); + //clearTimeout(timerId3); clearTimeout(timerId4); clearTimeout(timerId5); @@ -70,14 +70,14 @@ function receive_transaction( e ){ detector_output.transaction_id = e.data.transaction_id; //custom processing (insert code here) - timerId3 = setTimeout(function() { - detector_output.history = e.data.tool_data.tool_event_time - detector_output.value = "1, > 1 min" - detector_output.time = new Date(); - mailer.postMessage(detector_output); - postMessage(detector_output); - console.log("output_data = ", detector_output); }, - 60000) + // timerId3 = setTimeout(function() { + // detector_output.history = e.data.tool_data.tool_event_time + // detector_output.value = "1, > 1 min" + // detector_output.time = new Date(); + // mailer.postMessage(detector_output); + // postMessage(detector_output); + // console.log("output_data = ", detector_output); }, + // 60000) timerId4 = setTimeout(function() { detector_output.history = e.data.tool_data.tool_event_time detector_output.value = "1, > 2 min" @@ -138,14 +138,14 @@ self.onmessage = function ( e ) { console.log("output_data = ", detector_output); - timerId3 = setTimeout(function() { - detector_output.history = "onLoad" - detector_output.value = "1, > 1 min" - detector_output.time = new Date(); - mailer.postMessage(detector_output); - postMessage(detector_output); - console.log("output_data = ", detector_output); }, - 60000) + // timerId3 = setTimeout(function() { + // detector_output.history = "onLoad" + // detector_output.value = "1, > 1 min" + // detector_output.time = new Date(); + // mailer.postMessage(detector_output); + // postMessage(detector_output); + // console.log("output_data = ", detector_output); }, + // 60000) timerId4 = setTimeout(function() { detector_output.history = "onLoad" detector_output.value = "1, > 2 min" diff --git a/HTML/Assets/Detectors/Lumilo/current_problem_history.js b/HTML/Assets/Detectors/Lumilo/current_problem_history.js index b6c2541..ea390b4 100644 --- a/HTML/Assets/Detectors/Lumilo/current_problem_history.js +++ b/HTML/Assets/Detectors/Lumilo/current_problem_history.js @@ -37,6 +37,7 @@ var runningSolution = ""; var solutionStages = ""; var runningSolutionMinusCurrentLine = ""; var stepCounter = {}; +var usedHint = {}; //for each step, track whether a student has used a hint on this step // // // @@ -90,6 +91,15 @@ function receive_transaction( e ){ stepCounter[currStep] = 1; } + if(e.data.tutor_data.action_evaluation.toLowerCase()=="hint"){ + if(currStep in usedHint){ + usedHint[currStep] += 1; + } + else{ + usedHint[currStep] = 1; + } + } + // if (e.data.tool_data.selection.includes("solve")){ @@ -113,8 +123,11 @@ function receive_transaction( e ){ currLeft = "[" + currLeft + "]"; } else{ - if(stepCounter[currStep] != 1){ - currLeft = "[*] " + currLeft; + if(currStep in usedHint){ + currLeft = "`" + String(usedHint[currStep]) + "~ " + currLeft; + } + else{ + currLeft = " " + currLeft; } } } @@ -124,8 +137,11 @@ function receive_transaction( e ){ currRight = "[" + currRight + "]"; } else{ - if(stepCounter[currStep] != 1){ - currRight = currRight + " [*]"; + if(currStep in usedHint){ + currRight = currRight + " `" + String(usedHint[currStep]) + "~"; + } + else{ + currRight = currRight + " "; } } }