Skip to content

Commit

Permalink
detector updates after recent design study, small bug fixes for deep …
Browse files Browse the repository at this point in the history
…dive detectors
  • Loading branch information
d19fe8 committed Jul 19, 2017
1 parent 473e867 commit fe822f0
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 24 deletions.
15 changes: 13 additions & 2 deletions HTML/Assets/Detectors/Lumilo/BKT_skill_and_error_tracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down Expand Up @@ -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)
Expand Down
36 changes: 18 additions & 18 deletions HTML/Assets/Detectors/Lumilo/Idle/idle.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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);

Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
24 changes: 20 additions & 4 deletions HTML/Assets/Detectors/Lumilo/current_problem_history.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
//
//
//
Expand Down Expand Up @@ -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")){
Expand All @@ -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;
}
}
}
Expand All @@ -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 + " ";
}
}
}
Expand Down

0 comments on commit fe822f0

Please sign in to comment.