Changeset 2576 for WAeUP_SRP/base


Ignore:
Timestamp:
8 Nov 2007, 07:55:07 (17 years ago)
Author:
Henrik Bettermann
Message:

Uebergabe an Joachim, darf noch nicht ausgecheckt werden

Location:
WAeUP_SRP/base
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/WAeUPTool.py

    r2575 r2576  
    640640
    641641    security.declareProtected(ModifyPortalContent,'admitOneStudent') ###(
    642     def admitOneStudent(self,brain,entry_session):
     642    def admitOneStudent(self,brain,entry_session,pin_password):
    643643        "create Datastructure for an admitted Student"
    644644        #import pdb;pdb.set_trace()
     
    655655        students_folder.invokeFactory('Student', student_id)
    656656        student_object = getattr(students_folder,student_id)
    657         #password = pin_parts[2]
    658         #self.makeStudentMember(student_id,password = password)
    659         self.makeStudentMember(student_id)
     657        if pin_password:
     658            password = pin_parts[2]
     659            self.makeStudentMember(student_id,password = password)
     660        else:
     661            self.makeStudentMember(student_id)
    660662        student_object.manage_setLocalRoles(student_id, ['Owner',])
    661663        #logger.info("creating %s reg_no %s" % (student_id,brain.reg_no))
     
    668670        da = {'Title': 'Application Data'}
    669671        da['jamb_reg_no'] = brain.reg_no
    670        
     672
    671673        sex = 'M'
    672674        if brain.sex:
     
    706708        da['hq_grade'] = brain.hq_grade
    707709        da['aos'] = brain.aos
    708        
     710
    709711        application.getContent().edit(mapping=da)
    710712        #self.portal_workflow.doActionFor(application,'close',dest_container=application)
     
    721723        dp['lastname'] = brain.lastname
    722724        dp['middlename'] = brain.middlenames   # different field names!
    723         dp['firstname'] = brain.firstname       
     725        dp['firstname'] = brain.firstname
    724726        personal.getContent().edit(mapping=dp)
    725727        #
  • WAeUP_SRP/base/skins/waeup_student/admitStudents.py

    r2575 r2576  
    2323
    2424entry_session = '07'
     25pin_password = False
    2526
    2627import logging
     
    5657    brain = aq_applicants(Eq('reg_no',reg_no))[0]
    5758    #logger.info("start creating  objects of student %s" % (brain.reg_no))
    58     sid = d['student_id'] = context.waeup_tool.admitOneStudent(brain,entry_session)
     59    sid = d['student_id'] = context.waeup_tool.admitOneStudent(brain,entry_session,pin_password)
    5960    if sid is not None:
    6061        d['reg_no'] = reg_no
     
    6364        admitted += 1
    6465    else:
    65         logger.info("could not create  objects of student %s with pin " % (reg_no,brain.pin))
     66        logger.info("could not create objects of student %s with pin " % (reg_no,brain.pin))
    6667
    6768msg = "finished admitting %d students" % (admitted)
  • WAeUP_SRP/base/skins/waeup_student/check_admission.py

    r2407 r2576  
    2222pr = context.portal_registration
    2323
    24 res,psm,ds = lt.renderLayout('student_application_fe',
     24res,psm,ds = lt.renderLayout('student_application',
    2525                             'student_application',
    2626                             context,
Note: See TracChangeset for help on using the changeset viewer.