[Scodoc-devel] [SVN] Scolar : [1300] - 7.0b1

eviennet at lipn.univ-paris13.fr eviennet at lipn.univ-paris13.fr
Ven 29 Nov 22:46:43 CET 2013


Une pièce jointe HTML a été nettoyée...
URL: <https://www-rt.iutv.univ-paris13.fr/pipermail/scodoc-devel/attachments/20131129/825f983e/attachment.html>
-------------- section suivante --------------
Modified: branches/ScoDoc7/VERSION.py
===================================================================
--- branches/ScoDoc7/VERSION.py	2013-11-27 16:24:06 UTC (rev 1299)
+++ branches/ScoDoc7/VERSION.py	2013-11-29 21:46:43 UTC (rev 1300)
@@ -1,7 +1,7 @@
 # -*- mode: python -*-
 # -*- coding: utf-8 -*-
 
-SCOVERSION = "7.0a3"
+SCOVERSION = "7.0b1"
 
 SCONAME = "ScoDoc"
 

Modified: branches/ScoDoc7/ZScoDoc.py
===================================================================
--- branches/ScoDoc7/ZScoDoc.py	2013-11-27 16:24:06 UTC (rev 1299)
+++ branches/ScoDoc7/ZScoDoc.py	2013-11-29 21:46:43 UTC (rev 1300)
@@ -622,7 +622,6 @@
                                error_traceback=None, error_tb=None, **kv): 
         "Recuperation des exceptions Zope"
         sco_dev_mail = SCO_DEV_MAIL
-        
         # neat (or should I say dirty ?) hack to get REQUEST
         # in fact, our caller (probably SimpleItem.py) has the REQUEST variable
         # that we'd like to use for our logs, but does not pass it as an argument.
@@ -631,7 +630,7 @@
             REQUEST = frame.f_back.f_locals['REQUEST']
         except:
             REQUEST = {}
-        
+        log('REQUEST=%s' % str(dir(REQUEST)))
         # Authentication uses exceptions, pass them up
         HTTP_X_FORWARDED_FOR = REQUEST.get('HTTP_X_FORWARDED_FOR', '')
         if error_type == 'LoginRequired':
@@ -655,16 +654,13 @@
             H.append(self.standard_html_footer(self))
             return '\n'.join(H)
         else: # Other exceptions, try carefully to build an error page...
-            #log('exc A')
+              #log('exc A')
             H = []
             try:
                 H.append( self.standard_html_header(self) )
             except:
                 pass
-            if error_message:
-                H.append( str(error_message) )
-            else:
-                H.append("""<table border="0" width="100%%"><tr valign="top">
+            H.append("""<table border="0" width="100%%"><tr valign="top">
 <td width="10%%" align="center"></td>
 <td width="90%%"><h2>Erreur !</h2>
   <p>Une erreur est survenue</p>
@@ -683,8 +679,8 @@
 </table>        """ % vars() )
                 # display error traceback (? may open a security risk via xss attack ?)
                 #log('exc B')
-                txt_html = self._report_request(REQUEST, format='html')
-                H.append("""<h4>Zope Traceback (à envoyer par mail à <a href="mailto:%(sco_dev_mail)s">%(sco_dev_mail)s</a>)</h4><div style="background-color: rgb(153,153,204); border: 1px;">
+            txt_html = self._report_request(REQUEST, format='html')
+            H.append("""<h4>Zope Traceback (à envoyer par mail à <a href="mailto:%(sco_dev_mail)s">%(sco_dev_mail)s</a>)</h4><div style="background-color: rgb(153,153,204); border: 1px;">
 %(error_tb)s
 <p><b>Informations:</b><br/>
 %(txt_html)s
@@ -693,11 +689,11 @@
 
 <p>Merci de votre patience !</p>
 """ % vars() )
-                try:
-                    H.append( self.standard_html_footer(self) )
-                except:
-                    log('no footer found for error page')
-                    pass
+            try:
+                H.append( self.standard_html_footer(self) )
+            except:
+                log('no footer found for error page')
+                pass
         # --- Mail:
         error_traceback_txt = scodoc_html2txt(error_tb)
         txt = """
@@ -720,16 +716,21 @@
         QUERY_STRING = REQUEST.get('QUERY_STRING', '')
         if QUERY_STRING:
             QUERY_STRING = '?' + QUERY_STRING
+        METHOD = REQUEST.get('REQUEST_METHOD', '')
+
         REFERER = 'na' # REQUEST.get('HTTP_REFERER', '')
         form = REQUEST.get('form', '')
         HTTP_X_FORWARDED_FOR = REQUEST.get('HTTP_X_FORWARDED_FOR', '')
         HTTP_USER_AGENT = 'na' # REQUEST.get('HTTP_USER_AGENT', '')
         svn_version = get_svn_version(self.file_path)
-
+        SCOVERSION = VERSION.SCOVERSION
+        
         txt = """
+Version: %(SCOVERSION)s
 User:    %(AUTHENTICATED_USER)s
 Date:    %(dt)s
 URL:     %(URL)s%(QUERY_STRING)s
+Method:  %(METHOD)s
 
 REFERER: %(REFERER)s
 Form: %(form)s

Modified: branches/ScoDoc7/ZScoUsers.py
===================================================================
--- branches/ScoDoc7/ZScoUsers.py	2013-11-27 16:24:06 UTC (rev 1299)
+++ branches/ScoDoc7/ZScoUsers.py	2013-11-29 21:46:43 UTC (rev 1300)
@@ -989,7 +989,8 @@
 Il devra ensuite se connecter et le changer.
 </p>
                 """ % (user_name, user_name),
-                parameters={'user_name':user_name}
+                parameters={'user_name':user_name},
+                REQUEST=REQUEST
                 )
         self.reset_password(user_name=user_name, REQUEST=REQUEST)
         return REQUEST.RESPONSE.redirect( REQUEST.URL1 + '?head_message=mot%20de%20passe%20de%20' + user_name + '%20reinitialise' )

Modified: branches/ScoDoc7/ZScolar.py
===================================================================
--- branches/ScoDoc7/ZScolar.py	2013-11-27 16:24:06 UTC (rev 1299)
+++ branches/ScoDoc7/ZScolar.py	2013-11-29 21:46:43 UTC (rev 1300)
@@ -2438,7 +2438,7 @@
                       target_variable='dialog_confirmed',
                       parameters={},
                       add_headers = True, # complete page
-                      REQUEST=None,
+                      REQUEST=None, # required
                       helpmsg=None):
         # dialog de confirmation simple
         parameters[target_variable] = 1

Modified: branches/ScoDoc7/sco_inscr_passage.py
===================================================================
--- branches/ScoDoc7/sco_inscr_passage.py	2013-11-27 16:24:06 UTC (rev 1299)
+++ branches/ScoDoc7/sco_inscr_passage.py	2013-11-29 21:46:43 UTC (rev 1300)
@@ -261,14 +261,17 @@
                 H.append('</ol>')
             if not a_inscrire and not a_desinscrire:
                 H.append("""<h3>Il n'y a rien à modifier !</h3>""")
-            H.append( context.confirmDialog( dest_url="formsemestre_inscr_passage",
-                                             add_headers=False,
-                                             cancel_url="formsemestre_inscr_passage?formsemestre_id="+formsemestre_id,
-                                             OK = "Effectuer l'opération",
-                                             parameters = {'formsemestre_id' : formsemestre_id,
-                                                           'etuds' : ','.join(etuds),
-                                                           'submitted' : 1, 
-                                                           }) )
+            H.append( context.confirmDialog(
+                dest_url="formsemestre_inscr_passage",
+                add_headers=False,
+                cancel_url="formsemestre_inscr_passage?formsemestre_id="+formsemestre_id,
+                OK = "Effectuer l'opération",
+                parameters = { 'formsemestre_id' : formsemestre_id,
+                               'etuds' : ','.join(etuds),
+                               'submitted' : 1, 
+                               },
+                REQUEST=REQUEST
+                ) )
         else:
             # OK, do it
             do_inscrit(context, sem, a_inscrire, REQUEST)

Modified: branches/ScoDoc7/sco_synchro_etuds.py
===================================================================
--- branches/ScoDoc7/sco_synchro_etuds.py	2013-11-27 16:24:06 UTC (rev 1299)
+++ branches/ScoDoc7/sco_synchro_etuds.py	2013-11-29 21:46:43 UTC (rev 1300)
@@ -168,6 +168,7 @@
                 add_headers=False,
                 cancel_url="formsemestre_synchro_etuds?formsemestre_id="+formsemestre_id,
                 OK = "Effectuer l'opération",
+                REQUEST=REQUEST,
                 parameters = {'formsemestre_id' : formsemestre_id,
                               'etuds' : ','.join(etuds),
                               'inscrits_without_key' : ','.join(inscrits_without_key),


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