From: Guillaume Pellerin Date: Fri, 18 Jul 2014 10:06:31 +0000 (+0200) Subject: fix script links X-Git-Tag: 1.1~407 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=e92feac75be95a298f19617966d4589d7a601e21;p=teleforma.git fix script links --- diff --git a/teleforma/exam/models.py b/teleforma/exam/models.py index a6e399b4..1d020cad 100644 --- a/teleforma/exam/models.py +++ b/teleforma/exam/models.py @@ -290,9 +290,12 @@ class Script(BaseResource): new_abs = os.sep.join(old_abs_root) + os.sep + slugify(filename) + ext new_rel = os.sep.join(old_rel_root) + os.sep + slugify(filename) + ext - os.rename(old_abs, new_abs) + print new_abs + print new_rel + + # os.rename(old_abs, new_abs) self.file = new_rel - self.save() + # self.save() def submit(self): self.date_submitted = datetime.datetime.now() diff --git a/teleforma/exam/templates/exam/inc/script_list.html b/teleforma/exam/templates/exam/inc/script_list.html index d00c88c9..0ce9d112 100644 --- a/teleforma/exam/templates/exam/inc/script_list.html +++ b/teleforma/exam/templates/exam/inc/script_list.html @@ -24,11 +24,11 @@ {% for script in object_list %} - {{ script.course.title }} - {{ script.session }} - {{ script.type }} - {{ script.author.last_name }} - {{ script.author.first_name }} + {% if script.status != 2 %}{% endif %}{{ script.course.title }}{% if script.status != 2 %}{% endif %} + {% if script.status != 2 %}{% endif %}{{ script.session }}{% if script.status != 2 %}{% endif %} + {% if script.status != 2 %}{% endif %}{{ script.type }}{% if script.status != 2 %}{% endif %} + {{ script.author.last_name }} + {{ script.author.first_name }} {{ script.date_added }} {% if script.date_marked %}{{ script.date_marked }}{% endif %} {% if script.corrector %}{{ script.corrector }}{% endif %}