Changeset 2727 for WAeUP_SRP/base


Ignore:
Timestamp:
21 Nov 2007, 14:12:30 (17 years ago)
Author:
joachim
Message:

fix for #411

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

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/WAeUPTool.py

    r2716 r2727  
    757757        "create Datastructure for an admitted Student"
    758758        #import pdb;pdb.set_trace()
     759        if not hasattr(self,"_v_certificates"):
     760            self._v_certificates = [entry[0] for entry in self.getCertificatesVoc()]
    759761        students_folder = self.portal_url.getPortalObject().campus.students
    760762        logger = logging.getLogger('WAeUPTool.admitOneStudent')
     
    765767        if len(pin_parts) != 3:
    766768            logger.info('invalid pin %s for %s' % (brain.pin,brain.reg_no))
     769            return
     770        if brain.course_admitted not in self._v_certificates:
     771            logger.info('certificate %s not found for %s' % (brain.course_admitted,brain.reg_no))
    767772            return
    768773        student_id = self.generateStudentId('?')
  • WAeUP_SRP/base/skins/waeup_student/admitStudents.py

    r2671 r2727  
    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))
     
    6464        admitted += 1
    6565    else:
    66         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 %s" % (reg_no,brain.pin))
    6767
    6868msg = "finished admitting %d students" % (admitted)
Note: See TracChangeset for help on using the changeset viewer.