Changeset 3339 for WAeUP_SRP/base


Ignore:
Timestamp:
16 Mar 2008, 08:38:39 (17 years ago)
Author:
Henrik Bettermann
Message:

resolve ticket #507

Now we need a fix which replaces current_mode of all students by the certificate study_mode value.

Location:
WAeUP_SRP/base
Files:
1 added
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/WAeUPTool.py

    r3335 r3339  
    890890        #import pdb;pdb.set_trace()
    891891        if not hasattr(self,"_v_certificates"):
    892             self._v_certificates = [entry[0] for entry in self.getCertificatesVoc()]
     892            self._v_certificates = self.getCertificatesDict()
    893893        students_folder = self.portal_url.getPortalObject().campus.students
    894894        logger = logging.getLogger('WAeUPTool.admitOneStudent')
     
    942942        da['app_email'] = brain.email
    943943        da['app_mobile'] = brain.phone
    944         if brain.entry_mode:
    945             da['entry_mode'] = brain.entry_mode
    946         elif brain.screening_type == 'pume':
    947             da['entry_mode'] = 'ume_ft'
    948         elif brain.screening_type == 'pde':
    949             da['entry_mode'] = 'de_ft'
    950         elif brain.screening_type == 'pce':
    951             da['entry_mode'] = 'pce'
    952         elif brain.screening_type == 'prence':
    953             da['entry_mode'] = 'prence'
    954         else:
    955             da['entry_mode'] = ''
     944
     945        da['entry_mode'] = self._v_certificates[brain.course_admitted][1]
     946
     947        #if brain.entry_mode:
     948        #    da['entry_mode'] = brain.entry_mode
     949        #elif brain.screening_type == 'pume':
     950        #    da['entry_mode'] = 'ume_ft'
     951        #elif brain.screening_type == 'pde':
     952        #    da['entry_mode'] = 'de_ft'
     953        #elif brain.screening_type == 'pce':
     954        #    da['entry_mode'] = 'pce'
     955        #elif brain.screening_type == 'prence':
     956        #    da['entry_mode'] = 'prence'
     957        #else:
     958        #    da['entry_mode'] = ''
     959
     960
    956961        da['entry_session'] = entry_session
    957962        da['jamb_lastname'] = brain.lastname
  • WAeUP_SRP/base/skins/waeup_academics/getCertificatesVoc.py

    r3254 r3339  
    1 ##parameters=key=None 
     1##parameters=key=None
    22# $Id$
    33"""
     
    66"""
    77if key is None:
    8     res = context.portal_catalog.search({'meta_type': "Certificate"})   
     8    res = context.portal_catalog.search({'meta_type': "Certificate"})
    99    return [(d.getId,d.Title,) for d in res]
    1010res = context.portal_catalog.search({'meta_type': "Certificate", 'id': key})
    1111if res:
    12     return [-1].Title
     12    return res[0].Title
    1313raise KeyError
  • WAeUP_SRP/base/skins/waeup_academics/getDepartmentsVoc.py

    r3254 r3339  
    66"""
    77if key is None:
    8     res = context.portal_catalog.search({'meta_type': "Department"})   
     8    res = context.portal_catalog.search({'meta_type': "Department"})
    99    return [(d.getId(),d.Title,) for d in res]
    1010res = context.portal_catalog.search({'meta_type': "Department", 'id': key})
    1111if res:
    12     return res[-1].Title
     12    return res[0].Title
    1313
    1414raise KeyError
  • WAeUP_SRP/base/skins/waeup_academics/getFacultiesVoc.py

    r3269 r3339  
    1 ##parameters=key=None 
     1##parameters=key=None
    22# $Id$
    33"""
     
    66"""
    77if key is None:
    8     res = context.portal_catalog.search({'meta_type': "Faculty"})   
     8    res = context.portal_catalog.search({'meta_type': "Faculty"})
    99    return [(d.getId,d.Title,) for d in res]
    1010res = context.portal_catalog.search({'meta_type': "Faculty", 'id': key})
    1111if res:
    12     return [-1].Title
     12    return res[0].Title
    1313raise KeyError
  • WAeUP_SRP/base/skins/waeup_student/admitStudents.py

    r2727 r3339  
    5252        context.waeup_tool.doCommit()
    5353        logger.info("Committing %s transactions, total %s" % (commit_after,count))
    54         # cocount += 1
    55         # if cocount > 1:
    56         #     break
     54        cocount += 1
     55        if cocount > 1:
     56            break
    5757    brain = aq_applicants(Eq('reg_no',reg_no))[0]
    5858    #logger.info("start creating  objects of student %s" % (brain.reg_no))
Note: See TracChangeset for help on using the changeset viewer.