Commit a8e14d11 by Sola Committed by Piotr Mitros

faulty onStudentSubmission for hangout

parent 2c6f303f
...@@ -16,13 +16,13 @@ function CrowdsourceHinter(runtime, element){ ...@@ -16,13 +16,13 @@ function CrowdsourceHinter(runtime, element){
Logger.listen('seq_goto', null, stopScript); Logger.listen('seq_goto', null, stopScript);
//read the data from the problem_graded event here //read the data from the problem_graded event here
function get_event_data(event_type, data, element){ //function get_event_data(event_type, data, element){
console.log("is this still changing"); // console.log("is this still changing");
onStudentSubmission(data); // onStudentSubmission(data);
} //}
Logger.listen('problem_graded', null, get_event_data); //Logger.listen('problem_graded', null, get_event_data);
function onStudentSubmission(problem_graded_event_data){ function onStudentSubmission(event_type, problem_graded_event_data, element){
//This function will determine whether or not the student correctly answered the question. //This function will determine whether or not the student correctly answered the question.
//If it was correctly answered it will begin the process for giving feedback on hints. //If it was correctly answered it will begin the process for giving feedback on hints.
if (problem_graded_event_data[1].search(/class="correct/) === -1){ if (problem_graded_event_data[1].search(/class="correct/) === -1){
...@@ -63,6 +63,7 @@ function CrowdsourceHinter(runtime, element){ ...@@ -63,6 +63,7 @@ function CrowdsourceHinter(runtime, element){
}); });
} }
} }
Logger.listen('problem_graded', null, onStudentSubmission);
function seehint(result){ function seehint(result){
//Show a hint to the student after an incorrect answer is submitted. //Show a hint to the student after an incorrect answer is submitted.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment