.
This commit is contained in:
+4
-4
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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 %}
|
||||
Reference in New Issue
Block a user