Skip to content

Commit

Permalink
fixed capitalization of "currTimeMessage" variable in checkTimeElapse…
Browse files Browse the repository at this point in the history
…d function
  • Loading branch information
d19fe8 committed Jul 5, 2017
1 parent 39cac68 commit 5433353
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -335,31 +335,31 @@ function secondsSince(initTime){
function checkTimeElapsed(initTime) {
var timeDiff = secondsSince(initTime);
var currTimeMessage = detector_output.value.split(',')[1];
if( timeDiff > (300-seedTime) && currTimemessage!=" > 5 min"){
if( timeDiff > (300-seedTime) && currTimeMessage!=" > 5 min"){
detector_output.history = JSON.stringify([attemptWindow, skillLevelsAttempts, initTime, onboardSkills]);
detector_output.value = "1, > 5 min, " + elaborationString;
detector_output.time = new Date();
mailer.postMessage(detector_output);
postMessage(detector_output);
console.log("output_data = ", detector_output);
}
else if( timeDiff > (120-seedTime) && currTimemessage!=" > 2 min"){
else if( timeDiff > (120-seedTime) && currTimeMessage!=" > 2 min"){
detector_output.history = JSON.stringify([attemptWindow, skillLevelsAttempts, initTime, onboardSkills]);
detector_output.value = "1, > 2 min, " + elaborationString;
detector_output.time = new Date();
mailer.postMessage(detector_output);
postMessage(detector_output);
console.log("output_data = ", detector_output);
}
else if( timeDiff > (60-seedTime) && currTimemessage!=" > 1 min"){
else if( timeDiff > (60-seedTime) && currTimeMessage!=" > 1 min"){
detector_output.history = JSON.stringify([attemptWindow, skillLevelsAttempts, initTime, onboardSkills]);
detector_output.value = "1, > 1 min, " + elaborationString;
detector_output.time = new Date();
mailer.postMessage(detector_output);
postMessage(detector_output);
console.log("output_data = ", detector_output);
}
else if( timeDiff > (45-seedTime) && currTimemessage!=" > 45 s"){
else if( timeDiff > (45-seedTime) && currTimeMessage!=" > 45 s"){
detector_output.history = JSON.stringify([attemptWindow, skillLevelsAttempts, initTime, onboardSkills]);
detector_output.value = "1, > 45 s, " + elaborationString;
detector_output.time = new Date();
Expand All @@ -368,7 +368,7 @@ function checkTimeElapsed(initTime) {
console.log("output_data = ", detector_output);
}
else{
if(currTimemessage!=" > " + seedTime.toString() + " s")
if(currTimeMessage!=" > " + seedTime.toString() + " s")
detector_output.history = JSON.stringify([attemptWindow, skillLevelsAttempts, initTime, onboardSkills]);
detector_output.value = "1, > " + seedTime.toString() + " s, " + elaborationString;
detector_output.time = new Date();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,31 +40,31 @@ function secondsSince(initTime){
function checkTimeElapsed(initTime) {
var timeDiff = secondsSince(initTime);
var currTimeMessage = detector_output.value.split(',')[1];
if( timeDiff > (300-seedTime) && currTimemessage!=" > 5 min"){
if( timeDiff > (300-seedTime) && currTimeMessage!=" > 5 min"){
detector_output.history = JSON.stringify([attemptWindow, initTime]);
detector_output.value = "1, > 5 min, " + elaborationString;
detector_output.time = new Date();
mailer.postMessage(detector_output);
postMessage(detector_output);
console.log("output_data = ", detector_output);
}
else if( timeDiff > (120-seedTime) && currTimemessage!=" > 2 min"){
else if( timeDiff > (120-seedTime) && currTimeMessage!=" > 2 min"){
detector_output.history = JSON.stringify([attemptWindow, initTime]);
detector_output.value = "1, > 2 min, " + elaborationString;
detector_output.time = new Date();
mailer.postMessage(detector_output);
postMessage(detector_output);
console.log("output_data = ", detector_output);
}
else if( timeDiff > (60-seedTime) && currTimemessage!=" > 1 min"){
else if( timeDiff > (60-seedTime) && currTimeMessage!=" > 1 min"){
detector_output.history = JSON.stringify([attemptWindow, initTime]);
detector_output.value = "1, > 1 min, " + elaborationString;
detector_output.time = new Date();
mailer.postMessage(detector_output);
postMessage(detector_output);
console.log("output_data = ", detector_output);
}
else if( timeDiff > (45-seedTime) && currTimemessage!=" > 45 s"){
else if( timeDiff > (45-seedTime) && currTimeMessage!=" > 45 s"){
detector_output.history = JSON.stringify([attemptWindow, initTime]);
detector_output.value = "1, > 45 s, " + elaborationString;
detector_output.time = new Date();
Expand All @@ -73,7 +73,7 @@ function checkTimeElapsed(initTime) {
console.log("output_data = ", detector_output);
}
else{
if(currTimemessage!=" > " + seedTime.toString() + " s")
if(currTimeMessage!=" > " + seedTime.toString() + " s")
detector_output.history = JSON.stringify([attemptWindow, initTime]);
detector_output.value = "1, > " + seedTime.toString() + " s, " + elaborationString;
detector_output.time = new Date();
Expand Down
10 changes: 5 additions & 5 deletions HTML/Assets/Detectors/Lumilo/System_Misuse/system_misuse.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,31 +54,31 @@ function secondsSince(initTime){
function checkTimeElapsed(initTime) {
var timeDiff = secondsSince(initTime);
var currTimeMessage = detector_output.value.split(',')[1];
if( timeDiff > (300-seedTime) && currTimemessage!=" > 5 min"){
if( timeDiff > (300-seedTime) && currTimeMessage!=" > 5 min"){
detector_output.history = JSON.stringify([attemptWindow, initTime]);
detector_output.value = "1, > 5 min, " + elaborationString;
detector_output.time = new Date();
mailer.postMessage(detector_output);
postMessage(detector_output);
console.log("output_data = ", detector_output);
}
else if( timeDiff > (120-seedTime) && currTimemessage!=" > 2 min"){
else if( timeDiff > (120-seedTime) && currTimeMessage!=" > 2 min"){
detector_output.history = JSON.stringify([attemptWindow, initTime]);
detector_output.value = "1, > 2 min, " + elaborationString;
detector_output.time = new Date();
mailer.postMessage(detector_output);
postMessage(detector_output);
console.log("output_data = ", detector_output);
}
else if( timeDiff > (60-seedTime) && currTimemessage!=" > 1 min"){
else if( timeDiff > (60-seedTime) && currTimeMessage!=" > 1 min"){
detector_output.history = JSON.stringify([attemptWindow, initTime]);
detector_output.value = "1, > 1 min, " + elaborationString;
detector_output.time = new Date();
mailer.postMessage(detector_output);
postMessage(detector_output);
console.log("output_data = ", detector_output);
}
else if( timeDiff > (45-seedTime) && currTimemessage!=" > 45 s"){
else if( timeDiff > (45-seedTime) && currTimeMessage!=" > 45 s"){
detector_output.history = JSON.stringify([attemptWindow, initTime]);
detector_output.value = "1, > 45 s, " + elaborationString;
detector_output.time = new Date();
Expand All @@ -87,7 +87,7 @@ function checkTimeElapsed(initTime) {
console.log("output_data = ", detector_output);
}
else{
if(currTimemessage!=" > " + seedTime.toString() + " s")
if(currTimeMessage!=" > " + seedTime.toString() + " s")
detector_output.history = JSON.stringify([attemptWindow, initTime]);
detector_output.value = "1, > " + seedTime.toString() + " s, " + elaborationString;
detector_output.time = new Date();
Expand Down

0 comments on commit 5433353

Please sign in to comment.