.
This commit is contained in:
+5
-1
@@ -383,8 +383,11 @@ class ExamViews(View, LoginRequiredMixin):
|
||||
|
||||
active_exams = {"exams": []}
|
||||
|
||||
group_map = {"rapids" : "rapid_checker", "anatomy" : "anatomy_checker", "longs":"long_checker"}
|
||||
exam_group = group_map[self.app_name]
|
||||
|
||||
for exam in exams:
|
||||
if exam.active:
|
||||
if exam.active or (request.user is not None and request.user.groups.filter(name=exam_group).exists()):
|
||||
if exam.json_creation_time:
|
||||
creation_time = exam.json_creation_time.isoformat()
|
||||
else:
|
||||
@@ -402,6 +405,7 @@ class ExamViews(View, LoginRequiredMixin):
|
||||
"eid": "{}/{}".format(self.question_type, exam.pk),
|
||||
"json_creation_time": creation_time,
|
||||
"exam_json_id": exam.exam_json_id
|
||||
"exam_active": exam.active
|
||||
}
|
||||
|
||||
if self.question_type == "long":
|
||||
|
||||
Reference in New Issue
Block a user