- Timestamp:
- 26 Feb 2007, 12:57:35 (18 years ago)
- Location:
- WAeUP_SRP/trunk/skins/waeup_student
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_student/create_level.py
r1494 r1495 43 43 context.invokeFactory('StudentStudyLevel',"%s" % current_level) 44 44 level = getattr(context,"%s" % current_level) 45 context.portal_workflow.doActionFor(level,'open') 45 46 study_session = context.getSessionString() 46 47 level.getContent().edit(mapping={'session': study_session}) 47 context.portal_workflow.doActionFor(level,'open')48 48 context.portal_workflow.doActionFor(level,'close_for_edit') 49 49 results = context.results_import(matric_no = student.matric_no) 50 carry_overs = [brain for brain in results if brain.GRADE in ('D','E','F')] 51 l = [] 52 for co in carry_overs: 53 d = context.getCourseInfo(co.CosCode) 54 d['grade'] = co.GRADE 55 d['carry_level'] = co.CarryLevel 56 cr_id = level.invokeFactory('StudentCourseResult',"%s_co" % co.CosCode) 57 getattr(level,cr_id).getContent().edit(mapping=d) 50 if results: 51 carry_overs = [brain for brain in results if brain.GRADE in ('D','E','F')] 52 #carry_overs = [brain for brain in results if int(brain.Score) < 40 ] 53 l = [] 54 for co in carry_overs: 55 d = context.getCourseInfo(co.CosCode) 56 d['grade'] = co.GRADE 57 d['carry_level'] = co.CarryLevel 58 cr_id = level.invokeFactory('StudentCourseResult',"%s_co" % co.CosCode) 59 course_result = getattr(level,cr_id) 60 context.portal_workflow.doActionFor(course_result,'open') 61 course_result.getContent().edit(mapping=d) 58 62 res = context.portal_catalog(portal_type="Certificate", id = cert_id) 59 63 l = [] … … 68 72 d = context.getCourseInfo(c.getId) 69 73 cr_id = level.invokeFactory('StudentCourseResult',c.getId) 74 course_result = getattr(level,cr_id) 75 context.portal_workflow.doActionFor(course_result,'open') 70 76 d['core_or_elective'] = getattr(c.getObject().getContent(),'core_or_elective') 71 getattr(level,cr_id).getContent().edit(mapping=d)77 course_result.getContent().edit(mapping=d) 72 78 session.set('in_progress','finished') 73 return response.redirect("%s /study_level_view" % level.absolute_url())79 return response.redirect("%s" % level.absolute_url()) -
WAeUP_SRP/trunk/skins/waeup_student/getStudyCourseInfo.py
r1494 r1495 56 56 student_review_state = context.getStudentReviewState() 57 57 #may_register = 0 #1 or student_review_state in ('shool_fee_payed',) 58 may_register = ( 1 or student_review_state in ('shool_fee_payed',)) and\58 may_register = (student_review_state in ('shool_fee_paid',)) and\ 59 59 current_level not in levels 60 60 levels.sort() -
WAeUP_SRP/trunk/skins/waeup_student/study_level_view.pt
r1494 r1495 40 40 </form> 41 41 <form action="." method="post" class="group"> 42 <span tal:condition="info/carry_overs" tal:omit-tag=""> 42 43 <h3>Carryover Courses</h3> 43 44 <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content"> … … 59 60 </tr> 60 61 </table> 62 </span> 61 63 <h3>Session Courses</h3> 62 64 <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">
Note: See TracChangeset for help on using the changeset viewer.