[Scodoc-devel] [SVN] Scolar : [1242] bug in formsemestre_estim_cost sur semestre verrouilles.

eviennet at lipn.univ-paris13.fr eviennet at lipn.univ-paris13.fr
Jeu 13 Juin 18:58:54 CEST 2013


Une pièce jointe HTML a été nettoyée...
URL: <https://www-rt.iutv.univ-paris13.fr/pipermail/scodoc-devel/attachments/20130613/db1fb0b1/attachment.html>
-------------- section suivante --------------
Modified: trunk/sco_formsemestre_status.py
===================================================================
--- trunk/sco_formsemestre_status.py	2013-06-13 13:58:18 UTC (rev 1241)
+++ trunk/sco_formsemestre_status.py	2013-06-13 16:58:53 UTC (rev 1242)
@@ -346,14 +346,13 @@
         log("can't find formsemestre_id %s" % formsemestre_id)
         return ''
     
-    sem['notes'] = notes.absolute_url()
     fill_formsemestre(context, sem, REQUEST=REQUEST)
 
     H = [ 
         """<div class="formsemestre_page_title">""", 
         
         """<div class="infos">
-<span class="semtitle"><a class="stdlink" href="%(notes)s/formsemestre_status?formsemestre_id=%(formsemestre_id)s">%(titre)s</a><a title="%(etape_apo_str)s">%(num_sem)s</a>%(modalitestr)s</span><span class="dates"><a title="du %(date_debut)s au %(date_fin)s ">%(mois_debut)s - %(mois_fin)s</a></span><span class="resp"><a title="%(nomcomplet)s">%(resp)s</a></span><span class="nbinscrits"><a class="discretelink" href="%(notes)s/formsemestre_lists?formsemestre_id=%(formsemestre_id)s">%(nbinscrits)d inscrits</a></span><span class="lock">%(locklink)s</span></div>""" % sem,
+<span class="semtitle"><a class="stdlink" href="%(notes_url)s/formsemestre_status?formsemestre_id=%(formsemestre_id)s">%(titre)s</a><a title="%(etape_apo_str)s">%(num_sem)s</a>%(modalitestr)s</span><span class="dates"><a title="du %(date_debut)s au %(date_fin)s ">%(mois_debut)s - %(mois_fin)s</a></span><span class="resp"><a title="%(nomcomplet)s">%(resp)s</a></span><span class="nbinscrits"><a class="discretelink" href="%(notes_url)s/formsemestre_lists?formsemestre_id=%(formsemestre_id)s">%(nbinscrits)d inscrits</a></span><span class="lock">%(locklink)s</span></div>""" % sem,
 
         formsemestre_status_menubar(notes, sem, REQUEST),
 
@@ -364,9 +363,14 @@
 def fill_formsemestre(context, sem, REQUEST=None):
     """Add some useful fields to help display formsemestres
     """
+    # Notes URL
+    notes_url = context.absolute_url()
+    if '/Notes' not in notes_url:
+        notes_url += '/Notes'
+    sem['notes_url'] = notes_url
     formsemestre_id = sem['formsemestre_id']
     if sem['etat'] != '1':
-        sem['locklink'] = """<a href="%s/formsemestre_change_lock?formsemestre_id=%s">%s</a>""" % (sem['notes'], sem['formsemestre_id'], context.icons.lock_img.tag(border='0',title='Semestre verrouill\xE9'))
+        sem['locklink'] = """<a href="%s/formsemestre_change_lock?formsemestre_id=%s">%s</a>""" % (notes_url, sem['formsemestre_id'], context.icons.lock_img.tag(border='0',title='Semestre verrouill\xE9'))
     else:
         sem['locklink'] = ''
     F = context.Notes.formation_list( args={ 'formation_id' : sem['formation_id'] } )[0]


Plus d'informations sur la liste de diffusion Scodoc-devel