[scodoc-devel] [SVN] Scolar : [1589] Fix import adresse, ameliore fiche etud

eviennet at lipn.univ-paris13.fr eviennet at lipn.univ-paris13.fr
Lun 5 Déc 22:03:09 CET 2016


Une pièce jointe HTML a été nettoyée...
URL: https://listes.univ-paris13.fr/pipermail/scodoc-devel/attachments/20161205/39d9749c/attachment.htm 
-------------- section suivante --------------
Modified: branches/ScoDoc7/ImportScolars.py
===================================================================
--- branches/ScoDoc7/ImportScolars.py	2016-12-02 10:06:23 UTC (rev 1588)
+++ branches/ScoDoc7/ImportScolars.py	2016-12-05 21:03:08 UTC (rev 1589)
@@ -485,6 +485,15 @@
                 args['adm_id'] = cur_adm['adm_id']
                 args['type_admission'] = type_admission
                 scolars.etudident_edit(cnx, args)
+                adr = scolars.adresse_list(cnx, args={'etudid':etud['etudid']})
+                if adr:
+                    args['adresse_id'] = adr[0]['adresse_id']
+                    scolars.adresse_edit(cnx, args) # ne passe pas le contexte: pas de notification ici
+                else:
+                    args['typeadresse'] = 'domicile'
+                    args['description'] = '(infos admission)'
+                    adresse_id = scolars.adresse_create(cnx,args)
+                #log('import_adm: %s' % args )
                 diag.append('import de %s' % (etud['nomprenom']))
                 n_import += 1
         nline += 1

Modified: branches/ScoDoc7/ZScolar.py
===================================================================
--- branches/ScoDoc7/ZScolar.py	2016-12-02 10:06:23 UTC (rev 1588)
+++ branches/ScoDoc7/ZScolar.py	2016-12-05 21:03:08 UTC (rev 1589)
@@ -716,13 +716,10 @@
             if etud['rapporteur'] or etud['commentaire']:
                 rap = 'Note du rapporteur'
                 if etud['rapporteur']:
-                    rap += ' (%s) :' % etud['rapporteur']
+                    rap += ' (%s)' % etud['rapporteur']
+                rap += ': '
                 if etud['commentaire']:
-                    rap += '<em>%s</em>' % etud['commentaire']
-        
-            if (etud['type_admission'] and etud['type_admission'] != TYPE_ADMISSION_DEFAULT):
-                rap = ('<span class="etud_type_admission">%s</span> ' % etud['type_admission']) + rap
-
+                    rap += '<em>%s</em>' % etud['commentaire']        
             etud['rap'] = rap
 
             #if etud['boursier_prec']:

Modified: branches/ScoDoc7/sco_page_etud.py
===================================================================
--- branches/ScoDoc7/sco_page_etud.py	2016-12-02 10:06:23 UTC (rev 1588)
+++ branches/ScoDoc7/sco_page_etud.py	2016-12-05 21:03:08 UTC (rev 1589)
@@ -215,12 +215,14 @@
     info['liste_annotations'] = '\n'.join(alist)
     # fiche admission
     has_adm_notes = info['math'] or info['physique'] or info['anglais'] or info['francais']
-    has_bac_info = info['bac'] or info['specialite'] or info['annee_bac'] or info['rapporteur'] or info['commentaire'] or info['classement']
+    has_bac_info = info['bac'] or info['specialite'] or info['annee_bac'] or info['rapporteur'] or info['commentaire'] or info['classement'] or info['type_admission']
     if has_bac_info or has_adm_notes:
-        if has_adm_notes:
-            adm_tmpl = """<!-- Donnees admission -->
+        adm_tmpl = """<!-- Donnees admission -->
 <div class="ficheadmission">
 <div class="fichetitre">Informations admission</div>
+"""
+        if has_adm_notes:
+            adm_tmpl += """
 <table>
 <tr><th>Bac</th><th>Année</th><th>Rg</th>
 <th>Math</th><th>Physique</th><th>Anglais</th><th>Français</th></tr>
@@ -231,18 +233,21 @@
 <td>%(math)s</td><td>%(physique)s</td><td>%(anglais)s</td><td>%(francais)s</td>
 </tr>
 </table>
-<div>%(ilycee)s <em>%(rap)s</em></div>
-</div>
 """
-        else:
-            adm_tmpl = """<!-- Donnees admission (pas de notes) -->
-<div class="ficheadmission">
-<div class="fichetitre">Informations admission</div>
+        adm_tmpl += """
 <div>Bac %(bac)s (%(specialite)s) obtenu en %(annee_bac)s </div>
-<div>%(ilycee)s <em>%(rap)s</em></div>"""
-            if info['classement']:
-                adm_tmpl += """<div>Rang admission: %(classement)s</div>"""
-            adm_tmpl += """</div>"""
+<div class="ilycee">%(ilycee)s</div>"""
+        if info['type_admission'] or info['classement']:
+            adm_tmpl += """<div class="vadmission">"""
+        if info['type_admission']:
+            adm_tmpl += """<span>Voie d'admission: <span class="etud_type_admission">%(type_admission)s</span></span> """
+        if info['classement']:
+            adm_tmpl += """<span>Rang admission: <span class="etud_type_admission">%(classement)s</span></span>"""
+        if info['type_admission'] or info['classement']:
+            adm_tmpl += "</div>"
+        if info['rap']:
+            adm_tmpl += """<div class="note_rapporteur">%(rap)s</div>"""
+        adm_tmpl += """</div></div>"""
     else:
         adm_tmpl = '' # pas de boite "info admission"
     info['adm_data'] = adm_tmpl % info

Modified: branches/ScoDoc7/static/css/scodoc.css
===================================================================
--- branches/ScoDoc7/static/css/scodoc.css	2016-12-02 10:06:23 UTC (rev 1588)
+++ branches/ScoDoc7/static/css/scodoc.css	2016-12-05 21:03:08 UTC (rev 1589)
@@ -458,6 +458,11 @@
    font-size: 80%;
 }
 
+div.ficheadmission div.note_rapporteur {
+   font-size: 80%;
+   font-style: italic;
+}
+
 div.etudarchive ul {
     padding:0; 
     margin:0; 


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