# Database of hints. hints are stored as such: {"incorrect_answer": {"hint": rating}}. each key (incorrect answer)
# has a corresponding dictionary (in which hints are keys and the hints' ratings are the values).
hint_database=Dict(default={'answer':{'Try doing something new':5,'you should go review that lesson again':0}},scope=Scope.user_state_summary)
# This is a dictionary of hints that will be used to determine what hints to show a student.
# flagged hints are not included in this dictionary of hints
HintsToUse=Dict({},scope=Scope.user_state)
# TODO: Remove default values once done testing
hint_database=Dict(default={'answer':{'Try doing something new':5,'you should go review that lesson again':0},"answer2":{'new answer hint':3,"You should go look in your notes":6,"This is a hint that should be flagged":-4}},scope=Scope.user_state_summary)
# This is a list of incorrect answer submissions made by the student. this list is mostly used for
# feedback, to find which incorrect answer's hint a student voted on.
WrongAnswers=List([],scope=Scope.user_state)
...
...
@@ -32,7 +30,7 @@ class CrowdXBlock(XBlock):
# student's incorrect answer within the hint_database dictionary (i.e. no students have made hints for the
$('#hintstoshow'+student_answer).append("<p id=\"hintstoshow"+student_answer+"\"data-value=\""+student_answer+"\"> <b>No hints exist in the database. (You received a default hint)</p> <p id=\""+hint_used+"\"data-value=\""+student_answer+"\" </p>");
}
//data of student answer and hints are stored in the paragraphs/buttons
//so that when a button is clicked, the answer and hint can be sent to the python script
$('.showHintsFor'+student_answer).append("<p class=\".showHintsFor"+student_answer+"\"data-value=\""+student_answer+"\"> <b>No hints exist in the database. (You received a default hint)</p> <p id=\""+hint_used+"\"data-value=\""+student_answer+"\" </p>");