This commit is contained in:
Ross
2021-08-19 11:45:08 +01:00
parent d3fcef5492
commit c435042c5f
2 changed files with 11 additions and 9 deletions
+4 -3
View File
@@ -1132,11 +1132,12 @@ def user_answer_delete_multiple(request):
return JsonResponse({"status": "error"})
def question_json_unbased(request, pk):
def question_review(request, pk, sk):
"""
No (file based) caching is enabled for unbased quesitons
Return a json representation of the question when the exam is active
"""
question = get_object_or_404(Rapid, pk=pk)
exam = get_object_or_404(Rapid, pk=pk)
question = exam.exam_questions.all()[sk]
question_json = question.get_question_json(based=False)
return JsonResponse(question_json)