Changeset 1025 for WAeUP_SRP/trunk/skins
- Timestamp:
- 10 Dec 2006, 18:39:15 (18 years ago)
- Location:
- WAeUP_SRP/trunk/skins
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_default/waeup_edit.py
r859 r1025 23 23 # (We don't call getEditableContent here, validate does it when needed.) 24 24 doc = context.getContent() 25 if context.portal_type == "StudentStudyCourse": 26 if len(context.objectIds()) > 0: 27 psm = 'Edit of StudyCourse is only possible if there are no levels' 28 args = getFormUidUrlArg(REQUEST) 29 args['portal_status_message'] = psm 30 url = context.absolute_url() + '?' + urlencode(args) 31 REQUEST.RESPONSE.redirect(url) 32 25 33 is_valid, ds = doc.validate(request=REQUEST, proxy=context, cluster=cluster, 26 34 use_session=True) … … 36 44 comments = REQUEST.get('comments') 37 45 context.cpsdocument_notify_modification(comments=comments) 46 if context.portal_type == "StudentStudyCourse": 47 course = ds.get('study_course') 48 student_id = context.getStudentId() 49 res = context.portal_catalog(portal_type='Certificate',id = course) 50 if res: 51 c_brain = res[0] 52 c_path = c_brain.getPath().split('/') 53 student_id = context.getStudentId() 54 context.students_catalog.modifyRecord(id = student_id, 55 course = course, 56 faculty = c_path[-4], 57 department = c_path[-3], 58 ) 38 59 if cpsdocument_edit_and_view_button is not None: 39 60 action = '' -
WAeUP_SRP/trunk/skins/waeup_student/application_edit_form.pt
r877 r1025 1 <metal:html tal:define="info context/getStudentInfo; 2 rendered_main python:info['app_doc'].render( 1 <metal:html tal:define="info context/getStudentInfo"> 2 <span tal:condition="not: info"> 3 <metal:block use-macro="here/error_not_found/macros/not_found" /> 4 </span> 5 <metal:block tal:condition="info"> 6 <metal:block tal:define="rendered_main python:info['app_doc'].render( 3 7 layout_mode='edit', 4 8 schema_id = 'student_application', … … 50 54 </metal:main> 51 55 </metal:body> 56 </metal:block> 57 </metal:block> 52 58 </metal:html> -
WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py
r1017 r1025 43 43 logger.info("student %s tried to access %s" % (member_id,requested_id)) 44 44 student_id = member_id 45 #mtool.assertViewable(context)45 mtool.assertViewable(context) 46 46 break 47 47 student_id = member_id … … 78 78 info['sex'] = 'female' 79 79 course = getattr(student,'study_course',None) 80 info['course'] = course81 80 if course: 82 info['course_doc'] = student.study_course.getContent() 81 cert_id = course.getContent().study_course 82 res = context.portal_catalog(portal_type = "Certificate", id = cert_id) 83 ci = {} 84 if len(res) > 0: 85 info['course'] = course 86 brain = res[0] 87 ci['study_course'] = brain.getId 88 ci['title'] = brain.Title 89 pl = brain.getPath().split('/') 90 ci['faculty'] = pl[-4] 91 ci['department'] = pl[-3] 92 info['course_doc'] = ci 93 else: 94 info['course'] = None 83 95 # 84 96 acco = getattr(student,'accommodation_2006',None) -
WAeUP_SRP/trunk/skins/waeup_student/study_course_view.pt
r913 r1025 19 19 </metal:block> 20 20 <metal:main fill-slot="main"> 21 <span tal:omit-tag="" 21 <span tal:omit-tag="" tal:condition="nothing" 22 22 tal:content="structure python: info['doc'].render(layout_mode='view')" /> 23 <table tal:define="sc python: s_info['course_doc']"> 24 <tr> 25 <td width="180px">Certificate:</td> 26 <td><span tal:content="sc/title" /></td> 27 </tr> 28 <tr> 29 <td>Certificate ID:</td> 30 <td tal:content="sc/study_course" /> 31 </tr> 32 <span tal:define="f_id sc/faculty; 33 d_id sc/department; 34 f_title context/academics/?f_id/Title|string:Faculty not yet in Prospectus; 35 d_title context/academics/?f_id/?d_id/Title|string:Department not yet in Prospectus" 36 > 37 <tr> 38 <td>Faculty:</td> 39 <td tal:content="f_title" /> 40 </tr> 41 <tr> 42 <td>Department:</td> 43 <td><span tal:content="d_title" /></td> 44 </tr> 45 </span> 46 </table> 23 47 24 48 <form action="" method="post" class="group"
Note: See TracChangeset for help on using the changeset viewer.