Changeset 1709 for WAeUP_SRP/trunk


Ignore:
Timestamp:
25 Apr 2007, 16:06:28 (18 years ago)
Author:
joachim
Message:

added entry_levels dict

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/Students.py

    r1707 r1709  
    546546        wftool = self.portal_workflow
    547547        students_folder = self.portal_catalog({'meta_type': 'StudentsFolder'})[-1].getObject()
     548        entry_levels = {'ume_ft':'100',
     549                        'de_ft': '200',
     550                        'ug_pt': '100',
     551                        'de_pt': '200',
     552                        'pg_ft': '700',
     553                        'pg_pt': '700',
     554                        }
    548555        csv_d = {'jamb_reg_no': "reg_no",
    549556                 'entry_mode': 'entry_mode',
     
    620627            da["jamb_lastname"] = lastname
    621628            catalog_entry['entry_session'] = da["entry_session"] = self.getSessionId()[-2:]
    622             catalog_entry['entry_level'] = da["entry_level"] = 'NA'
    623629            catalog_entry['sex'] = sex = result.get(csv_d['jamb_sex']).startswith('F')
    624630            da_fields = ('jamb_reg_no',
     
    632638            catalog_entry['email'] = da['app_email']
    633639            catalog_entry['entry_mode'] = da['entry_mode']
     640            catalog_entry['entry_level'] = da["entry_level"] = entry_levels.get(da['entry_mode'],'NA')
    634641            app = student.application
    635642            app_doc = app.getContent()
     
    673680            clearance = student.clearance
    674681            date_str = result.get(csv_d['birthday'])
    675             date = DateTime.DateTime(date_str)
     682            try:
     683                date = DateTime.DateTime(date_str)
     684            except:
     685                #import pdb;pdb.set_trace()
     686                date = None
    676687            dc['birthday'] = date
    677688            clearance.getContent().edit(mapping=dc)
     
    685696            #catalog_entry['level'] = getattr(cert_doc,'start_level')
    686697            catalog_entry['session'] = dsc['current_session'] = da['entry_session']
    687             catalog_entry['level'] = dsc['current_level'] = 'NA'
     698            catalog_entry['level'] = dsc['current_level'] = entry_levels.get(da['entry_mode'],'NA')
    688699            catalog_entry['mode'] = dsc['current_mode'] = da['entry_mode']
    689700            catalog_entry['course'] = dsc['study_course'] = cert_id
Note: See TracChangeset for help on using the changeset viewer.