.
This commit is contained in:
+9
-3
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user