This commit is contained in:
Ross
2021-03-11 12:51:53 +00:00
parent 4f5cf5b5de
commit 6b4a3f7479
+9 -3
View File
@@ -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"]