hints=Dict(default={"1":{"hint1":10,"hint2":0,"hint3":0,"hint4":0},"2":{"hint12":0,"hint22":0,"hints32":0}},scope=Scope.content)#All hints. sorted by type of mistake. type_of_incorrect_answer{"hint":rating, "hint":rating}
hints=Dict(default={"1":{"hint1":10,"hint2":0,"hint3":0,"hint4":0},"2":{"hint12":10,"hint22":0,"hints32":0}},scope=Scope.content)#All hints. sorted by type of mistake. type_of_incorrect_answer{"hint":rating, "hint":rating}
HintsToUse=Dict(default={},scope=Scope.user_state)#Dict of hints to provide user
WrongAnswers=List(default=[],scope=Scope.user_state)#List of mistakes made by user
DefaultHints=Dict(default={"hint":100,"hinttwo":10,"hintthree":0,"hintasdf":50,"aas;dklfj?":1000,"SuperDuperBestHint":10000},scope=Scope.content)#Default hints in case no incorrect answers in hints match the user's mistake
...
...
@@ -39,15 +39,20 @@ class CrowdXBlock(XBlock):
ifdata["submittedanswer"]notinself.hints:
self.hints[data["submittedanswer"]]={}#add user's incorrect answer to WrongAnswers
forkeyinself.hints:
print("key"+str(key))
temphints=str(self.hints[str(key)[0]])#perhaps a better way to do this exists, but for now this works