Changeset 2766 for WAeUP_SRP/base/skins
- Timestamp:
- 26 Nov 2007, 19:18:09 (17 years ago)
- Location:
- WAeUP_SRP/base/skins
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/waeup_pins/pins_view.pt
r2140 r2766 62 62 > 63 63 <option value="--">Goto Batch ...</option> 64 <option tal:repeat="batch context/objectIds"64 <option tal:repeat="batch info/batches" 65 65 tal:attributes="value batch" 66 66 tal:content="batch"> -
WAeUP_SRP/base/skins/waeup_pins/search_pins.py
r2615 r2766 109 109 view = context.batch_view 110 110 elif context.portal_type == "ScratchCardBatchesFolder": 111 batches = context.objectIds() 112 batches.sort() 113 info['batches'] = batches 111 114 view = context.pins_view 112 115 if psm == '': -
WAeUP_SRP/base/skins/waeup_student/create_level.py
r2758 r2766 39 39 lt = context.portal_layouts 40 40 wt = context.waeup_tool 41 student = context.students_catalog (id=student_id)[0]41 student = context.students_catalog.getRecordByKey(student_id) 42 42 cert_id = student.course 43 43 current_level = student.level … … 51 51 52 52 if context.hasObject(current_level): 53 level = getattr(context,"%s" % current_level) 53 #level = getattr(context,"%s" % current_level) 54 return response.redirect("%s/%s" % (context.absolute_url(),current_level)) 54 55 else: 55 56 context.invokeFactory('StudentStudyLevel',"%s" % current_level) … … 65 66 results = context.results_import(matric_no = student.matric_no) 66 67 l = [] 67 68 68 69 69 # fetch carry_over courses from results_import … … 110 110 records.append(d) 111 111 # fetch carry_over courses from the course_results catalog 112 # else 112 else: 113 res = context.aq_results(Eq('student_id',student_id), 114 sortSpecs=('level_id',)) 115 last_level_id = res[-1].level_id 116 for result in res: 117 course_id = result.code 118 if course_id in l or result.level_id != last_level_id: 119 continue 120 query = Eq('code',course_id) 121 c_res = aq_courses(query) 122 if not c_res: 123 #logger.info('%s", course %s not found in courses_catalog' % (student.id,result.CosCode)) 124 continue 125 course_cat_entry = c_res[0] 126 passmark = getattr(course_cat_entry,'passmark',None) 127 try: 128 score = int(result.score) 129 except: 130 # logger.info('%s, course %s has invalid score %s"' % (student.id, 131 # course_id, 132 # result.Score)) 133 continue 134 if int(c_res[0].passmark) <= score: 135 continue 136 l += course_id, 137 d = context.getCourseInfo(course_id) 138 d['course_id'] = course_id 139 d['carry_over'] = True 140 d['code'] = course_id 141 d['student_id'] = student_id 142 d['level_id'] = level_id 143 d['session_id'] = session_id 144 records.append(d) 113 145 114 146 # fetch session courses from the certificate
Note: See TracChangeset for help on using the changeset viewer.