Commit 010d2def by Sola Committed by Piotr Mitros

fixed variable names

parent ffeeddc2
......@@ -261,11 +261,11 @@ class CrowdXBlock(XBlock):
rating = self.change_rating(data_hint, int(data_rating), answer_data) # change hint rating
if str(rating) == str(0):
# if the rating is "0", return "zzeerroo" instead. "0" showed up as "null" in JS
return {"rating": str('zzeerroo'), 'origdata': original_data}
return {"rating": str('zzeerroo'), 'student_answer': original_data}
else:
return {"rating": str(rating), 'origdata': original_data}
return {"rating": str(rating), 'student_answer': original_data}
else:
return {"rating": str('You have already voted on this hint!'), 'origdata': original_data}
return {"rating": str('You have already voted on this hint!'), 'student_answer': original_data}
def hint_flagged(self, data_hint, answer_data):
"""
......
......@@ -206,7 +206,7 @@ function CrowdXBlock(runtime, element){
if(canhint == 0){
canhint = 1;
$('.Thankyou', element).text("Thankyou for your help!");
idtouse = String('thisparagraph' + result.origdata);
idtouse = String('thisparagraph' + result.student_answer);
hint_rating = result.rating;
if(result.rating == "zzeerroo"){
hint_rating = 0;
......
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