Changeset 1813


Ignore:
Timestamp:
23 May 2007, 19:23:45 (18 years ago)
Author:
Henrik Bettermann
Message:

reload picture of late admissions after login
Joachim, please check!

Location:
WAeUP_SRP/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/WAeUPTool.py

    r1804 r1813  
    150150
    151151    security.declarePublic('loadStudentFoto') ###(
    152     def loadStudentFoto(self,student):
     152    def loadStudentFoto(self,student,filename,folder):
    153153        "return a student passport picture"
    154154        app_doc = student.application.getContent()
    155         clear = student.clearance
    156         clear_doc = clear.getContent()
    157         matric_no = clear_doc.matric_no.upper()
    158         picture1 ="%s/import/pictures_returning/%s.jpg" % (i_home,matric_no)
    159         picture2 ="%s/import/pictures_returning/%s.JPG" % (i_home,matric_no)
     155        #clear = student.clearance
     156        #clear_doc = clear.getContent()
     157        #matric_no = clear_doc.matric_no.upper()
     158        picture1 ="%s/import/%s/%s.jpg" % (i_home,folder,filename)
     159        picture2 ="%s/import/%s/%s.JPG" % (i_home,folder,filename)
    160160        #import pdb;pdb.set_trace()
    161161        if os.path.exists(picture1):
     
    622622            #data['response_code'] = response_code = '00'
    623623            #data['amount'] = amount = pay_transaction['Amount']
    624            
     624
    625625            # format of the third file sent by Kehinde
    626626            data['datetime'] = date = 0
     
    628628            data['order_id'] = order_id = pay_transaction['merchant_reference']
    629629            data['response_code'] = response_code = '00'
    630             data['amount'] = amount = pay_transaction['Amount']           
     630            data['amount'] = amount = pay_transaction['Amount']
    631631
    632632            dup = False
  • WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py

    r1789 r1813  
    9191        #from Products.zdb import set_trace;set_trace()
    9292        if s_review_state == 'returning' and load_passport and 'passport' not in app_doc.objectIds():
    93             msg = context.waeup_tool.loadStudentFoto(student)
     93            folder = 'returning_import'
     94            res = context.students_catalog(id = str(member))
     95            filename = res['matric_no'].upper()
     96            msg = context.waeup_tool.loadStudentFoto(student,filename,folder)
    9497            logger.info('%s, %s' % (member,msg))
    95         elif s_review_state in ("student_created","admitted") and\
     98        if s_review_state == 'admitted' and load_passport and 'passport' not in app_doc.objectIds():
     99            folder = 'pictures_admitted_latest'
     100            filename = app_doc.jamb_reg_no.replace('/','_')
     101            msg = context.waeup_tool.loadStudentFoto(student,filename,folder)
     102            logger.info('%s, %s' % (member,msg))
     103        if s_review_state in ("student_created","admitted") and\
    96104                             a_review_state == 'created' :
    97105            wftool.doActionFor(student_app,'open')
Note: See TracChangeset for help on using the changeset viewer.