# Return whatever the module wanted to return to the client/caller
returnHttpResponse(ajax_return)
defgrade_histogram(module_id):
''' Print out a histogram of grades on a given problem.
Part of staff member debug info.
'''
fromdjango.dbimportconnection,transaction
cursor=connection.cursor()
cursor.execute("select courseware_studentmodule.grade,COUNT(courseware_studentmodule.student_id) from courseware_studentmodule where courseware_studentmodule.module_id=%s group by courseware_studentmodule.grade",[module_id])
grades=list(cursor.fetchall())
printgrades
grades.sort(key=lambdax:x[0])# Probably not necessary