Changeset 1571 for WAeUP_SRP/trunk/skins/waeup_student
- Timestamp:
- 17 Mar 2007, 15:25:56 (18 years ago)
- Location:
- WAeUP_SRP/trunk/skins/waeup_student
- Files:
-
- 1 added
- 1 deleted
- 32 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_student/add_course_result.py
r1520 r1571 12 12 add a StudentCourseResult object 13 13 """ 14 15 import logging 16 logger = logging.getLogger('Skins.add_course_result') 17 14 18 from urllib import urlencode 15 19 try: … … 23 27 aq_portal = context.portal_catalog.evalAdvancedQuery 24 28 course_id = request.get('course_id') 29 30 mtool = context.portal_membership 31 member = mtool.getAuthenticatedMember() 32 33 25 34 d = context.getCourseInfo(course_id) 26 35 args = {} … … 28 37 while True: 29 38 if d['title'] == 'unknown': 30 err = "No such course" 39 err = "No such course!" 40 logger.info('%s tried to add StudentCourseResult object %s for non-existing course' % (member,course_id)) 31 41 break 32 42 if context.hasObject(course_id): 33 err = "Course already exists" 43 err = "Course already exists!" 44 logger.info('%s tried to add StudentCourseResult object %s which is already in course list' % (member,course_id)) 34 45 break 35 46 if context.hasObject("%s_co" % course_id): 36 err = "Course already exists as carryover course" 47 err = "Course already exists as carryover course!" 48 logger.info('%s tried to add StudentCourseResult object %s which already exists as carryover course' % (member,course_id)) 37 49 break 38 50 break … … 40 52 if err: 41 53 args['course_id'] = course_id 42 args['error'] = err 54 #args['error'] = err 55 args['portal_status_message'] = err 43 56 url = "%s?%s" % (context.absolute_url(),urlencode(args)) 44 57 return request.RESPONSE.redirect(url) 58 59 45 60 cr_id = context.invokeFactory('StudentCourseResult',course_id) 46 61 #set_trace() … … 50 65 context.portal_workflow.doActionFor(cr,'close') 51 66 args['course_id'] = course_id 67 68 logger.info('%s added StudentCourseResult object %s' % (member,course_id)) 69 52 70 from urllib import urlencode 53 71 url = "%s?%s" % (context.absolute_url(),urlencode(args)) -
WAeUP_SRP/trunk/skins/waeup_student/add_student.py
r1422 r1571 13 13 acco_cat = context.portal_accommodation 14 14 import logging 15 logger = logging.getLogger('S tudent.Add')15 logger = logging.getLogger('Skins.add_student') 16 16 17 17 validate = REQUEST.has_key("cpsdocument_edit_button") and\ … … 67 67 student_rec = context.getFormattedStudentEntry(context.students_catalog(id = sid)[0]) 68 68 psm = "Student record with Id %s and Password %s has been created." % (sid,password) 69 logger.info(' "%s","created student","%s"' % (member,sid))69 logger.info('%s created student %s' % (member,sid)) 70 70 return context.add_student_form(rendered = rendered, 71 71 #psm = "%s, %s" % (psm,ds), -
WAeUP_SRP/trunk/skins/waeup_student/application_edit.py
r1343 r1571 16 16 current = DateTime.DateTime() 17 17 import logging 18 logger = logging.getLogger('S tudent.Application.Edit')18 logger = logging.getLogger('Skins.application_edit') 19 19 20 20 # Until ajax posts directly to its own script... … … 30 30 31 31 if info is None: 32 logger.info(' "anonymous access","%s"' % REQUEST.get('URL0'))32 logger.info('Anonymous user tried to access %s"' % REQUEST.get('URL0')) 33 33 return REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url()) 34 34 … … 56 56 elif cpsdocument_edit_and_view_button: 57 57 if 1: ## app_doc.passport is not None: 58 logger.info(' "%s", "proceeded to start clearance"' % (info['id']))58 logger.info('%s proceeded to start clearance' % (info['id'])) 59 59 action = "/start_clearance" 60 60 base_url = student.absolute_url() -
WAeUP_SRP/trunk/skins/waeup_student/change_password.py
r1527 r1571 14 14 current = DateTime.DateTime() 15 15 #pr = context.portal_registration 16 logger = logging.getLogger('S tudent.change_password')16 logger = logging.getLogger('Skins.change_password') 17 17 validate = request.has_key("change_password") 18 18 students_dir = context.portal_directories.students … … 24 24 requested_id = context.getStudentId() 25 25 if requested_id and not context.isStaff() and member_id != requested_id: 26 logger.info(' "%s", "tried to access", "%s"' % (member_id,requested_id))26 logger.info('%s tried to access %s' % (member_id,requested_id)) 27 27 return None 28 28 elif context.isStaff(): … … 74 74 args['__ac_name'] = student_id 75 75 args['__ac_password'] = password 76 logger.info('%s changed password from %s to %s' % (member_id,old_password,password)) 76 77 from urllib import urlencode 77 78 url = "%s/logged_in?%s" % (context.absolute_url(),urlencode(args)) -
WAeUP_SRP/trunk/skins/waeup_student/clearance_edit.py
r1217 r1571 16 16 current = DateTime.DateTime() 17 17 import logging 18 logger = logging.getLogger('S tudent.Clearance.Edit')18 logger = logging.getLogger('Skins.clearance_edit') 19 19 request = REQUEST 20 20 … … 70 70 if cpsdocument_edit_button or result_edit_button: 71 71 psm = "Content changed!" 72 logger.info(' "%s","edited clearance of","%s"' % (member_id,student_id ))72 logger.info('%s edited clearance of %s' % (member_id,student_id )) 73 73 if clear_doc.clr_ac_pin == "": 74 74 res = context.portal_pins(student=member_id) … … 92 92 missing = True 93 93 if missing: 94 logger.info(' "%s","requested clearance with documents missing"' % (student_id))94 logger.info('%s requested clearance with documents missing' % (student_id)) 95 95 psm = "You have not uploaded all necessary documents to request clearance!" 96 96 else: 97 logger.info(' "%s","requested clearance"' % (student_id))97 logger.info('%s requested clearance' % (student_id)) 98 98 info['clear_doc'].edit(mapping = {'request_date': current,}) 99 99 wftool.doActionFor(info['clear'],'close') … … 103 103 action = "/clearance_view" 104 104 elif acknowledge and info['review_state'] != "clearance_pin_entered": 105 logger.info(' "%s","repeatedly requested clearance"' % (student_id))105 logger.info('%s repeatedly requested clearance' % (student_id)) 106 106 psm = "You have already requested clearance!" 107 107 else: 108 108 psm = "You must tick the acknowledgement check box before submission!" 109 109 elif clear_and_validate_button and info['review_state'] == "clearance_requested": 110 logger.info(' "%s","cleared","%s"' % (member_id,student_id ))110 logger.info('%s cleared %s' % (member_id,student_id )) 111 111 #from Products.zdb import set_trace 112 112 #set_trace() … … 117 117 psm = "This student is already cleared!" 118 118 elif reject_clearance_button: 119 logger.info(' "%s","rejected clearance for","%s"' % (member_id,student_id ))119 logger.info('%s rejected clearance for %s' % (member_id,student_id )) 120 120 wftool.doActionFor(info['clear'],'open') 121 121 wftool.doActionFor(info['student'],'reject_clearance') -
WAeUP_SRP/trunk/skins/waeup_student/create_level.py
r1552 r1571 21 21 response = request.RESPONSE 22 22 redirect = response.redirect 23 logger = logging.getLogger('S tudent.create_level')23 logger = logging.getLogger('Skins.create_level') 24 24 mtool = context.portal_membership 25 25 member = mtool.getAuthenticatedMember() … … 46 46 level = getattr(context,current_level) 47 47 return response.redirect("%s" % level.absolute_url()) 48 48 49 49 context.invokeFactory('StudentStudyLevel',"%s" % current_level) 50 50 level = getattr(context,"%s" % current_level) … … 63 63 c_res = aq_courses(query) 64 64 if not c_res: 65 logger.info(' "%s","%s course not found in courses catalog"' % (student.id,co.CosCode))65 logger.info('%s", course %s not found in courses_catalog' % (student.id,co.CosCode)) 66 66 continue 67 67 course_cat_entry = c_res[0] … … 73 73 score = int(co.Score) 74 74 except: 75 logger.info(' "%s"," course %s invalid score %s"' % (student.id,75 logger.info('%s, course %s has invalid score %s"' % (student.id, 76 76 co.CosCode, 77 77 co.Score)) 78 78 continue 79 if int(c_res[0].passmark) <= score: 79 if int(c_res[0].passmark) <= score: 80 80 continue 81 81 carry_over = True -
WAeUP_SRP/trunk/skins/waeup_student/getAccommodationInfo.py
r1474 r1571 13 13 """ 14 14 import logging 15 logger = logging.getLogger('S tudent.Accommodation.Info')15 logger = logging.getLogger('Skins.getAccommodationInfo') 16 16 import DateTime 17 17 … … 29 29 requested_id = context.getStudentId() 30 30 if requested_id and not context.isStaff() and member_id != requested_id: 31 logger.info(' "%s", "tried to access", "%s"' % (member_id,requested_id))31 logger.info('%s tried to access %s' % (member_id,requested_id)) 32 32 return None 33 33 elif context.isStaff(): … … 37 37 res = context.students_catalog(id=student_id) 38 38 if len(res) != 1: 39 logger.info(' "%s","not found in students_catalog"')39 logger.info('%s not found in students_catalog' % student_id) 40 40 return None 41 41 -
WAeUP_SRP/trunk/skins/waeup_student/getApplicationInfo.py
r1435 r1571 13 13 """ 14 14 import logging 15 logger = logging.getLogger('S tudent.Application.Info')15 logger = logging.getLogger('Skins.getApplicationInfo') 16 16 17 17 request = context.REQUEST … … 28 28 requested_id = context.getStudentId() 29 29 if requested_id and not context.isStaff() and member_id != requested_id: 30 logger.info(' "%s", "accessed application object of", "%s"' % (member_id,requested_id))30 logger.info('%s tried to access application object of %s' % (member_id,requested_id)) 31 31 student_id = requested_id 32 return None 32 33 elif context.isStaff(): 33 34 student_id = requested_id -
WAeUP_SRP/trunk/skins/waeup_student/getClearanceInfo.py
r1162 r1571 13 13 """ 14 14 import logging 15 logger = logging.getLogger('S tudent.Clearance.Info')15 logger = logging.getLogger('Skins.getClearanceInfo') 16 16 from DateTime import DateTime 17 17 … … 30 30 requested_id = context.getStudentId() 31 31 if requested_id and not context.isStaff() and member_id != requested_id: 32 logger.info(' "%s", "tried to access", "%s"' % (member_id,requested_id))32 logger.info('%s tried to access %s' % (member_id,requested_id)) 33 33 return None 34 34 elif context.isStaff(): -
WAeUP_SRP/trunk/skins/waeup_student/getMemberInfo.py
r1541 r1571 28 28 requested_id = context.getStudentId() 29 29 if requested_id and not context.isStaff() and member_id != requested_id: 30 logger.info(' "%s", "accessed personal object of", "%s"' % (member_id,requested_id))30 logger.info('%s tried to access personal object of %s' % (member_id,requested_id)) 31 31 student_id = requested_id 32 return None 32 33 elif context.isStaff(): 33 34 student_id = requested_id -
WAeUP_SRP/trunk/skins/waeup_student/getNewStudentStatistics.py
r1530 r1571 13 13 """ 14 14 import logging 15 logger = logging.getLogger('S tudent.Statistics')15 logger = logging.getLogger('Skins.getNewStudentStatistics') 16 16 17 17 try: … … 21 21 except: 22 22 evalAdvancedQuery = None 23 logger.info(' "%s","invoked new statistics"' % context.portal_membership.getAuthenticatedMember())23 logger.info('%s invoked statistics' % context.portal_membership.getAuthenticatedMember()) 24 24 l = [] 25 25 if not context.isStaff(): … … 108 108 if total: 109 109 dep['cleared_and_validated_percent'] = "%.0f" % round(cav*100/total) 110 110 111 111 ora = len([s for s in fac_ids if s in or_ids]) 112 112 dep['objection_raised'] = ora -
WAeUP_SRP/trunk/skins/waeup_student/getPersonalInfo.py
r1203 r1571 13 13 """ 14 14 import logging 15 logger = logging.getLogger('S tudent.Personal.Info')15 logger = logging.getLogger('Skins.getPersonalInfo') 16 16 17 17 request = context.REQUEST … … 28 28 requested_id = context.getStudentId() 29 29 if requested_id and not context.isStaff() and member_id != requested_id: 30 logger.info(' "%s", "accessed personal object of", "%s"' % (member_id,requested_id))30 logger.info('%s tried to access personal object of %s' % (member_id,requested_id)) 31 31 student_id = requested_id 32 return None 32 33 elif context.isStaff(): 33 34 student_id = requested_id -
WAeUP_SRP/trunk/skins/waeup_student/getRegStatistics.py
r1530 r1571 13 13 """ 14 14 import logging 15 logger = logging.getLogger('S tudent.Statistics')15 logger = logging.getLogger('Skins.getRegStatistics') 16 16 17 17 try: … … 21 21 except: 22 22 evalAdvancedQuery = None 23 logger.info(' "%s","invoked reg statistics"' % context.portal_membership.getAuthenticatedMember())23 logger.info('%s invoked statistics' % context.portal_membership.getAuthenticatedMember()) 24 24 l = [] 25 25 if not context.isStaff(): … … 81 81 if total: 82 82 dep['courses_registered_percent'] = "%.0f" % round(creg*100/total) 83 83 84 84 cval = len([s for s in fac_ids if s in cval_ids]) 85 85 dep['courses_validated'] = cval -
WAeUP_SRP/trunk/skins/waeup_student/getRetStudentStatistics.py
r1551 r1571 21 21 except: 22 22 evalAdvancedQuery = None 23 logger.info('%s invoked returningstatistics' % context.portal_membership.getAuthenticatedMember())23 logger.info('%s invoked statistics' % context.portal_membership.getAuthenticatedMember()) 24 24 l = [] 25 25 if not context.isStaff(): … … 59 59 sum_ret += ret 60 60 sum_sfp += sfp 61 61 62 62 l.append(dep) 63 63 -
WAeUP_SRP/trunk/skins/waeup_student/getSchoolFeePrefix.py
r1364 r1571 1 ## Script (Python) "get MaintenancePrefix"1 ## Script (Python) "getSchoolFeePrefix" 2 2 ##bind container=container 3 3 ##bind context=context … … 16 16 return None 17 17 18 import logging 19 logger = logging.getLogger(' EPayment.getSchoolFeePrefix')18 import logging 19 logger = logging.getLogger('Skins.getSchoolFeePrefix') 20 20 21 21 student_id = context.getStudentId() … … 24 24 id = sbrain.course) 25 25 if not res: 26 logger.info(' "%s","certificate not found", "%s"' % (student_id,course))26 logger.info('%s, certificate %s not found' % (student_id,course)) 27 27 prefix = "--" 28 28 else: -
WAeUP_SRP/trunk/skins/waeup_student/getSessionResults.py
r1543 r1571 27 27 if requested_id and not context.isStaff() and member_id != requested_id: 28 28 import logging 29 logger = logging.getLogger('S tudent.SessionResults.Info')30 logger.info(' "%s", "tried to access", "%s"' % (member_id,requested_id))29 logger = logging.getLogger('Skins.getSessionResults') 30 logger.info('%s tried to access %s' % (member_id,requested_id)) 31 31 return None 32 32 elif context.isStaff(): -
WAeUP_SRP/trunk/skins/waeup_student/getStudentBaseInfo.py
r1369 r1571 13 13 """ 14 14 import logging 15 logger = logging.getLogger('S tudent.Base.Info')15 logger = logging.getLogger('Skins.getStudentBaseInfo') 16 16 from DateTime import DateTime 17 17 … … 29 29 requested_id = context.getStudentId() 30 30 if requested_id and not context.isStaff() and member_id != requested_id: 31 logger.info(' "%s", "tried to access", "%s"' % (member_id,requested_id))31 logger.info('%s tried to access %s' % (member_id,requested_id)) 32 32 return None 33 33 elif context.isStaff(): -
WAeUP_SRP/trunk/skins/waeup_student/getStudentFolderInfo.py
r1472 r1571 1 ## Script (Python) "getStudent Info"1 ## Script (Python) "getStudentFolderInfo" 2 2 ##bind container=container 3 3 ##bind context=context … … 21 21 22 22 import logging 23 logger = logging.getLogger('S tudent.Info')23 logger = logging.getLogger('Skins.getStudentFolderInfo') 24 24 25 25 … … 38 38 break 39 39 if member_id != requested_id: 40 logger.info(' "%s", "tried to access", "%s"' % (member_id,requested_id))40 logger.info('%s tried to access %s' % (member_id,requested_id)) 41 41 student_id = member_id 42 42 mtool.assertViewable(context) -
WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py
r1286 r1571 21 21 22 22 import logging 23 logger = logging.getLogger('S tudent.Info')23 logger = logging.getLogger('Skins.getStudentInfo') 24 24 25 25 … … 42 42 break 43 43 if member_id != requested_id: 44 logger.info(' "%s", "tried to access", "%s"' % (member_id,requested_id))44 logger.info('%s tried to access %s' % (member_id,requested_id)) 45 45 student_id = member_id 46 46 mtool.assertViewable(context) -
WAeUP_SRP/trunk/skins/waeup_student/getStudyCourseInfo.py
r1565 r1571 53 53 review_state = wftool.getInfoFor(context,'review_state',None) 54 54 student_review_state = context.getStudentReviewState() 55 if review_state != 'content_addable' and context.isStudent() and student_review_state = 'school_fee_paid':55 if review_state != 'content_addable' and student_review_state == 'school_fee_paid': #and context.isStudent(): 56 56 wftool.doActionFor(context,'close_for_edit') 57 57 may_register = (student_review_state in ('school_fee_paid',)) and\ -
WAeUP_SRP/trunk/skins/waeup_student/getTransferInfo.py
r1368 r1571 1 ## Script (Python) "get ClearanceInfo"1 ## Script (Python) "getTransferInfo" 2 2 ##bind container=container 3 3 ##bind context=context … … 13 13 """ 14 14 import logging 15 logger = logging.getLogger('S tudent.Transfer.Info')15 logger = logging.getLogger('Skins.getTransferInfo') 16 16 from DateTime import DateTime 17 17 … … 29 29 requested_id = context.getStudentId() 30 30 if requested_id and not context.isStaff() and member_id != requested_id: 31 logger.info(' "%s", "tried to access", "%s"' % (member_id,requested_id))31 logger.info('%s tried to access %s' % (member_id,requested_id)) 32 32 return None 33 33 elif context.isStaff(): -
WAeUP_SRP/trunk/skins/waeup_student/personal_edit.py
r1457 r1571 16 16 current = DateTime.DateTime() 17 17 import logging 18 logger = logging.getLogger('S tudent.Personal.Edit')18 logger = logging.getLogger('Skins.personal_edit') 19 19 20 20 info = context.getPersonalInfo() 21 21 22 22 if info is None: 23 logger.info(' "anonymous access","%s"' % REQUEST.get('URL0'))23 logger.info('Anonymous user tried to access %s' % REQUEST.get('URL0')) 24 24 return REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url()) 25 25 … … 53 53 sex = ds.get('sex'), 54 54 ) 55 logger.info(' "%s", "edited personal data"' % (info['id']))55 logger.info('%s edited personal data' % (info['id'])) 56 56 #action = "" 57 57 #base_url = student.absolute_url() -
WAeUP_SRP/trunk/skins/waeup_student/raise_objection.py
r1161 r1571 14 14 import DateTime 15 15 import logging 16 logger = logging.getLogger('S tudent.Objection')16 logger = logging.getLogger('Skins.raise_objection') 17 17 18 18 wf = context.portal_workflow 19 19 info = context.getApplicationInfo() 20 20 if not info: 21 logger.info(' "%s", "tried to access", "%s"' % (context.portal_membership.getAuthenticatedMember(),context.getStudentId()))21 logger.info('%s tried to access %s' % (context.portal_membership.getAuthenticatedMember(),context.getStudentId())) 22 22 return context.admission_form() 23 23 current = DateTime.DateTime() -
WAeUP_SRP/trunk/skins/waeup_student/refresh_level.py
r1510 r1571 16 16 aq_courses = context.courses_catalog.evalAdvancedQuery 17 17 18 import logging 19 logger = logging.getLogger('Skins.refresh_level') 20 18 21 current = DateTime.DateTime() 19 22 request = context.REQUEST … … 21 24 response = request.RESPONSE 22 25 redirect = response.redirect 23 logger = logging.getLogger('S tudent.create_level')26 logger = logging.getLogger('Skins.refresh_level') 24 27 mtool = context.portal_membership 25 28 member = mtool.getAuthenticatedMember() … … 51 54 c_res = aq_courses(query) 52 55 if not c_res: 53 logger.info(' "%s","%s course not found in courses catalog"' % (student.id,co.CosCode))56 logger.info('%s, course %s not found in courses_catalog' % (student.id,co.CosCode)) 54 57 continue 55 58 course_cat_entry = c_res[0] … … 60 63 score = int(co.Score) 61 64 except: 62 logger.info(' "%s"," course %s invalid score %s"' % (student.id,65 logger.info('%s, course %s has invalid score %s' % (student.id, 63 66 co.CosCode, 64 67 co.Score)) 65 68 continue 66 if int(c_res[0].passmark) <= score: 69 if int(c_res[0].passmark) <= score: 67 70 continue 68 71 carry_over = True … … 96 99 course_result.getContent().edit(mapping=d) 97 100 session.set('in_progress','finished') 101 logger.info('%s updated course list' % member) 98 102 return 99 103 return response.redirect("%s" % level.absolute_url()) -
WAeUP_SRP/trunk/skins/waeup_student/register_courses.py
r1513 r1571 1 ## Script (Python) " getStudyCourseInfo"1 ## Script (Python) "register_courses" 2 2 ##bind container=container 3 3 ##bind context=context … … 23 23 member_id = str(member) 24 24 import logging 25 logger = logging.getLogger('S tudent.register_courses')25 logger = logging.getLogger('Skins.register_courses') 26 26 27 27 wftool = context.portal_workflow … … 30 30 student = getattr(students_folder,context.getStudentId()) 31 31 wftool.doActionFor(student,'register_courses') 32 logger.info(' "%s","courses registered"' % student.getId())32 logger.info('%s registered course list' % student.getId()) 33 33 return request.RESPONSE.redirect("%s" % context.absolute_url()) -
WAeUP_SRP/trunk/skins/waeup_student/reject_courses.py
r1515 r1571 1 ## Script (Python) " getStudyCourseInfo"1 ## Script (Python) "reject_courses" 2 2 ##bind container=container 3 3 ##bind context=context … … 23 23 member_id = str(member) 24 24 import logging 25 logger = logging.getLogger('S tudent.reject_courses')25 logger = logging.getLogger('Skins.reject_courses') 26 26 27 27 wftool = context.portal_workflow … … 31 31 student = getattr(students_folder,context.getStudentId()) 32 32 wftool.doActionFor(student,'reject_courses') 33 logger.info(' "%s","rejects course list for","%s"' % (member,student.getId()))33 logger.info('%s rejected course list of %s' % (member,student.getId())) 34 34 return request.RESPONSE.redirect("%s" % context.absolute_url()) -
WAeUP_SRP/trunk/skins/waeup_student/request_transfer.py
r1378 r1571 14 14 import logging 15 15 from urllib import urlencode 16 logger = logging.getLogger('S tudent.Transfer.Request')16 logger = logging.getLogger('Skins_request_transfer') 17 17 import DateTime 18 18 lt = context.portal_layouts … … 28 28 requested_id = context.getStudentId() 29 29 if requested_id and not context.isStaff() and member_id != requested_id: 30 logger.info(' "%s", "accessed application object of", "%s"' % (member_id,requested_id))30 logger.info('%s tried to access object of %s' % (member_id,requested_id)) 31 31 student_id = requested_id 32 return None 32 33 elif context.isStaff(): 33 34 student_id = requested_id … … 50 51 51 52 if paid: 52 logger.info(' "%s", "opened (paid) request transfer form of", "%s"' % (member_id,student_id))53 logger.info('%s opened (paid) request transfer form of %s' % (member_id,student_id)) 53 54 return context.request_transfer_form(rendered = None, 54 55 psm = None, … … 91 92 payments = getattr(student,'payments') 92 93 #from Products.zdb import set_trace; set_trace() 94 95 logger.info('%s paid transfer form for %s' % (member_id,student_id)) 93 96 info = {} 94 97 order_id = ds.get('pin_n') -
WAeUP_SRP/trunk/skins/waeup_student/search_students.py
r1557 r1571 13 13 """ 14 14 import logging 15 logger = logging.getLogger('S earch.Timer')15 logger = logging.getLogger('Skins.search_students') 16 16 from DateTime import DateTime 17 17 # … … 82 82 In('localUsersWithRoles', ("user:%s" % member,)) 83 83 res = evalAdvancedQuery(query) 84 logger.info('ClearanceOfficer %s initiated student_search' % member) 84 85 faculties = [] 85 86 if res: … … 107 108 In('localUsersWithRoles', ("user:%s" % member,)) 108 109 res = evalAdvancedQuery(query) 110 logger.info('CourseAdviser %s initiated student_search' % member) 109 111 certificate_level = [] 110 112 if res: … … 168 170 students_folder = context.portal_url.getPortalObject().campus.students 169 171 if hasattr(students_folder,term.strip()): 172 logger.info('%s searches for student with id %s' % (member,term)) 170 173 request.RESPONSE.redirect("%s/%s" % (students_folder.absolute_url(),term)) 171 174 return context.search_students_form(rendered = rend, … … 176 179 elif what == "department": 177 180 res = context.students_catalog(department=term.strip()) 181 logger.info('%s searches for student in department %s' % (member,term)) 178 182 search_set = [r.id for r in res] 179 183 elif what == "matric_no": 180 184 res = context.students_catalog(matric_no=term.strip()) 185 logger.info('%s searches for student with matric_no %s' % (member,term)) 181 186 search_set = [r.id for r in res] 182 187 elif what == "jamb_reg_no": … … 184 189 st_u = "%s" % term.strip().upper() 185 190 res = aq_students(In('jamb_reg_no',(st_l,st_u))) 191 logger.info('%s searches for student with jamb_reg_no %s' % (member,term)) 186 192 search_set = [r.id for r in res] 187 193 elif what == "name": 188 194 pt = ('StudentPersonal') 189 195 query = In('portal_type',pt) & Eq('SearchableText',"%s*" % term.strip()) 196 logger.info('%s searches for student with name %s' % (member,term)) 190 197 res = evalAdvancedQuery(query) 191 198 if res: … … 201 208 query = Eq('review_state',state) 202 209 review_res = evalAdvancedQuery(query) 210 211 logger.info('%s searches for students in review_state %s' % (member,state)) 212 203 213 if with_timer: 204 214 end = DateTime().timeTime() -
WAeUP_SRP/trunk/skins/waeup_student/set_access_data.py
r1267 r1571 8 8 current = DateTime.DateTime() 9 9 pr = context.portal_registration 10 logger = logging.getLogger('S tudent.SetAccessData')10 logger = logging.getLogger('Skins.set_access_data') 11 11 validate = REQUEST.has_key("cpsdocument_edit_button") 12 12 … … 21 21 sid = st_res[0].id 22 22 else: 23 logger.info(' "%s","Studentobject does not exist"' % matric_no)23 logger.info('Student object with matric_no does not exist' % matric_no) 24 24 res,psm,ds = lt.renderLayout(layout_id= 'student_session_results_search', 25 25 schema_id= 'student_returning', … … 53 53 #psm = "You are already registered please log in with your UserId %s" % sid 54 54 psm = "" 55 logger.info(' "%s","repeatedly tried to set password"' % sid)55 logger.info('%s repeatedly tried to set password' % sid) 56 56 except: 57 57 psm = "The system encountered an error. Please try again." 58 logger.info(' "%s","set_access error","%s"' % (sid,password))58 logger.info('%s, makeStudentMember error, password = %s' % (sid,password)) 59 59 if psm != '': 60 60 return context.set_access_data_form(rendered = res, -
WAeUP_SRP/trunk/skins/waeup_student/start_clearance.py
r1364 r1571 8 8 pr = context.portal_registration 9 9 import logging 10 logger = logging.getLogger('S tudent.Clearance.Start')10 logger = logging.getLogger('Skins.start_clearance') 11 11 12 12 #type_name = 'Student' … … 23 23 if info is None: 24 24 member_id = str(context.portal_membership.getAuthenticatedMember()) 25 logger.info(' "%s","tried to start clearance for", "%s"' % (member_id,request.get('PATH_INFO').split('/')[-2]))25 logger.info('%s tried to start clearance for %s' % (member_id,request.get('PATH_INFO').split('/')[-2])) 26 26 return redirect("%s/srp_invalid_access" % context.portal_url()) 27 27 app_doc = info['app_doc'] … … 55 55 psm = "You have already entered a clearance pin!" 56 56 error = True 57 logger.info(' "%s", "tried to start clearance though already started"' % (info['id']))57 logger.info('%s tried to start clearance though already started' % (info['id'])) 58 58 elif psm == 'invalid': 59 59 psm = "Please correct your input!" 60 60 error = True 61 logger.info(' "%s","entered wrong clearance pin"' % (info['id']))61 logger.info('%s entered wrong clearance pin' % (info['id'])) 62 62 elif app_doc.passport is None: 63 63 #psm = "You must upload your passport picture before you can start the registration process!" 64 64 #error = True 65 logger.info(' "%s", "started clearance without passport picture"' % (info['id']))65 logger.info('%s started clearance without passport picture' % (info['id'])) 66 66 if error: 67 67 return context.clearance_pin_form(rendered = res, … … 74 74 session.set("clicked","clicked") 75 75 pin = str(ds.get('clr_ac_pin')) 76 logger.info(' "%s", "started clearance with pin", "%s"' % (info['id'],pin))76 logger.info('%s started clearance with pin %s' % (info['id'],pin)) 77 77 wf.doActionFor(info['student'],'enter_clearance_pin') 78 78 wf.doActionFor(info['clear'],'open') … … 89 89 90 90 if info['penalty']: 91 logger.info(' "%s","started late clearance"' % (info['id']))91 logger.info('%s started late clearance' % (info['id'])) 92 92 93 93 return redirect("%s/clearance_edit_form" % info['clear'].absolute_url()) -
WAeUP_SRP/trunk/skins/waeup_student/study_level_view.pt
r1562 r1571 101 101 <td align="left" valign="top" rowspan="3"></td> 102 102 <td align="left" valign="top"> 103 <input type="submit" name=" course_result_delete:method" value="Delete selected"103 <input type="submit" name="delete_course_result:method" value="Delete selected" 104 104 class="destructive" i18n:attributes="value" 105 105 tal:attributes="onclick python:'return window.confirm(\'%s\')' % … … 127 127 % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))" 128 128 /> 129 <input type="submit" name=" course_result_delete:method" value="Delete selected"129 <input type="submit" name="delete_course_result:method" value="Delete selected" 130 130 class="destructive" i18n:attributes="value" 131 131 tal:attributes="onclick python:'return window.confirm(\'%s\')' % … … 159 159 /> 160 160 <input tal:condition="python: review_state == 'school_fee_paid'" 161 type="submit" name=" course_result_delete:method" value="Delete selected"161 type="submit" name="delete_course_result:method" value="Delete selected" 162 162 class="destructive" i18n:attributes="value" 163 163 tal:attributes="onclick python:'return window.confirm(\'%s\')' % … … 188 188 <td><input type="text" name="course_id" 189 189 tal:attributes="value request/course_id|nothing"/></td> 190 <td tal:condition="request/error|nothing"191 tal:content="request/error" />192 190 <td colspan="2"> 193 191 <input type="submit" name="add" -
WAeUP_SRP/trunk/skins/waeup_student/validate_courses.py
r1513 r1571 1 ## Script (Python) " getStudyCourseInfo"1 ## Script (Python) "validate_courses" 2 2 ##bind container=container 3 3 ##bind context=context … … 23 23 member_id = str(member) 24 24 import logging 25 logger = logging.getLogger('S tudent.validate_courses')25 logger = logging.getLogger('Skins.validate_courses') 26 26 27 27 wftool = context.portal_workflow … … 29 29 student = getattr(students_folder,context.getStudentId()) 30 30 wftool.doActionFor(student,'validate_courses') 31 logger.info(' "%s","validated courses for","%s"' % (member,student.getId()))31 logger.info('%s validated course list for %s' % (member,student.getId())) 32 32 return request.RESPONSE.redirect("%s" % context.absolute_url())
Note: See TracChangeset for help on using the changeset viewer.