diff --git a/generic/views.py b/generic/views.py index 73ab0a07..7e00a2a2 100644 --- a/generic/views.py +++ b/generic/views.py @@ -323,15 +323,21 @@ class ExamViews(View, LoginRequiredMixin): creation_time = exam.json_creation_time.isoformat() else: creation_time = "None" - active_exams["exams"].append( - { + + json = { "name": exam.get_exam_name(), "url": request.build_absolute_uri(exam.get_json_url()), "type": self.question_type, "eid": "{}/{}".format(self.question_type, exam.pk), "json_creation_time": creation_time } - ) + + if self.question_type == "long": + h = {} + for question in exam.questions.all(): + h[question.pk] = question.json_creation_time + json["multi_question_json"] = h + active_exams["exams"].append( json ) if json == False: return active_exams["exams"]