[Scodoc-devel] [SVN] Scolar : [1292] - Fix: XML pour suggestion enseignants;

eviennet at lipn.univ-paris13.fr eviennet at lipn.univ-paris13.fr
Sam 23 Nov 14:29:20 CET 2013


Une pièce jointe HTML a été nettoyée...
URL: <https://www-rt.iutv.univ-paris13.fr/pipermail/scodoc-devel/attachments/20131123/664ee644/attachment.html>
-------------- section suivante --------------
Modified: branches/ScoDoc7/ZScoUsers.py
===================================================================
--- branches/ScoDoc7/ZScoUsers.py	2013-11-22 12:36:38 UTC (rev 1291)
+++ branches/ScoDoc7/ZScoUsers.py	2013-11-23 13:29:20 UTC (rev 1292)
@@ -949,16 +949,14 @@
             if not with_olds:
                 cache.set(dept, l)
             return l
-
+    
     security.declareProtected(ScoView, 'get_userlist_xml')
     def get_userlist_xml(self, dept=None, start='', limit=25, REQUEST=None):
         """Returns XML list of users with name (nomplogin) starting with start.
         Used for forms auto-completion."""
-        # log('get_userlist_xml: start="%s" (%s)' % (start, repr(start)) )
         userlist = self.get_userlist(dept=dept)
-        
         start = suppression_diacritics(unicode(start, 'utf-8'))
-        start = str(start).lower()        
+        start = str(start).lower()
         
         userlist = [ user for user in userlist if user['nomnoacc'].startswith(start) ]
         if REQUEST:
@@ -969,7 +967,7 @@
             doc._push()
             doc.rs(user['nomplogin'], id=user['user_id'], info='')
             doc._pop()
-        return doc
+        return repr(doc)
 
     security.declareProtected(ScoView, 'get_user_name_from_nomplogin')
     def get_user_name_from_nomplogin(self, nomplogin):

Modified: branches/ScoDoc7/config/save_scodoc_data.sh
===================================================================
--- branches/ScoDoc7/config/save_scodoc_data.sh	2013-11-22 12:36:38 UTC (rev 1291)
+++ branches/ScoDoc7/config/save_scodoc_data.sh	2013-11-23 13:29:20 UTC (rev 1292)
@@ -16,6 +16,10 @@
   exit 1
 fi
 DEST=$1
+# remove trailing slashs if needed:
+shopt -s extglob
+DEST="${DEST%%+(/)}"
+
 if [ ! -e "$DEST" ]
 then
   echo Creating directory "$DEST"


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