Changeset 1657
- Timestamp:
- 28 Mar 2007, 09:43:17 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_student/refresh_level.py
r1606 r1657 40 40 cert_id = student.course 41 41 current_level = student.level 42 in_progress = session.get('in_progress','finished')43 if in_progress == 'finished':44 session.set('in_progress','started')45 view = context.in_progress_view(refresh=3,page=action_after_validate)46 response.setHeader('Content-type','text/html; charset=ISO-8859-15')47 response.setHeader('Content-length','%d' % (len(view)))48 response.setStatus('OK')49 response.write(view)50 response.write('')51 elif in_progress == 'started':52 return42 ##in_progress = session.get('in_progress','finished') 43 ##if in_progress == 'finished': 44 ## session.set('in_progress','started') 45 ## view = context.in_progress_view(refresh=3,page=action_after_validate) 46 ## response.setHeader('Content-type','text/html; charset=ISO-8859-15') 47 ## response.setHeader('Content-length','%d' % (len(view))) 48 ## response.setStatus('OK') 49 ## response.write(view) 50 ## response.write('') 51 ##elif in_progress == 'started': 52 ## return 53 53 level = context 54 results = context.results_import(matric_no = student.matric_no) 54 #results = context.results_import(matric_no = student.matric_no) 55 results = False #skip carry overs 55 56 if results: 56 57 #carry_overs = [brain for brain in results if brain.GRADE in ('D','E','F')] … … 94 95 cert = res[0] 95 96 path = cert.getPath() 96 query = Eq("path",path) &\ 97 Eq('portal_type','CertificateCourse') &\ 98 Eq('SearchableText', "%s" % student.level) 97 query = Eq("path","%s/%s" % (path,student.level)) &\ 98 Eq('portal_type','CertificateCourse') 99 99 courses = aq_portal(query) 100 100 for c in courses: 101 #set_trace() 101 102 if not context.hasObject(c.getId): 102 103 d = context.getCourseInfo(c.getId)
Note: See TracChangeset for help on using the changeset viewer.