.
This commit is contained in:
+17
-1
@@ -1142,4 +1142,20 @@ class SeriesImagesZipView(SuperuserRequiredMixin, BaseZipView):
|
||||
def get_files(self):
|
||||
series = LongSeries.objects.get(pk=self.kwargs['pk'])
|
||||
|
||||
return [i.image.file for i in series.images.all()]
|
||||
return [i.image.file for i in series.images.all()]
|
||||
|
||||
def question_review(request, pk):
|
||||
"""
|
||||
Return a json representation of the question when the exam is active
|
||||
"""
|
||||
if request.is_ajax():
|
||||
exam = get_object_or_404(Exam, pk=pk)
|
||||
|
||||
if not exam.publish_results:
|
||||
raise Http404
|
||||
|
||||
question = exam.exam_questions.all()[int(request.POST["question_number"])]
|
||||
|
||||
question_json = question.get_question_json(based=False)
|
||||
return JsonResponse(question_json)
|
||||
return JsonResponse({"status": "error"})
|
||||
|
||||
Reference in New Issue
Block a user