.
This commit is contained in:
+9
-7
@@ -1132,16 +1132,18 @@ def user_answer_delete_multiple(request):
|
||||
return JsonResponse({"status": "error"})
|
||||
|
||||
|
||||
def question_review(request, pk, sk):
|
||||
def question_review(request, pk):
|
||||
"""
|
||||
Return a json representation of the question when the exam is active
|
||||
"""
|
||||
exam = get_object_or_404(Exam, pk=pk)
|
||||
if request.is_ajax():
|
||||
exam = get_object_or_404(Exam, pk=pk)
|
||||
|
||||
if not exam.publish_results:
|
||||
raise Http404
|
||||
if not exam.publish_results:
|
||||
raise Http404
|
||||
|
||||
question = exam.exam_questions.all()[sk]
|
||||
question = exam.exam_questions.all()[request.POST["question_number"]]
|
||||
|
||||
question_json = question.get_question_json(based=False)
|
||||
return JsonResponse(question_json)
|
||||
question_json = question.get_question_json(based=False)
|
||||
return JsonResponse(question_json)
|
||||
return JsonResponse({"status": "error"})
|
||||
Reference in New Issue
Block a user