[scodoc-devel] [SVN] Scolar : [1570] Fix bug bulletins intermediaires

eviennet at lipn.univ-paris13.fr eviennet at lipn.univ-paris13.fr
Mar 27 Sep 13:59:57 CEST 2016


Une pièce jointe HTML a été nettoyée...
URL: https://listes.univ-paris13.fr/pipermail/scodoc-devel/attachments/20160927/b91324f7/attachment.htm 
-------------- section suivante --------------
Modified: branches/ScoDoc7/sco_bulletins.py
===================================================================
--- branches/ScoDoc7/sco_bulletins.py	2016-09-26 10:21:04 UTC (rev 1569)
+++ branches/ScoDoc7/sco_bulletins.py	2016-09-27 11:59:57 UTC (rev 1570)
@@ -353,7 +353,7 @@
             for e in evals:
                 e = e.copy()
                 mod['evaluations'].append(e)
-                if e['visibulletin'] == '1' or version == 'long':
+                if int(e['visibulletin']) == 1 or version == 'long':
                     e['name'] = e['description'] or 'le %s' % e['jour']
                 e['target_html'] = 'evaluation_listenotes?evaluation_id=%s&format=html&tf-submitted=1' % e['evaluation_id']
                 e['name_html'] = '<a class="bull_link" href="%s">%s</a>' % (e['target_html'], e['name'])

Modified: branches/ScoDoc7/sco_bulletins_json.py
===================================================================
--- branches/ScoDoc7/sco_bulletins_json.py	2016-09-26 10:21:04 UTC (rev 1569)
+++ branches/ScoDoc7/sco_bulletins_json.py	2016-09-27 11:59:57 UTC (rev 1570)
@@ -216,7 +216,7 @@
             m['evaluation'] = []
             if version != 'short':
                 for e in evals:
-                    if e['visibulletin'] == '1' or version == 'long':
+                    if int(e['visibulletin']) == 1 or version == 'long':
                         val = e['notes'].get(etudid, {'value':'NP'})['value'] # NA si etud demissionnaire
                         val = fmt_note(val, note_max=e['note_max'] )
                         m['evaluation'].append( dict(

Modified: branches/ScoDoc7/sco_bulletins_legacy.py
===================================================================
--- branches/ScoDoc7/sco_bulletins_legacy.py	2016-09-26 10:21:04 UTC (rev 1569)
+++ branches/ScoDoc7/sco_bulletins_legacy.py	2016-09-27 11:59:57 UTC (rev 1570)
@@ -130,7 +130,7 @@
                 if self.version != 'short':
                     # --- notes de chaque eval:
                     for e in mod['evaluations']:
-                        if e['visibulletin'] == '1' or self.version == 'long':
+                        if int(e['visibulletin']) == 1 or self.version == 'long':
                             H.append('<tr class="notes_bulletin_row_eval%s">' % rowstyle)
                             H.append('<td>%s</td><td>%s</td><td class="bull_nom_eval">%s</td><td class="note">%s</td><td class="bull_coef_eval">%s</td></tr>'
                                      % ('','', e['name_html'], e['note_html'], e['coef_txt']))
@@ -361,7 +361,7 @@
             if version != 'short':
                 # --- notes de chaque eval:
                 for e in mod['evaluations']:
-                    if e['visibulletin'] == '1' or version == 'long':
+                    if int(e['visibulletin']) == 1 or version == 'long':
                         S.newline(ue_type=ue_type)
                         t = ['','', e['name'], e['note_txt'], e['coef_txt']]
                         if bul_show_abs_modules:

Modified: branches/ScoDoc7/sco_bulletins_standard.py
===================================================================
--- branches/ScoDoc7/sco_bulletins_standard.py	2016-09-26 10:21:04 UTC (rev 1569)
+++ branches/ScoDoc7/sco_bulletins_standard.py	2016-09-27 11:59:57 UTC (rev 1570)
@@ -472,7 +472,7 @@
         # --- notes de chaque eval:
         nbeval = 0
         for e in evals:
-            if e['visibulletin'] == '1' or self.version == 'long':
+            if int(e['visibulletin']) == 1 or self.version == 'long':
                 if nbeval == 0:
                     eval_style = ' b_eval_first'
                 else:

Modified: branches/ScoDoc7/sco_bulletins_xml.py
===================================================================
--- branches/ScoDoc7/sco_bulletins_xml.py	2016-09-26 10:21:04 UTC (rev 1569)
+++ branches/ScoDoc7/sco_bulletins_xml.py	2016-09-27 11:59:57 UTC (rev 1570)
@@ -209,7 +209,7 @@
             evals = nt.get_evals_in_mod(modimpl['moduleimpl_id'])
             if version != 'short':
                 for e in evals:
-                    if e['visibulletin'] == '1' or version == 'long':
+                    if int(e['visibulletin']) == 1 or version == 'long':
                         doc._push()
                         doc.evaluation(jour=DateDMYtoISO(e['jour'], null_is_empty=True),
                                heure_debut=TimetoISO8601(e['heure_debut'], null_is_empty=True),


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