Changeset 1016 for WAeUP_SRP/trunk/skins
- Timestamp:
- 8 Dec 2006, 19:38:39 (18 years ago)
- Location:
- WAeUP_SRP/trunk/skins
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py
r1009 r1016 16 16 current = DateTime.DateTime() 17 17 import logging 18 logger = logging.getLogger(' student_login')18 logger = logging.getLogger('Student.Login') 19 19 20 20 … … 60 60 s_review_state = wftool.getInfoFor(student,'review_state',None) 61 61 a_review_state = wftool.getInfoFor(student_app,'review_state',None) 62 logger.info(' %s review_state %s' % (member,s_review_state))62 logger.info('"%s", "logged in", "review_state %s"' % (member,s_review_state)) 63 63 app_doc = student_app.getContent() 64 64 #from Products.zdb import set_trace -
WAeUP_SRP/trunk/skins/waeup_student/application_edit.py
r892 r1016 15 15 import DateTime 16 16 current = DateTime.DateTime() 17 import logging 18 logger = logging.getLogger('Student.Application.Edit') 17 19 18 20 # Until ajax posts directly to its own script... … … 27 29 info = context.getStudentInfo() 28 30 31 if info is None: 32 logger.info('"anonymous access","%s"' % request.get('URL0')) 33 REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url()) 34 29 35 student = info['student'] 30 36 app = info['app'] … … 50 56 elif cpsdocument_edit_and_view_button: 51 57 if app_doc.passport is not None: 58 logger.info('"%s", "continue' % (info['id'])) 52 59 action = "/start_clearance" 53 60 base_url = student.absolute_url() -
WAeUP_SRP/trunk/skins/waeup_student/clearance_edit.py
r942 r1016 15 15 import DateTime 16 16 current = DateTime.DateTime() 17 import logging 18 logger = logging.getLogger('Student.Clearance') 17 19 18 20 cpsdocument_edit_button = REQUEST.has_key('cpsdocument_edit_button') … … 35 37 clear = info['clear'] 36 38 clear_doc = info['clear_doc'] 39 student_id = info['id'] 40 member_id = str(context.portal_membership.getAuthenticatedMember()) 37 41 38 42 is_valid, ds = clear_doc.validate(request=REQUEST, … … 51 55 action = "/clearance_edit_form" 52 56 elif cpsdocument_edit_and_view_button: 53 if acknowledge: 57 if acknowledge and info['review_state'] == "clearance_pin_entered": 58 logger.info('"%s","requested clearance"' % (student_id)) 59 info['clear_doc'].edit(mapping = {'request_date': current,}) 54 60 wftool.doActionFor(info['clear'],'close') 55 61 wftool.doActionFor(info['student'],'request_clearance',dest_container=1) … … 57 63 if context.isStudent(): 58 64 action = "/clearance_view" 65 elif acknowledge and info['review_state'] != "clearance_pin_entered": 66 logger.info('"%s","double requested clearance"' % (student_id)) 67 psm = "You have already requested clearance" 68 if context.isStudent(): 69 action = "/clearance_edit_form" 59 70 else: 60 71 psm = "You must tick the acknowledgement check box before submission!" 61 72 if context.isStudent(): 62 73 action = "/clearance_edit_form" 63 elif clear_and_validate_button: 74 elif clear_and_validate_button and info['review_state'] == "clearance_requested": 75 logger.info('"%s","cleared","%s"' % (member_id,student_id )) 64 76 wftool.doActionFor(info['student'],'clear_and_validate') 77 info['clear_doc'].edit(mapping = {'cleared_date': current,}) 65 78 psm = "Clearance and eligibility record is validated and and student is cleared!" 79 elif clear_and_validate_button and info['review_state'] == "cleared_and_validated": 80 psm = "This student is already cleared!" 66 81 elif reject_clearance_button: 82 logger.info('"%s","rejected clearance for","%s"' % (member_id,student_id )) 67 83 wftool.doActionFor(info['clear'],'open') 68 84 wftool.doActionFor(info['student'],'reject_clearance') -
WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py
r1007 r1016 34 34 try: 35 35 requested_id = path_info[path_info.index('students')+1] 36 except ValueError: 37 student_id = member_id 38 break 39 except IndexError: 36 except (ValueError,IndexError): 40 37 student_id = member_id 41 38 break -
WAeUP_SRP/trunk/skins/waeup_student/start_clearance.py
r892 r1016 7 7 current = DateTime.DateTime() 8 8 pr = context.portal_registration 9 import logging 10 logger = logging.getLogger('Student.Clearance.Start') 9 11 10 12 type_name = 'Student' … … 18 20 pr = context.portal_registration 19 21 22 info = context.getStudentInfo() 23 app_doc = info['app_doc'] 24 review_state = info['review_state'] 25 20 26 res,psm,ds = lt.renderLayout(layout_id='student_clearance', 21 27 schema_id= 'student_clearance', … … 27 33 button = "Start", 28 34 ) 29 30 info = context.getStudentInfo() 31 app_doc = info['app_doc'] 32 if app_doc.passport is None: 33 return context.clearance_pin_form(rendered = res, 34 psm = "You must upload your passport picture before you can start the registration process!", 35 #psm = "%s, %s" % (psm,ds), 36 firstlayout = True, 37 lastlayout = True, 38 ds = ds, 39 ) 40 41 if psm == 'invalid': 42 return context.clearance_pin_form(rendered = res, 43 psm = "Please correct your input!", 44 #psm = "%s, %s" % (psm,ds), 45 firstlayout = True, 46 lastlayout = True, 47 ds = ds, 48 ) 49 elif psm == '': 35 if psm == '': 50 36 return context.clearance_pin_form(rendered = res, 51 37 psm = None, … … 54 40 ds = ds, 55 41 ) 56 elif psm == 'valid': 57 info = context.getStudentInfo() 58 review_state = info['review_state'] 59 wf.doActionFor(info['student'],'enter_clearance_pin') 60 wf.doActionFor(info['app'],'close') 61 wf.doActionFor(info['clear'],'open') 62 pin = str(ds.get('clr_ac_pin')) 63 dc = {} 64 dc['clr_ac_pin'] = pin 65 dc['clr_ac_date'] = current 66 dc['entry_date'] = current 67 dc['entry_session'] = "2006/2007" 68 info['clear_doc'].edit(mapping = dc) 42 error = False 43 if app_doc.passport is None: 44 psm = "You must upload your passport picture before you can start the registration process!" 45 error = True 46 elif review_state == "clearance_pin_entered": 47 psm = "You have already entered a clearance pin" 48 error = True 49 elif psm == 'invalid': 50 psm = "Please correct your input!", 51 error = True 52 if error: 53 return context.clearance_pin_form(rendered = res, 54 psm = psm, 55 firstlayout = True, 56 lastlayout = True, 57 ds = ds, 58 ) 59 pin = str(ds.get('clr_ac_pin')) 60 logger.info('"%s", "%s"' % (info['id'],pin)) 61 wf.doActionFor(info['student'],'enter_clearance_pin') 62 wf.doActionFor(info['clear'],'open') 63 dc = {} 64 app_doc = info['app_doc'] 65 dc['lga_ident'] = app_doc.get('jamb_lga') 66 dc['lga'] = app_doc.get('jamb_state','no state') + ' / ' + app_doc.get('jamb_lga','no lga') 67 dc['clr_ac_date'] = current 68 dc['entry_date'] = current 69 dc['entry_session'] = "2006/2007" 70 wf.doActionFor(info['app'],'close') 71 info['clear_doc'].edit(mapping = dc) 69 72 return redirect("%s/clearance_edit_form" % info['clear'].absolute_url())
Note: See TracChangeset for help on using the changeset viewer.