Changeset 1759


Ignore:
Timestamp:
8 May 2007, 21:43:38 (18 years ago)
Author:
Henrik Bettermann
Message:

makeStudentData must not change catalog
makeStudentData must set current_session

Location:
WAeUP_SRP/trunk
Files:
1 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/WAeUPTool.py

    r1758 r1759  
    240240    def get_csv_filenames(self):
    241241        "do it"
    242         files = [file for file in os.listdir("%s/import/" % (i_home)) 
     242        files = [file for file in os.listdir("%s/import/" % (i_home))
    243243                 if file.endswith('.csv') and file.find('imported') == -1]
    244244        return files
     
    352352        clearance.getContent().edit(mapping=dc)
    353353        self.portal_workflow.doActionFor(clearance,'close',dest_container=clearance)
    354         catd = {}
    355         catd['id'] = sid
    356         catd['entry_mode']= da['entry_mode']
    357         catd['matric_no'] = matric_no
    358         catd['jamb_reg_no'] = da['jamb_reg_no']
    359         catd['name'] = "%(firstname)s %(middlename)s %(lastname)s" % dp
    360         catd['sex'] = dp['sex']
    361         catd['level'] = level
    362         catd['verdict'] = verdict
    363         if certificate_brain:
    364             cpath = certificate_brain.getPath().split('/')
    365             catd['faculty'] = cpath[-4]
    366             catd['department'] = cpath[-3]
    367             catd['course'] = certcode
    368         self.students_catalog.modifyRecord(**catd)
     354##        catd = {}
     355##        catd['id'] = sid
     356##        catd['entry_mode']= da['entry_mode']
     357##        catd['matric_no'] = matric_no
     358##        catd['jamb_reg_no'] = da['jamb_reg_no']
     359##        catd['name'] = "%(firstname)s %(middlename)s %(lastname)s" % dp
     360##        catd['sex'] = dp['sex']
     361##        catd['level'] = level
     362##        catd['verdict'] = verdict
     363##        if certificate_brain:
     364##            cpath = certificate_brain.getPath().split('/')
     365##            catd['faculty'] = cpath[-4]
     366##            catd['department'] = cpath[-3]
     367##            catd['course'] = certcode
     368##        self.students_catalog.modifyRecord(**catd)
    369369        #
    370370        # Study Course
     
    377377        dsc['current_level'] = level
    378378        dsc['current_verdict'] = verdict
     379        dsc['current_session'] = '06'
    379380        studycourse.getContent().edit(mapping=dsc)
    380381        #
     
    852853            open("%s/import/%s_not_imported%s.csv" % (i_home,filename,current),"a").write(
    853854                                                '\n'.join(not_imported))
    854         em = "Imported: %d, not imported: %d of total %d" % (total_imported,total_not_imported,total) 
     855        em = "Imported: %d, not imported: %d of total %d" % (total_imported,total_not_imported,total)
    855856        logger.info(em)
    856857        return em
  • WAeUP_SRP/trunk/skins/waeup_default/import_form.pt

    r1756 r1759  
    99    <metal:block use-macro="here/waeup_content_master/macros/master">
    1010      <metal:block fill-slot="main">
    11       <h3>Import Data</h3>
     11      <h3>Import Data!</h3>
    1212      <br />     
    1313        <form action="" id="editForm" method="post"
     
    1818          <br />
    1919          <input type="submit" class="standalone"
    20                  name="import" value="import"
     20                 name="import" value="Import"
    2121                 tal:attributes="value button"
    2222                 tal:condition="not:creation" />
Note: See TracChangeset for help on using the changeset viewer.