[Scodoc-devel] [SVN] Scolar : [1503] Bug fix: calcul UE capitalise pouvait bloquer si UE d 'un semestre different importee par erreur dans le semestre courant.

eviennet at lipn.univ-paris13.fr eviennet at lipn.univ-paris13.fr
Mar 2 Fév 22:24:11 CET 2016


Une pièce jointe HTML a été nettoyée...
URL: <https://www-rt.iutv.univ-paris13.fr/pipermail/scodoc-devel/attachments/20160202/60efd862/attachment.html>
-------------- section suivante --------------
Modified: branches/ScoDoc7/ZNotes.py
===================================================================
--- branches/ScoDoc7/ZNotes.py	2016-02-02 10:57:12 UTC (rev 1502)
+++ branches/ScoDoc7/ZNotes.py	2016-02-02 21:24:11 UTC (rev 1503)
@@ -909,9 +909,6 @@
         sco_formsemestre._formsemestreEditor.edit(cnx, sem, **kw )
         self._inval_cache(formsemestre_id=sem['formsemestre_id']) #> modif formsemestre
     
-    security.declareProtected(ScoView,'formsemestre_edit_uecoefs')
-    formsemestre_edit_uecoefs = sco_formsemestre_edit.formsemestre_edit_uecoefs
-
     security.declareProtected(ScoView,'formsemestre_edit_options')
     formsemestre_edit_options = sco_formsemestre_edit.formsemestre_edit_options
 

Modified: branches/ScoDoc7/ZScolar.py
===================================================================
--- branches/ScoDoc7/ZScolar.py	2016-02-02 10:57:12 UTC (rev 1502)
+++ branches/ScoDoc7/ZScolar.py	2016-02-02 21:24:11 UTC (rev 1503)
@@ -61,6 +61,7 @@
 import sco_find_etud
 import sco_photos
 import sco_formsemestre
+import sco_formsemestre_edit
 
 import sco_news
 from sco_news import NEWS_INSCR, NEWS_NOTE, NEWS_FORM, NEWS_SEM, NEWS_MISC
@@ -2159,6 +2160,9 @@
             return '\n'.join(H)
 
     # --------------------------------------------------------------------
+    # Certaines methodes devant etre appeles en dehors de ZNotes:
+    security.declareProtected(ScoView,'formsemestre_edit_uecoefs')
+    formsemestre_edit_uecoefs = sco_formsemestre_edit.formsemestre_edit_uecoefs
 
 #
 # Product Administration

Modified: branches/ScoDoc7/notes_table.py
===================================================================
--- branches/ScoDoc7/notes_table.py	2016-02-02 10:57:12 UTC (rev 1502)
+++ branches/ScoDoc7/notes_table.py	2016-02-02 21:24:11 UTC (rev 1503)
@@ -840,9 +840,9 @@
             ects = 0.
             if sco_codes_parcours.code_ue_validant(code):
                 ue = self.uedict.get(ue_id, None)
-                if ue is None: # not in cache
+                if ue is None: # not in list for this sem ??? (probably an error)
+                    log('Warning: %s capitalized an UE %s which is not part of current sem %s' % (etudid, ue_id, self.formsemestre_id))
                     ue = self.context.do_ue_list(args={'ue_id' : ue_id})[0]
-                    self.uedict[ue_id] = ue # cache
                 ects = ue['ects'] or 0. # 0 if None
             
             decisions_jury_ues[etudid][ue_id] = {

Modified: branches/ScoDoc7/sco_formsemestre_edit.py
===================================================================
--- branches/ScoDoc7/sco_formsemestre_edit.py	2016-02-02 10:57:12 UTC (rev 1502)
+++ branches/ScoDoc7/sco_formsemestre_edit.py	2016-02-02 21:24:11 UTC (rev 1503)
@@ -1023,6 +1023,7 @@
 def formsemestre_edit_uecoefs(context, formsemestre_id, err_ue_id=None, REQUEST=None):
     """Changement manuel des coefficients des UE capitalisées.
     """
+    context = context.Notes # si appele d'en haut, eg par exception ScoValueError
     ok, err = context._check_access_diretud(formsemestre_id,REQUEST)
     if not ok:
         return err

Modified: branches/ScoDoc7/sco_up_to_date.py
===================================================================
--- branches/ScoDoc7/sco_up_to_date.py	2016-02-02 10:57:12 UTC (rev 1502)
+++ branches/ScoDoc7/sco_up_to_date.py	2016-02-02 21:24:11 UTC (rev 1503)
@@ -81,7 +81,7 @@
             raise ValueError('invalid svn version') # should never occur, regexp always (maybe empty) match
         cur_ver_num = int(m.group(1))
     except:
-        log('Warning: no numeric subversion !')
+        log('Warning: no numeric subversion ! (cur_ver="%s")' % cur_ver)
         return _UP_TO_DATE, _UP_TO_DATE_MSG # silently ignore misconfiguration ?
     try:
         last_stable_ver_num = int(last_stable_ver)


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