Changeset 1900


Ignore:
Timestamp:
15 Jun 2007, 07:51:48 (17 years ago)
Author:
Henrik Bettermann
Message:

getSessionResults: avoid memory overflow
WAeUPTool: make addStudent work

Location:
WAeUP_SRP/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/WAeUPTool.py

    r1898 r1900  
    1 #-*- mode: python; mode: fold -*-
     13#-*- mode: python; mode: fold -*-
    22# (C) Copyright 2005 The WAeUP group  <http://www.waeup.org>
    33# Author: Joachim Schmitz (js@aixtraware.de)
     
    261261        students_folder.invokeFactory('Student', sid)
    262262        student_obj = getattr(students_folder,sid)
    263         password = self.generatePassword()
    264         self.makeStudentMember(sid,password)
    265263        f2t = self.student_field2types
    266264        #from pdb import set_trace; set_trace()
     
    269267        if dict.get('sex'):
    270268            d['jamb_sex']  = 'F'
     269           
    271270        entry_session = dict.get('entry_session')
    272         wfaction = 'return'
    273         wft = 'wf_transition_returning'
    274         if entry_session == self.getSessionId():
     271        if entry_session == self.getSessionId()[-2:]:
    275272            wfaction = 'admit'
    276273            wft = 'wf_transition_admitted'
     274            password = None
     275        else:   
     276            wfaction = 'return'
     277            wft = 'wf_transition_returning'
     278            password = self.generatePassword()
     279            self.makeStudentMember(sid,password)           
     280           
    277281        for pt in f2t.keys():
    278282            student_obj.invokeFactory(pt,f2t[pt]['id'])
  • WAeUP_SRP/trunk/skins/waeup_student/getSessionResults.py

    r1753 r1900  
    5353#    return None
    5454
    55 res = results(matric_no = matric_no)
    56 results = res
     55if matric_no:
     56    res = results(matric_no = matric_no)
     57    results = res
     58else:
     59    results = []
    5760
    5861
Note: See TracChangeset for help on using the changeset viewer.