Commit ccb5bfbc by Sarina Canelake

Merge pull request #6244 from wwj718/patch-1

variable name error
parents 5ef27703 90f32134
......@@ -183,3 +183,4 @@ Akiva Leffert <akiva@edx.org>
Mike Bifulco <mbifulco@aquent.com>
Jim Zheng <jimzheng@stanford.edu>
Afzal Wali <afzaledx@edx.org>
Wenjie Wu <wuwenjie718@gmail.com>
......@@ -1082,14 +1082,14 @@ def get_answers_distribution(request, course_key):
"""
course = get_course_with_access(request.user, 'staff', course_key)
dist = grades.answer_distributions(course.id)
course_answer_distributions = grades.answer_distributions(course.id)
dist = {}
dist['header'] = ['url_name', 'display name', 'answer id', 'answer', 'count']
dist['data'] = [
[url_name, display_name, answer_id, a, answers[a]]
for (url_name, display_name, answer_id), answers in sorted(dist.items())
for (url_name, display_name, answer_id), answers in sorted(course_answer_distributions.items())
for a in answers
]
return dist
......
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