[scodoc-devel] [SVN] Scolar : [1602] Fix bug color tableau recap

eviennet at lipn.univ-paris13.fr eviennet at lipn.univ-paris13.fr
Sam 28 Jan 18:51:06 CET 2017


Une pièce jointe HTML a été nettoyée...
URL: https://listes.univ-paris13.fr/pipermail/scodoc-devel/attachments/20170128/135e12ad/attachment.htm 
-------------- section suivante --------------
Modified: branches/ScoDoc7/sco_recapcomplet.py
===================================================================
--- branches/ScoDoc7/sco_recapcomplet.py	2017-01-28 16:13:52 UTC (rev 1601)
+++ branches/ScoDoc7/sco_recapcomplet.py	2017-01-28 17:51:06 UTC (rev 1602)
@@ -492,17 +492,24 @@
                     nsn[i] = '-'
             cells += '<td class="recap_col">%s</td>' % nsn[0] # rang
             cells += '<td class="recap_col">%s</td>' % el # nom etud (lien)
-            cells += '<td class="recap_col">%s</td>' % nsn[2] # group name
+            if not hidebac:
+                cells += '<td class="recap_col_bac">%s</td>' % nsn[2] # bac
+                idx_col_gr = 3
+            else:
+                idx_col_gr = 2
+            cells += '<td class="recap_col">%s</td>' % nsn[idx_col_gr] # group name
+            
             # Style si moyenne generale < barre
+            idx_col_moy = idx_col_gr + 1
             cssclass = 'recap_col_moy'
             try:
-                if float(nsn[3]) < NOTES_BARRE_GEN:
+                if float(nsn[idx_col_moy]) < NOTES_BARRE_GEN:
                     cssclass = 'recap_col_moy_inf'
             except:
                 pass
-            cells += '<td class="%s">%s</td>' % (cssclass,nsn[3])
+            cells += '<td class="%s">%s</td>' % (cssclass,nsn[idx_col_moy])
             ue_number = 0
-            for i in range(4,len(nsn)):
+            for i in range(idx_col_moy+1,len(nsn)):
                 if i in ue_index:
                     cssclass = 'recap_col_ue'
                     # grise si moy UE < barre


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