]> git.parisson.com Git - teleforma.git/commitdiff
Fix script access for superuser
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Thu, 25 Jan 2018 23:23:52 +0000 (00:23 +0100)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Thu, 25 Jan 2018 23:23:52 +0000 (00:23 +0100)
teleforma/exam/models.py
teleforma/exam/templates/exam/script_detail.html

index b38114e269cf5d93a155e09dd0c3cb60b257219e..338a31402a464313b8ef9bf8a5b19011f954196c 100644 (file)
@@ -449,7 +449,6 @@ class Script(BaseResource):
             # self.box_upload()
             if not self.corrector:
                 self.auto_set_corrector()
-                self.status = 3
 
     def mark(self):
         self.date_marked = datetime.datetime.now()
index 487d409059249643948b1af84844386bb2466bf9..d18fc5cb2bea154eca12ac64b36c762db9541bbc 100644 (file)
 <br /><br />
 <div class="media">
  <div class="script">
-    <iframe id="box-iframe" style="position:fixed; top:14%; left:0px; bottom:0px; right:0px; width:100%; height:85%; border:none; margin:0; padding:0; z-index:0;" src="{% if user.quotas.all %}http://teleforma.parisson.com/webview/teleforma.html?url={{ script.safe_url }}?username=Examinator{% else %}http://teleforma.parisson.com/webviewer/teleforma.html?url={{ script.safe_url }}?username={{ user.username }}{% endif %}">
+    <iframe id="box-iframe" style="position:fixed; top:14%; left:0px; bottom:0px; right:0px; width:100%; height:85%; border:none; margin:0; padding:0; z-index:0;" src="{% if user.quotas.all or user.is_superuser %}http://teleforma.parisson.com/webview/teleforma.html?url={{ script.safe_url }}?username=Examinator{% else %}http://teleforma.parisson.com/webviewer/teleforma.html?url={{ script.safe_url }}?username={{ user.username }}{% endif %}">
     </iframe>
  </div>
 </div>