- Timestamp:
- 19 Mar 2007, 21:45:44 (18 years ago)
- Location:
- WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student
- Files:
-
- 2 deleted
- 41 edited
- 5 copied
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/add_course_result.py
r1520 r1596 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/branches/joachim-event-branch/skins/waeup_student/add_student.py
r1422 r1596 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/branches/joachim-event-branch/skins/waeup_student/application_edit.py
r1343 r1596 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/branches/joachim-event-branch/skins/waeup_student/change_password.py
r1527 r1596 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/branches/joachim-event-branch/skins/waeup_student/clearance_edit.py
r1217 r1596 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') 122 122 action = "/contact_student_form" 123 123 psm = "Student's clearance request has been rejected! Please fill and submit the form below!" 124 subject = "Clearance request rejected" 125 args['subject'] = subject 126 args['continue'] = 'external_clearance_edit_form' 124 127 else: 125 128 psm = "Please correct your errors!" … … 128 131 args['portal_status_message'] = psm 129 132 url = clear.absolute_url() + action + '?' + urlencode(args) 130 REQUEST.RESPONSE.redirect(url)133 return REQUEST.RESPONSE.redirect(url) 131 134 -
WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/clearance_slip.pt
r1156 r1596 1 <metal: html tal:define="info context/getClearanceInfo">2 <metal:body use-macro="here/main_template/macros/master">3 <metal:main fill-slot="main">1 <metal:body use-macro="here/main_template/macros/master"> 2 <metal:main fill-slot="main" 3 tal:define="info context/getClearanceInfo"> 4 4 <span tal:condition="not: info"> 5 5 <span tal:content="here/illegal_view" /> … … 66 66 </span> 67 67 </metal:main> 68 </metal:body> 69 </metal:html> 68 </metal:body> -
WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/contact_student_form.pt
r1455 r1596 1 <metal:block define-macro="contact_student_form"> 1 2 <metal:body use-macro="here/main_template/macros/master"> 2 3 <metal:main fill-slot="main" 3 4 tal:define="member python:context.portal_membership.getAuthenticatedMember(); 4 5 info context/getStudentBaseInfo; 6 subject python:context.REQUEST.get('subject'); 7 continue python:context.REQUEST.get('continue') 5 8 "> 6 9 <span tal:condition="not: info"> … … 8 11 </span> 9 12 10 <span tal:condition=" info">13 <span tal:condition="python: info and subject"> 11 14 <h3>Contact Student</h3> 12 15 <br /> … … 23 26 <input type="hidden" name="student_email" type="text" id="student_email" 24 27 tal:attributes="value info/student/email"/> 25 28 <input type="hidden" name="probtype" type="text" id="probtype" 29 tal:attributes="value subject"/> 30 26 31 <table width="100%" border="0" cellspacing="5" cellpadding="0"> 27 32 <tr> … … 42 47 </tr> 43 48 <tr> 44 <td >45 <strong> Type of Rejection: </strong>49 <td valign="top"> 50 <strong>Reason of Notification: </strong> 46 51 </td> 47 <td> 48 <select name="probtype" class="boxgreen" id="probtype"> 49 <option>Clearance request rejected</option> 50 </select> 52 <td valign="bottom"> 53 <span tal:content="subject" /> 51 54 </td> 52 55 </tr> … … 67 70 </span> 68 71 <form action="." method="post" class="group"> 69 <input type="submit" name="external_clearance_edit_form:method" 72 <input type="submit" name="." 73 tal:attributes="name string:${continue}:method" 70 74 class="context" value="Continue" /> 71 75 </form> … … 73 77 </metal:main> 74 78 </metal:body> 79 </metal:block> -
WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/course_registration_slip.pt
r1516 r1596 1 <metal:html tal:define="info context/getStudyLevelInfo; 1 <metal:body use-macro="here/main_template/macros/master"> 2 <metal:main fill-slot="main" 3 tal:define="info context/getStudyLevelInfo; 2 4 is_so context/isSectionOfficer; 3 5 is_ca info/is_ca; 4 6 show_check_boxes info/show_check_boxes; 5 is_student info/is_student; 6 status_info info/status_info; 7 review_state info/review_state; 8 view_only info/view_only"> 9 <metal:body use-macro="here/main_template/macros/master"> 10 <metal:main fill-slot="main"> 7 validated python:context.getStudentReviewState() in ('courses_validated',); 8 is_student info/is_student; 9 status_info info/status_info; 10 review_state info/review_state; 11 view_only info/view_only"> 11 12 <span tal:condition="not: info"> 12 13 <span tal:content="here/illegal_view" /> … … 14 15 <span tal:condition="info"> 15 16 <h3>Course Registration Slip</h3> 17 16 18 <br /> 17 <table width="" cellpadding="2" cellspacing="0"> 19 20 <div tal:condition="validated"> 21 - validated by Course Adviser - 22 </div> 23 <div tal:condition="not: validated"> 24 - not yet validated by Course Adviser - 25 </div> 26 27 <br /> 28 <span tal:omit-tag="" 29 tal:content="structure python: info['app_doc'].render(proxy=info['app_doc'], 30 layout_mode='view_info', 31 layout_id='student_application_fe')" 32 /> 33 34 <table cellpadding="2" cellspacing="0"> 18 35 <tr> 19 <td valign="top"><span class="dlabel">Name</span>: 20 </td> 21 <td> 22 <span tal:content="info/student/name" /> 23 </td> 24 </tr> 25 <tr> 26 <td valign="top"><span class="dlabel">Student Id</span>: 27 </td> 28 <td> 29 <span tal:content="info/student/id" /> 30 </td> 31 </tr> 32 <tr> 33 <td valign="top"><span class="dlabel">Matriculation No</span>: 34 </td> 35 <td> 36 <span tal:content="info/student/matric_no" /> 37 </td> 38 </tr> 39 <tr> 40 <td valign="top"><span class="dlabel">Faculty Id</span>: 36 <td valign="top" width="180px"><span class="dlabel">Faculty Id</span>: 41 37 </td> 42 38 <td> … … 111 107 </span> 112 108 </metal:main> 113 </metal:body> 114 </metal:html> 109 </metal:body> 115 110 -
WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/create_level.py
r1558 r1596 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() … … 30 30 cert_id = student.course 31 31 current_level = student.level 32 in_progress = session.get('in_progress','finished') 33 if in_progress == 'finished': 32 in_progress = request.get('in_progress','not started') 33 34 if context.hasObject(current_level): 35 response.redirect("%s/%s" % (context.absolute_url(),current_level)) 36 return 37 38 if in_progress in ('not started','started'): 34 39 session.set('in_progress','started') 35 view = context.in_progress_view(refresh=3,page=' %s/study_level_view' % current_level)40 view = context.in_progress_view(refresh=3,page='create_level?in_progress=started') 36 41 response.setHeader('Content-type','text/html; charset=ISO-8859-15') 37 42 response.setHeader('Content-length','%d' % (len(view))) … … 39 44 response.write(view) 40 45 response.write('') 41 elif in_progress == 'started': 42 return 46 if in_progress == 'started': 47 return 48 43 49 44 if context.hasObject(current_level):45 return46 level = getattr(context,current_level)47 return response.redirect("%s" % level.absolute_url())48 49 50 context.invokeFactory('StudentStudyLevel',"%s" % current_level) 50 51 level = getattr(context,"%s" % current_level) … … 63 64 c_res = aq_courses(query) 64 65 if not c_res: 65 logger.info(' "%s","%s course not found in courses catalog"' % (student.id,co.CosCode))66 logger.info('%s", course %s not found in courses_catalog' % (student.id,co.CosCode)) 66 67 continue 67 68 course_cat_entry = c_res[0] … … 73 74 score = int(co.Score) 74 75 except: 75 logger.info(' "%s"," course %s invalid score %s"' % (student.id,76 logger.info('%s, course %s has invalid score %s"' % (student.id, 76 77 co.CosCode, 77 78 co.Score)) 78 79 continue 79 if int(c_res[0].passmark) <= score: 80 if int(c_res[0].passmark) <= score: 80 81 continue 81 82 carry_over = True … … 105 106 d['core_or_elective'] = getattr(c.getObject().getContent(),'core_or_elective') 106 107 course_result.getContent().edit(mapping=d) 107 session.set('in_progress','finished')108 108 return -
WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/getAccommodationInfo.py
r1474 r1596 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/branches/joachim-event-branch/skins/waeup_student/getApplicationInfo.py
r1435 r1596 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/branches/joachim-event-branch/skins/waeup_student/getClearanceInfo.py
r1162 r1596 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/branches/joachim-event-branch/skins/waeup_student/getMemberInfo.py
r1541 r1596 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/branches/joachim-event-branch/skins/waeup_student/getNewStudentStatistics.py
r1530 r1596 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/branches/joachim-event-branch/skins/waeup_student/getPersonalInfo.py
r1203 r1596 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/branches/joachim-event-branch/skins/waeup_student/getRegStatistics.py
r1530 r1596 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/branches/joachim-event-branch/skins/waeup_student/getRetStudentStatistics.py
r1558 r1596 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/branches/joachim-event-branch/skins/waeup_student/getSchoolFeePrefix.py
r1364 r1596 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/branches/joachim-event-branch/skins/waeup_student/getSessionResults.py
r1543 r1596 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/branches/joachim-event-branch/skins/waeup_student/getStudentBaseInfo.py
r1369 r1596 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/branches/joachim-event-branch/skins/waeup_student/getStudentFolderInfo.py
r1472 r1596 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/branches/joachim-event-branch/skins/waeup_student/getStudentInfo.py
r1286 r1596 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/branches/joachim-event-branch/skins/waeup_student/getStudyCourseInfo.py
r1537 r1596 52 52 levels = context.objectIds() 53 53 review_state = wftool.getInfoFor(context,'review_state',None) 54 if review_state != 'content_addable': 54 student_review_state = context.getStudentReviewState() 55 if review_state != 'content_addable' and student_review_state == 'school_fee_paid': #and context.isStudent(): 55 56 wftool.doActionFor(context,'close_for_edit') 56 student_review_state = context.getStudentReviewState()57 57 may_register = (student_review_state in ('school_fee_paid',)) and\ 58 58 current_level not in levels and\ 59 59 (sbrain.verdict in ('A','B') or sbrain.jamb_reg_no.startswith('6')) 60 60 61 61 levels.sort() 62 62 info['create_level'] = None … … 72 72 info['items'] = items 73 73 74 try: 74 try: 75 75 info['verdict'] = context.portal_vocabularies.verdicts.get(info['doc'].current_verdict).upper() 76 76 except: 77 info['verdict'] = course.current_verdict 77 info['verdict'] = course.current_verdict 78 78 79 79 return info -
WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/getStudyLevelInfo.py
r1515 r1596 61 61 info['review_state'] = review_state = context.getStudentReviewState() 62 62 info['view_only'] = review_state != "school_fee_paid" 63 info['show_check_boxes'] = (is_ca and review_state in (' courses_registered',)) or\63 info['show_check_boxes'] = (is_ca and review_state in ('school_fee_paid',)) or\ 64 64 (is_student and context.getStudentReviewState() == "school_fee_paid") or\ 65 65 (is_so) … … 108 108 normal.sort(cmp_semester) 109 109 info['normal'] = normal 110 111 students_object = context.portal_url.getPortalObject().campus.students 112 student = getattr(students_object, student_id) 113 info['app'] = student.application 114 info['app_doc'] = student.application.getContent() 115 110 116 return info -
WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/getTransferInfo.py
r1368 r1596 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/branches/joachim-event-branch/skins/waeup_student/layout_application_view_info.pt
r1435 r1596 5 5 dm options/datastructure/getDataModel; 6 6 widgets python:context.getRenderedWidgets(layout); 7 fields python:('jamb_reg_no','app_email','app_mobile')"7 info context/getStudentBaseInfo;" 8 8 > 9 9 … … 20 20 </td> 21 21 <td> 22 <span tal:content=" python:context.getStudentBaseInfo()['student']['name']" />22 <span tal:content="info/student/name" /> 23 23 </td> 24 24 </tr> … … 27 27 </td> 28 28 <td> 29 <span tal:content=" python:context.getStudentBaseInfo()['student']['sex']" />29 <span tal:content="info/student/sex" /> 30 30 </td> 31 31 </tr> … … 34 34 </td> 35 35 <td> 36 <span tal:content=" python:context.getStudentBaseInfo()['id']" />36 <span tal:content="info/id" /> 37 37 </td> 38 38 </tr> 39 40 <tr tal:repeat="field fields"> 41 <tal:block tal:define="cell python: widgets[field]"> 42 <tal:block define="widget cell/widget"> 43 <div tal:attributes="class cell/widget_css_class|string:label; 44 id python:widget.getHtmlWidgetId()+'_widget';" 45 > 46 <td > 47 <span class="dlabel" 48 tal:condition="widget/label" 49 tal:content="widget/label">label</span>: 50 </td> 51 <td> 52 <span tal:replace="structure cell/widget_rendered" /> 53 </td> 54 </div> 55 </tal:block> 56 </tal:block> 57 </tr> 39 <tr valign="top"> 40 <td><span class="dlabel">Matriculation No</span>: 41 </td> 42 <td> 43 <span tal:content="info/student/matric_no" /> 44 </td> 45 </tr> 46 <tr valign="top"> 47 <td><span class="dlabel">JAMB Registration No</span>: 48 </td> 49 <td> 50 <span tal:content="info/student/jamb_reg_no" /> 51 </td> 52 </tr> 53 <tr valign="top"> 54 <td><span class="dlabel">Email</span>: 55 </td> 56 <td> 57 <span tal:content="info/student/email" /> 58 </td> 59 </tr> 60 <tr valign="top"> 61 <td><span class="dlabel">Phone</span>: 62 </td> 63 <td> 64 <span tal:content="info/student/phone" /> 65 </td> 66 </tr> 67 <tr valign="top"> 68 <td><span class="dlabel">Level</span>: 69 </td> 70 <td> 71 <span tal:content="info/student/level" /> 72 </td> 73 </tr> 58 74 </table> 59 75 -
WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/mail2student.py
r909 r1596 37 37 co_name, 38 38 co_email, 39 student_email, 39 student_email, 40 40 co_email, 41 41 'henrik@waeup.org', -
WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/personal_edit.py
r1457 r1596 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/branches/joachim-event-branch/skins/waeup_student/raise_objection.py
r1161 r1596 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/branches/joachim-event-branch/skins/waeup_student/refresh_level.py
r1510 r1596 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/branches/joachim-event-branch/skins/waeup_student/register_courses.py
r1513 r1596 1 ## Script (Python) " getStudyCourseInfo"1 ## Script (Python) "register_courses" 2 2 ##bind container=container 3 3 ##bind context=context … … 12 12 close the Students StudyLevel 13 13 """ 14 from Products.CMFCore.WorkflowCore import WorkflowException 14 15 try: 15 16 from Products.zdb import set_trace … … 23 24 member_id = str(member) 24 25 import logging 25 logger = logging.getLogger('S tudent.register_courses')26 logger = logging.getLogger('Skins.register_courses') 26 27 27 28 wftool = context.portal_workflow 28 wftool.doActionFor(context,'close')29 29 students_folder = context.portal_url.getPortalObject().campus.students 30 student = getattr(students_folder,context.getStudentId()) 31 wftool.doActionFor(student,'register_courses') 32 logger.info('"%s","courses registered"' % student.getId()) 30 student_id = context.getStudentId() 31 student = getattr(students_folder,student_id) 32 try: 33 wftool.doActionFor(context,'close') 34 except WorkflowException,E: 35 logger.info('%s WorkflowException %s for %s' % (member_id,E,student_id)) 36 return request.RESPONSE.redirect("%s" % context.absolute_url()) 37 try: 38 wftool.doActionFor(student,'register_courses') 39 except WorkflowException,E: 40 logger.info('%s WorkflowException %s for %s' % (member_id,E,student_id)) 41 return request.RESPONSE.redirect("%s" % context.absolute_url()) 42 logger.info('%s registered course list for %s' % (member_id,student_id)) 33 43 return request.RESPONSE.redirect("%s" % context.absolute_url()) -
WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/reject_courses.py
r1515 r1596 1 ## Script (Python) " getStudyCourseInfo"1 ## Script (Python) "reject_courses" 2 2 ##bind container=container 3 3 ##bind context=context … … 5 5 ##bind script=script 6 6 ##bind subpath=traverse_subpath 7 ##parameters= student=None7 ##parameters=REQUEST, student=None, action_after_reject=None, action_after_validate=None 8 8 ##title= 9 9 ## … … 17 17 def set_trace(): 18 18 pass 19 19 from urllib import urlencode 20 20 request = context.REQUEST 21 21 mtool = context.portal_membership … … 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())) 34 return request.RESPONSE.redirect("%s" % context.absolute_url()) 33 logger.info('%s rejected course list of %s' % (member,student.getId())) 34 35 args = {} 36 37 psm = "Student's course list has been rejected! Please fill and submit the form below!" 38 subject = "Course list rejected" 39 args['subject'] = subject 40 args['continue'] = action_after_validate 41 args['portal_status_message'] = psm 42 url = context.absolute_url() + '/' + action_after_reject + '?' + urlencode(args) 43 return REQUEST.RESPONSE.redirect(url) 44 45 #return request.RESPONSE.redirect("%s" % context.absolute_url()) -
WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/request_transfer.py
r1378 r1596 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/branches/joachim-event-branch/skins/waeup_student/search_students.py
r1558 r1596 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() … … 288 298 allowed = allowed, 289 299 co_view = co_view, 300 ca_view = ca_view 290 301 ) 291 302 return context.search_students_form(rendered = rend, -
WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/search_students_form.pt
r1558 r1596 1 1 <metal:body use-macro="here/main_template/macros/master"> 2 <metal:block fill-slot="header"3 tal:define="creation creation|nothing;4 edition edition|nothing;5 metadata metadata|nothing"6 >7 </metal:block>8 9 2 <metal:main fill-slot="main" 10 3 tal:define="rendered options/rendered; … … 12 5 students options/students; 13 6 info options/info|nothing; 14 is_so context/isSectionOfficer; 7 is_so context/isSectionOfficer; 15 8 allowed options/allowed|nothing" 16 9 > … … 30 23 </nobr> 31 24 <span tal:condition="is_so"> 25 <nobr><a href="view_logs">View Log Files</a> 26 </nobr> 32 27 <nobr><a href="add_student">Add Student Record</a> 33 28 </nobr> … … 35 30 </span> 36 31 </strong> 32 33 37 34 <h3> Search Student Section</h3><br /> 38 35 You are logged in as member <span tal:replace="info/member|nothing" /> … … 43 40 <span tal:condition="info/departments|nothing" tal:omit-tag=""> 44 41 and <span tal:repeat="department info/departments|nothing" tal:content="department"/></span>. 45 <span tal:condition="info/certificate_level|nothing" tal:omit-tag="">46 who is CourseAdviser for47 <span tal:repeat="cl info/certificate_level" tal:content="cl" />48 </span>49 42 <br /><br /> 50 43 <span tal:replace="structure rendered" /> … … 96 89 onclick="javascript:window.open('','edit','width=600, height=700, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')" 97 90 >[view and change state]</a></td> 98 <td tal:condition="options/co_view|nothing"><span tal:replace="student/review_state|nothing" /></td> 91 <td tal:condition="options/ca_view|nothing"> 92 <a href="id" 93 tal:attributes="href string:${context/portal_url}/campus/students/${student/id}/study_course/study_course/${student/level}/external_study_level_view" 94 target="edit" 95 onclick="javascript:window.open('','edit','width=600, height=700, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')" 96 >[view and validate course list]</a></td> 99 97 </tr> 100 98 </span> -
WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/set_access_data.py
r1267 r1596 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 13 13 if matric_no is None: 14 logger.info(' "No matric_no in request"')14 logger.info('No matric_no in request') 15 15 return REQUEST.RESPONSE.redirect("%s" % context.portal_url()) 16 16 lt = context.portal_layouts … … 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/branches/joachim-event-branch/skins/waeup_student/start_clearance.py
r1364 r1596 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/branches/joachim-event-branch/skins/waeup_student/statistics_ret_view.pt
r1558 r1596 59 59 <br /> 60 60 <table> 61 <tr><td>RET:</td> <td>Returning students who onlylogged in</td></tr>62 <tr><td>SFP:</td> <td>Returning students who paid their school fee</td></tr>61 <tr><td>RET:</td> <td>Returning students who have logged in</td></tr> 62 <tr><td>SFP:</td> <td>Returning students who already paid their school fee</td></tr> 63 63 </table> 64 64 </span> -
WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/students_index.py
r1558 r1596 25 25 if "ClearanceOfficers" in member.getGroups() or\ 26 26 "CourseAdvisers" in member.getGroups(): 27 return redirect("%s/ search_students" % context.portal_url())27 return redirect("%s/campus/students/search_students" % context.portal_url()) 28 28 if context.isSectionOfficer(): 29 return redirect("%s/ search_students" % context.portal_url())29 return redirect("%s/campus/students/search_students" % context.portal_url()) 30 30 if context.isStudent(): 31 31 id = str(member) -
WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/study_level_view.pt
r1558 r1596 6 6 global is_ca info/is_ca; 7 7 global show_check_boxes info/show_check_boxes; 8 global is_student info/is_student;9 global status_info info/status_info;10 global review_state info/review_state;11 global view_only info/view_only">8 global is_student info/is_student; 9 global status_info info/status_info; 10 global review_state info/review_state; 11 global view_only info/view_only"> 12 12 <a href="" 13 13 tal:attributes="href string:${here/academicsParent}"> … … 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\')' % 132 (' really delete checked courses', )"132 ('Do you really want to delete the courses selected?', )" 133 133 /> 134 134 <input … … 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\')' % … … 174 174 <input tal:condition="python: review_state in ('courses_registered', 'courses_validated',)" type="submit" name="reject_courses:method" 175 175 class="context" value="Reject" /> 176 177 <input type="hidden" name="action_after_validate" type="text" id="action_after_validate" 178 tal:attributes="value string:/study_level_view"/> 179 <input type="hidden" name="action_after_reject" type="text" id="action_after_reject" 180 tal:attributes="value string:/contact_student_form"/> 181 176 182 177 183 </td> … … 188 194 <td><input type="text" name="course_id" 189 195 tal:attributes="value request/course_id|nothing"/></td> 190 <td tal:condition="request/error|nothing"191 tal:content="request/error" />192 196 <td colspan="2"> 193 197 <input type="submit" name="add" -
WAeUP_SRP/branches/joachim-event-branch/skins/waeup_student/validate_courses.py
r1513 r1596 1 ## Script (Python) " getStudyCourseInfo"1 ## Script (Python) "validate_courses" 2 2 ##bind container=container 3 3 ##bind context=context … … 5 5 ##bind script=script 6 6 ##bind subpath=traverse_subpath 7 ##parameters=student=None 7 ##parameters=student=None, action_after_reject=None, action_after_validate=None 8 8 ##title= 9 9 ## … … 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())) 32 return request.RESPONSE.redirect("%s" % context.absolute_url()) 31 logger.info('%s validated course list of %s' % (member,student.getId())) 32 33 psm = 'portal_status_message=Course list validated!' 34 url = context.absolute_url() + '/' + action_after_validate + '?' + psm 35 return request.RESPONSE.redirect(url) 36 37
Note: See TracChangeset for help on using the changeset viewer.