Ignore:
Timestamp:
7 Nov 2007, 22:56:44 (17 years ago)
Author:
Henrik Bettermann
Message:

further development of admit function (nearly finished)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_student/admitStudents.py

    r2540 r2575  
    2222    return
    2323
     24entry_session = '07'
    2425
    2526import logging
     
    3637    response.write("%s<br>\n\r" % s)
    3738
    38 brains = aq_applicants(In('status',('admitted'),)) 
     39brains = aq_applicants(In('status',('admitted'),))
    3940total = len(brains)
    4041logger.info("found %d students" % (total))
     
    5152        logger.info("Committing %s transactions, total %s" % (commit_after,count))
    5253        cocount += 1
    53         if cocount > 3:
     54        if cocount > 1:
    5455            break
    5556    brain = aq_applicants(Eq('reg_no',reg_no))[0]
    5657    #logger.info("start creating  objects of student %s" % (brain.reg_no))
    57     sid = d['student_id'] = context.waeup_tool.admitOneStudent(brain)
     58    sid = d['student_id'] = context.waeup_tool.admitOneStudent(brain,entry_session)
    5859    if sid is not None:
    5960        d['reg_no'] = reg_no
     
    6364    else:
    6465        logger.info("could not create  objects of student %s with pin " % (reg_no,brain.pin))
    65        
     66
    6667msg = "finished admitting %d students" % (admitted)
    6768logger.info(msg)
Note: See TracChangeset for help on using the changeset viewer.