Changeset 3452 for WAeUP_SRP/base/skins
- Timestamp:
- 19 Apr 2008, 09:19:02 (17 years ago)
- Location:
- WAeUP_SRP/base/skins/waeup_student
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/waeup_student/clearance_edit_form.pt
r3451 r3452 4 4 5 5 <metal:main fill-slot="main" 6 tal:define=" 7 info context/getClearanceInfo; 8 s_name context/getStudentNameInContext;"> 6 tal:define="info context/getClearanceInfo;"> 9 7 10 8 <metal:block tal:condition="not: info"> … … 13 11 <metal:block tal:condition="info"> 14 12 <metal:block tal:define=" 15 is_so context/isSectionOfficer;16 is_staff context/isStaff;17 is_co context/isClearanceOfficer;18 is_student context/isStudent;13 is_so info/is_sectionofficer; 14 is_staff info/is_staff; 15 is_co info/is_clearanceofficer; 16 is_student info/is_student; 19 17 review_state info/review_state; 20 18 clear_review_state info/clear_review_state; … … 37 35 <h3> 38 36 <span tal:condition="info"> 39 <span tal:content=" s_name" />:37 <span tal:content="info/student_name" />: 40 38 </span> 41 39 <span tal:content="here/title_or_id" /> -
WAeUP_SRP/base/skins/waeup_student/clearance_slip.pt
r2579 r3452 17 17 /> 18 18 19 <table tal:define="sc python: info['course_doc']"> 19 <table tal:define="sc python: info['course_doc']; 20 f_id sc/faculty; 21 d_id sc/department; 22 sc_id sc/course; 23 f_title context/academics/?f_id/Title|string:Faculty not yet in Prospectus; 24 d_title context/academics/?f_id/?d_id/Title|string:Department not yet in Prospectus; 25 sc_title context/academics/?f_id/?d_id/certificates/?sc_id/Title|string:Course not in Prospectus" 26 > 20 27 <tr> 21 28 <td width="180px">Certificate:</td> 22 <td><span tal:content="sc /title" /></td>29 <td><span tal:content="sc_title" /></td> 23 30 </tr> 24 31 <tr> 25 32 <td>Certificate ID:</td> 26 <td tal:content="sc/ study_course" />33 <td tal:content="sc/course" /> 27 34 </tr> 28 <span tal:omit-tag=""29 tal:define="f_id sc/faculty;30 d_id sc/department;31 f_title context/academics/?f_id/Title|string:Faculty not yet in Prospectus;32 d_title context/academics/?f_id/?d_id/Title|string:Department not yet in Prospectus"33 >34 35 <tr> 35 36 <td>Faculty:</td> … … 40 41 <td><span tal:content="d_title" /></td> 41 42 </tr> 42 </span>43 43 </table> 44 44 -
WAeUP_SRP/base/skins/waeup_student/clearance_view.pt
r3451 r3452 2 2 <metal:main fill-slot="main" 3 3 tal:define="info context/getClearanceInfo; 4 is_so context/isSectionOfficer; 5 is_student context/isStudent; 6 s_name context/getStudentNameInContext; 4 is_so info/is_sectionofficer; 5 is_student info/is_student; 7 6 "> 8 7 <span tal:condition="not: info"> … … 27 26 <h3> 28 27 <span tal:condition="python:is_so and info"> 29 <span tal:content=" s_name" />:28 <span tal:content="info/student_name" />: 30 29 </span> 31 30 <span tal:condition="python:is_student"> 32 31 My 33 32 </span> 34 <span tal:content=" here/title_or_id" />33 <span tal:content="context/title_or_id" /> 35 34 </h3> 36 35 -
WAeUP_SRP/base/skins/waeup_student/getClearanceInfo.py
r2975 r3452 12 12 return Info about the current Student 13 13 """ 14 try: 15 from Products.zdb import set_trace 16 except: 17 def set_trace(): 18 pass 14 19 import logging 15 20 logger = logging.getLogger('Skins.getClearanceInfo') … … 42 47 return None 43 48 49 student_record = context.students_catalog.getRecordByKey(student_id) 44 50 students_object = context.portal_url.getPortalObject().campus.students 45 51 student = getattr(students_object, student_id) 46 res = context.portal_catalog(portal_type='Student',id = student_id) 47 if len(res) == 0: 48 return None 49 creation_date = DateTime(res[0].CreationDate) 50 info['penalty'] = creation_date.lessThan(DateTime('2006/12/5')) 52 # res = context.portal_catalog(portal_type='Student',id = student_id) 53 # if len(res) == 0: 54 # return None 55 # creation_date = DateTime(res[0].CreationDate) 56 # info['penalty'] = creation_date.lessThan(DateTime('2006/12/5')) 57 info['penalty'] = False 51 58 info['id'] = student_id 52 59 info['student'] = student 53 info['review_state'] = context.getStudentReviewState() 54 info['app'] = student.application 60 info['student_name'] = student_record.name 61 #info['review_state'] = context.getStudentReviewState() 62 info['review_state'] = student_record.review_state 63 # info['app'] = student.application 55 64 info['app_doc'] = student.application.getContent() 56 65 info['clear'] = student.clearance … … 59 68 info['per'] = student.personal 60 69 info['per_review_state'] = wf.getInfoFor(student.personal,'review_state',None) 61 if info['review_state'] in ('clearance_requested', 'cleared_and_validated',): 62 info['penalty'] = info['penalty'] and\ 63 info['clear_doc'].entry_date.greaterThan(DateTime('2006/12/30')) 64 course = getattr(student,'study_course',None) 65 if course: 66 cert_id = course.getContent().study_course 67 res = context.portal_catalog(portal_type = "Certificate", id = cert_id) 68 ci = {} 69 if len(res) > 0: 70 info['course'] = course 71 brain = res[0] 72 ci['study_course'] = brain.getId 73 ci['title'] = brain.Title 74 pl = brain.getPath().split('/') 75 ci['faculty'] = pl[-4] 76 ci['department'] = pl[-3] 77 info['course_doc'] = ci 78 else: 79 info['course'] = None 70 ci = {} 71 ci['course'] = student_record.course 72 ci['faculty'] = student_record.faculty 73 ci['department'] = student_record.department 74 info['course_doc'] = ci 75 # if info['review_state'] in ('clearance_requested', 'cleared_and_validated',): 76 # info['penalty'] = info['penalty'] and\ 77 # info['clear_doc'].entry_date.greaterThan(DateTime('2006/12/30')) 78 # course = getattr(student,'study_course',None) 79 # if course: 80 # cert_id = course.getContent().study_course 81 # res = context.portal_catalog(portal_type = "Certificate", id = cert_id) 82 # ci = {} 83 # if len(res) > 0: 84 # info['course'] = course 85 # brain = res[0] 86 # ci['study_course'] = brain.getId 87 # ci['title'] = brain.Title 88 # pl = brain.getPath().split('/') 89 # ci['faculty'] = pl[-4] 90 # ci['department'] = pl[-3] 91 # info['course_doc'] = ci 92 # else: 93 # info['course'] = None 80 94 return info
Note: See TracChangeset for help on using the changeset viewer.