This commit is contained in:
Ross
2021-04-29 19:33:31 +01:00
parent 94ee5f61ef
commit d8a4942382
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -204,7 +204,7 @@ class ExamViews(View, LoginRequiredMixin):
raise PermissionDenied
if self.app_name == "anatomy" and not request.user.groups.filter(name='anatomy_checker').exists():
raise PermissionDenied
if self.app_name == "longs" and not request.user.groups.filter(name='longs_checker').exists():
if self.app_name == "longs" and not request.user.groups.filter(name='long_checker').exists():
raise PermissionDenied
return render(request, "{}/exam_list.html".format(self.app_name), {"exams": exams})
@@ -222,7 +222,7 @@ class ExamViews(View, LoginRequiredMixin):
raise PermissionDenied
if self.app_name == "anatomy" and not request.user.groups.filter(name='anatomy_checker').exists():
raise PermissionDenied
if self.app_name == "longs" and not request.user.groups.filter(name='longs_checker').exists():
if self.app_name == "longs" and not request.user.groups.filter(name='long_checker').exists():
raise PermissionDenied
questions = exam.exam_questions.all()
@@ -296,7 +296,7 @@ class ExamViews(View, LoginRequiredMixin):
raise PermissionDenied
if self.app_name == "anatomy" and not request.user.groups.filter(name='anatomy_checker').exists():
raise PermissionDenied
if self.app_name == "longs" and not request.user.groups.filter(name='longs_checker').exists():
if self.app_name == "longs" and not request.user.groups.filter(name='long_checker').exists():
raise PermissionDenied
@@ -324,7 +324,7 @@ class ExamViews(View, LoginRequiredMixin):
raise PermissionDenied
if self.app_name == "anatomy" and not request.user.groups.filter(name='anatomy_checker').exists():
raise PermissionDenied
if self.app_name == "longs" and not request.user.groups.filter(name='longs_checker').exists():
if self.app_name == "longs" and not request.user.groups.filter(name='long_checker').exists():
raise PermissionDenied
+1 -1
View File
@@ -17,7 +17,7 @@
{% render_table table %}
</div>
<button id="button-select-add-exam" data-exam_json_edit_url="{% url 'generic:generic_exam_json_edit' %}" data-exam_list_url="{% url 'generic:long-exams-list' %}" data-type="long" data-csrf="{{ csrf_token}}">Add selected questions to
<button id="button-select-add-exam" data-exam_json_edit_url="{% url 'generic:generic_exam_json_edit' %}" data-exam_list_url="{% url 'long-exams-list' %}" data-type="long" data-csrf="{{ csrf_token}}">Add selected questions to
exam</button>
<div id="exam-options"></div>
{% endblock %}