.
This commit is contained in:
+4
-2
@@ -178,6 +178,8 @@ class ExamViews(View, LoginRequiredMixin):
|
||||
return False
|
||||
if self.app_name == "physics" and not user.groups.filter(name='physic_checker').exists():
|
||||
return False
|
||||
if self.app_name == "sbas" and not user.groups.filter(name='sba_checker').exists():
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
@@ -451,7 +453,7 @@ class ExamViews(View, LoginRequiredMixin):
|
||||
"""
|
||||
exam = get_object_or_404(self.Exam, pk=pk)
|
||||
|
||||
if not exam.active or not self.check_user_access(request.user):
|
||||
if not exam.active and not self.check_user_access(request.user):
|
||||
raise Http404("No available exam")
|
||||
|
||||
exam_json = exam.get_exam_json(based=False)
|
||||
@@ -461,7 +463,7 @@ class ExamViews(View, LoginRequiredMixin):
|
||||
|
||||
exam = get_object_or_404(self.Exam, pk=pk)
|
||||
|
||||
if not exam.active or not self.check_user_access(request.user):
|
||||
if not exam.active and not self.check_user_access(request.user):
|
||||
raise Http404("No available exam")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user