Changeset 1285 for WAeUP_SRP/trunk/WAeUPTool.py
- Timestamp:
- 12 Jan 2007, 16:04:40 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/WAeUPTool.py
r1263 r1285 35 35 from Products.CMFCore.URLTool import URLTool 36 36 from Students import makeCertificateCode 37 import logging 37 from Globals import package_home,INSTANCE_HOME 38 p_home = package_home(globals()) 39 i_home = INSTANCE_HOME 40 import logging,os 38 41 import transaction 39 42 … … 79 82 return getattr(student_entry,"password","not set") 80 83 ###) 84 85 security.declarePublic('loadStudentFoto') ###( 86 def loadStudentFoto(self,student): 87 "return a student passport picture" 88 app_doc = student.application.getContent() 89 clear = student.clearance 90 clear_doc = clear.getContent() 91 matric_no = clear_doc.matric_no.upper() 92 picture ="%s/import/pictures_returning/%s.jpg" % (i_home,matric_no) 93 #import pdb;pdb.set_trace() 94 if not os.path.exists(picture): 95 return "Passport foto not found %s" % picture 96 file = open(picture) 97 outfile = file.read() 98 app_doc.manage_addFile('passport', 99 file=outfile, 100 title="%s.jpg" % matric_no) 101 return "successfully loaded passport" 102 ###) 103 81 104 82 105 security.declareProtected(ModifyPortalContent,'createOne') ###(
Note: See TracChangeset for help on using the changeset viewer.