]> git.parisson.com Git - teleforma.git/commitdiff
Correctors can't filter on correctors on scripts list : https://trackers.pilotsystems...
authorYoan Le Clanche <yoan@ellington.pilotsystems.net>
Thu, 25 Apr 2019 15:02:11 +0000 (17:02 +0200)
committerYoan Le Clanche <yoan@ellington.pilotsystems.net>
Thu, 25 Apr 2019 15:02:11 +0000 (17:02 +0200)
teleforma/exam/templates/exam/scripts.html
teleforma/exam/views.py

index 1b278c00ec1ec64b6fcd561f72ea6b51d51412bf..7bae5cef1700df0d9d9e2b425c2fd21689e246d0 100644 (file)
@@ -63,6 +63,7 @@
 
 {% if profile > 0 %}
 <form method="GET">
+    {% if profile > 1 %}
     <label for="corrector_select">{% trans "Corrector"%}</label>
     <select name="corrector" id="corrector_select">
        <option value="">---</option>
@@ -70,6 +71,7 @@
        <option value="{{corrector.0}}" {% if corrector.0 == corrector_selected %}selected="selected"{% endif %}>{{corrector.1}}</option>
        {% endfor %}
     </select>
+    {% endif %}
     <label for="course_select">{% trans "Course"%}</label>
     <select name="course" id="course_select">
        <option value="">---</option>
index e4616e0b1c0cffc3adcb959b48828c2794a8b684..d83aeb8d952e88e2296dabeac0446dfed49e585e 100755 (executable)
@@ -59,6 +59,8 @@ class ScriptsListMixinView(ScriptMixinView):
     def get_profile(self):
         user = self.request.user
         professor = user.professor.all()
+        if user.is_superuser:
+            return PROFESSOR
         if professor:
             return PROFESSOR
         if user.quotas.all():