diff options
author | ankitjavalkar | 2016-11-18 16:10:22 +0530 |
---|---|---|
committer | ankitjavalkar | 2016-12-21 18:12:52 +0530 |
commit | 15de9ce5fe9d1e456bfae60090807a77c6afef0a (patch) | |
tree | 8f7d8c96da853ed8629b50305da099bf51f75095 /yaksh/views.py | |
parent | 77e8a6c1cde9190daf9075d71caf6017dc1380e7 (diff) | |
download | online_test-15de9ce5fe9d1e456bfae60090807a77c6afef0a.tar.gz online_test-15de9ce5fe9d1e456bfae60090807a77c6afef0a.tar.bz2 online_test-15de9ce5fe9d1e456bfae60090807a77c6afef0a.zip |
Fix output rendering in the question
Diffstat (limited to 'yaksh/views.py')
-rw-r--r-- | yaksh/views.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/yaksh/views.py b/yaksh/views.py index 89274df..c330a75 100644 --- a/yaksh/views.py +++ b/yaksh/views.py @@ -493,9 +493,9 @@ def check(request, q_id, attempt_num=None, questionpaper_id=None): question.get_maximum_test_case_weight()) \ if question.partial_grading and question.type == 'code' else question.points new_answer.correct = correct - new_answer.error = result.get('error') + new_answer.error = json.dumps(result.get('error')) else: - new_answer.error = result.get('error') + new_answer.error = json.dumps(result.get('error')) new_answer.marks = (question.points * result['weight'] / question.get_maximum_test_case_weight()) \ if question.partial_grading and question.type == 'code' else 0 @@ -1036,7 +1036,7 @@ def grade_user(request, quiz_id=None, user_id=None, attempt_number=None): user = User.objects.get(id=user_id) data = AnswerPaper.objects.get_user_data(user, questionpaper_id, attempt_number - ) + ) context = {'data': data, "quiz_id": quiz_id, "users": user_details, "attempts": attempts, "user_id": user_id |