actually fix it this time
This commit is contained in:
+2
-2
@@ -1588,7 +1588,7 @@ class ExamViews(View, LoginRequiredMixin):
|
||||
user_id = None
|
||||
else:
|
||||
user_id = request.user.pk
|
||||
if self.exam_mode and not exam.check_cid_user(cid, passcode, request, user_id):
|
||||
if exam.exam_mode and not exam.check_cid_user(cid, passcode, request, user_id):
|
||||
raise Http404("No available exam")
|
||||
|
||||
# exam_json_cache = cache.get("{}_exam_json_{}".format(self.app_name, pk))
|
||||
@@ -1649,7 +1649,7 @@ class ExamViews(View, LoginRequiredMixin):
|
||||
"""
|
||||
No (file based) caching is enabled for unbased exams
|
||||
"""
|
||||
exam = get_object_or_404(self.Exam, pk=pk)
|
||||
exam: ExamBase = get_object_or_404(self.Exam, pk=pk)
|
||||
|
||||
if exam.exam_mode and not exam.active and not self.check_user_access(request.user, pk):
|
||||
raise Http404("No available exam")
|
||||
|
||||
Reference in New Issue
Block a user