actually fix it this time

This commit is contained in:
Ross
2023-02-20 10:08:55 +00:00
parent 1b690f93b3
commit 1a4083dbc7
+2 -2
View File
@@ -1588,7 +1588,7 @@ class ExamViews(View, LoginRequiredMixin):
user_id = None user_id = None
else: else:
user_id = request.user.pk 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") raise Http404("No available exam")
# exam_json_cache = cache.get("{}_exam_json_{}".format(self.app_name, pk)) # 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 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): if exam.exam_mode and not exam.active and not self.check_user_access(request.user, pk):
raise Http404("No available exam") raise Http404("No available exam")