Changeset 5163
- Timestamp:
- 21 Apr 2010, 04:38:00 (15 years ago)
- Location:
- WAeUP_SRP/trunk/skins
- Files:
-
- 2 added
- 2 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_student/add_course_result.py
r3061 r5163 25 25 course_cat = context.courses_catalog 26 26 from Products.AdvancedQuery import Eq, Between, Le,In 27 try:28 aq_portal = context.portal_catalog.evalAdvancedQuery29 except:30 aq_portal = context.portal_catalog_real.evalAdvancedQuery31 27 course_id = request.get('course_id') 32 28 mtool = context.portal_membership -
WAeUP_SRP/trunk/skins/waeup_student/create_level.py
r3650 r5163 25 25 redirect = response.redirect 26 26 logger = logging.getLogger('Skins.create_level') 27 # mtool = context.portal_membership28 # member = mtool.getAuthenticatedMember()29 # member_id = str(member)30 # requested_id = context.getStudentId()31 # #set_trace()32 # create_level = request.form.get('create_level',None)33 # if not create_level or not requested_id or\34 # (not context.isStaff() and member_id != requested_id):35 # logger.info('%s tried to access %s' % (member_id,requested_id))36 # return redirect("%s/srp_anonymous_view" % context.portal_url())37 # student_id = context.getStudentId()38 27 info = context.waeup_tool.getAccessInfo(context) 39 28 student_id = info['student_id'] … … 41 30 return None 42 31 43 #lt = context.portal_layouts44 #wt = context.waeup_tool45 32 student = context.students_catalog.getRecordByKey(student_id) 46 33 cert_id = student.course … … 55 42 56 43 if context.hasObject(current_level): 57 #level = getattr(context,"%s" % current_level)58 44 return response.redirect("%s/%s" % (context.absolute_url(),current_level)) 59 45 else: … … 62 48 context.portal_workflow.doActionFor(level,'open') 63 49 level.getContent().edit(mapping={'session': current_session}) 64 #context.portal_workflow.doActionFor(level,'close_for_edit')65 50 level_id = level.getId() 66 51 session_id = context.getLevelSession(level.getContent(),student_id,level_id) … … 71 56 l = [] 72 57 73 #level_nr,dummy = divmod(int(current_level),100)74 # fetch session courses from the certificate75 58 res = context.portal_catalog(portal_type="Certificate", id = cert_id) 76 59 if res: 77 60 cert = res[0] 78 61 path = cert.getPath() 79 #academics_level = 100 * level_nr80 62 if int(current_level) > 0: 81 63 academics_level = 100 * (int(current_level)/100) -
WAeUP_SRP/trunk/skins/waeup_student/deactivate_students.py
r2729 r5163 21 21 logger = logging.getLogger('Skins.deactivate_students') 22 22 from Products.AdvancedQuery import Eq, Between, Le,In 23 #aq_portal = context.portal_catalog_real.evalAdvancedQuery24 23 aq_students = context.students_catalog.evalAdvancedQuery 25 24 students_folder = context.portal_url.getPortalObject().campus.students -
WAeUP_SRP/trunk/skins/waeup_student/getClearanceInfo.py
r5133 r5163 77 77 # info['penalty'] = info['penalty'] and\ 78 78 # info['clear_doc'].entry_date.greaterThan(DateTime('2006/12/30')) 79 # course = getattr(student,'study_course',None)80 # if course:81 # cert_id = course.getContent().study_course82 # res = context.portal_catalog(portal_type = "Certificate", id = cert_id)83 # ci = {}84 # if len(res) > 0:85 # info['course'] = course86 # brain = res[0]87 # ci['study_course'] = brain.getId88 # ci['title'] = brain.Title89 # pl = brain.getPath().split('/')90 # ci['faculty'] = pl[-4]91 # ci['department'] = pl[-3]92 # info['course_doc'] = ci93 # else:94 # info['course'] = None95 79 return info -
WAeUP_SRP/trunk/skins/waeup_student/getIdCardInfo.py
r4030 r5163 58 58 info['personal'] = personal_doc 59 59 60 #cert_id = sbrain.course61 #res = context.portal_catalog(portal_type = "Certificate", id = cert_id)62 #if res:63 # brain = res[0]64 # info['sc_title'] = brain.Title65 60 66 61 info['passport_url'] = context.portal_url() + '/viewimage/' + student_id + '/passport_' + student_id + '.jpg' -
WAeUP_SRP/trunk/skins/waeup_student/getStudyCourseInfo.py
r4557 r5163 52 52 info['student'] = student_record 53 53 cert_id = student_record.course 54 # logger.info("before search")55 # starttime = DateTime.DateTime().timeTime()56 # res = context.portal_catalog_real.evalAdvancedQuery(Eq('id', cert_id)) # &57 # Eq('portal_type', "Certificate"))58 # logger.info("searchtime %f" % (DateTime.DateTime().timeTime() - starttime))59 # if True:60 # #info['cert_id'] = cert_id61 # # brain = res[0]62 # # ci['title'] = brain.Title63 # # pl = brain.getPath().split('/')64 # # ci['faculty'] = pl[-4]65 # # ci['department'] = pl[-3]66 # ci['study_course'] = student_record.course67 # ci['faculty'] = student_record.faculty68 # ci['department'] = student_record.department69 # info['course_doc'] = ci70 # else:71 # info['cert_id'] = 'N/A'72 # ci['study_course'] = 'N/A'73 # ci['title'] = 'N/A'74 # ci['faculty'] = 'N/A'75 # ci['department'] = 'N/A'76 # info['course_doc'] = ci77 54 ci = {} 78 55 ci['study_course'] = student_record.course … … 106 83 review_state = wftool.getInfoFor(context,'review_state',None) 107 84 student_review_state = student_record.review_state 108 #if review_state != 'content_addable' and student_review_state == 'school_fee_paid': #and context.isStudent():109 # wftool.doActionFor(context,'close_for_edit')110 85 111 86 has_paid = student_review_state == 'school_fee_paid' -
WAeUP_SRP/trunk/skins/waeup_student/refresh_level.py
r5144 r5163 8 8 # $Id$ 9 9 """ 10 process the Application Form11 return html renderer + psm12 10 """ 13 11 request = context.REQUEST
Note: See TracChangeset for help on using the changeset viewer.