Changeset 2664
- Timestamp:
- 15 Nov 2007, 14:35:05 (17 years ago)
- Location:
- WAeUP_SRP/base
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/WAeUPTables.py
r2632 r2664 1057 1057 import_record.Lastname) 1058 1058 data['jamb_reg_no'] = import_record.Entryregno 1059 #else:1060 # study_course = getattr(student_object,'study_course',None)1061 # current_level = data.get('level',None)1062 # data['registered_courses'] = []1063 # if study_course and current_level and current_level in study_course.objectIds():1064 # level_obj = getattr(study_course,current_level)1065 # courses = []1066 # for c in level_obj.objectIds():1067 # if c.endswith('_co'):1068 # courses.append(c[:-3])1069 # else:1070 # courses.append(c)1071 # data['registered_courses'] = courses1072 1059 self.addRecord(**data) 1073 1060 if pghandler: pghandler.finish() … … 1101 1088 elif event_type == 'sys_del_object': 1102 1089 self.deleteRecord(student_id) 1103 #import pdb;pdb.set_trace()1104 #elif pt == 'StudentCourseResult' and mt == 'CPS Proxy Folder':1105 # if event_type not in ("sys_add_object","sys_del_object"):1106 # return1107 # level_session = getattr(object.aq_parent.getContent(),'session','unknown')1108 # if level_session not in (self.getSessionId()[-2:],'2006/2007'):1109 # return1110 # course_id = object.getId()1111 # if course_id.endswith('_co'):1112 # course_id = course_id[:-3]1113 # student_id = object.absolute_url_path().split('/')[-4]1114 # res = students_catalog(id = student_id)1115 # if not res:1116 # return1117 # student_rec = res[0]1118 # registered_courses = getattr(student_rec,'registered_courses',None)1119 # if not registered_courses:1120 # registered_courses = []1121 # if event_type == "sys_add_object":1122 # if course_id not in registered_courses:1123 # registered_courses.append(course_id)1124 # else:1125 # return1126 # elif registered_courses and event_type == "sys_del_object":1127 # removed = False1128 # while course_id in registered_courses:1129 # removed = True1130 # registered_courses.remove(course_id)1131 # if not removed:1132 # return1133 # data['id'] = student_id1134 # data['registered_courses'] = registered_courses1135 # self.modifyRecord(record = student_rec, **data)1136 # return1137 1090 if pt not in self.affected_types.keys(): 1138 1091 return -
WAeUP_SRP/base/skins/waeup_epayment/pay_by_sc.py
r2619 r2664 125 125 wftool.doActionFor(student,next_transition) 126 126 127 #if next_session == context.getSessionId()[-2:]:128 # wftool.doActionFor(student,'pay_school_fee')129 #else:130 # study_course = getattr(student,'study_course')131 # #wftool.doActionFor(study_course,'open')132 # study_course_doc = study_course.getContent()133 # next_level = "%s" % (int(s_brain.level) + 100)134 # study_course_doc.edit(mapping= {'current_level': next_level,135 # 'current_session': next_session,})136 137 127 logger.info('%s paid school fee by scratch card' % student_id) 138 128 else: -
WAeUP_SRP/base/skins/waeup_epayment/pay_interswitch.py
r2619 r2664 44 44 fee_dict = context.getSchoolFee(sbrain) 45 45 fulltime = sbrain.mode.endswith('_ft') 46 #new = sbrain.entry_session == context.getSessionId()[-2:]47 46 new = sbrain.review_state == 'cleared_and_validated' 48 47 returning = sbrain.review_state == 'returning' -
WAeUP_SRP/base/skins/waeup_student/create_level.py
r2611 r2664 65 65 results = context.results_import(matric_no = student.matric_no) 66 66 l = [] 67 68 69 # fetch carry_over courses from results_import 67 70 if student.session in ('6', '06') and results: 68 71 carry_overs = results … … 106 109 d['session_id'] = session_id 107 110 records.append(d) 111 # fetch carry_over courses from the course_results catalog 112 # else 108 113 114 # fetch session courses from the certificate 109 115 res = context.portal_catalog(portal_type="Certificate", id = cert_id) 110 116 if res: -
WAeUP_SRP/base/skins/waeup_student/getNextInfo.py
r2656 r2664 42 42 info['next_session_id'] = next_session_id = "%02d" % (int(session_id)+1) 43 43 if int(session_id) > 4: 44 info['next_transition'] = "pay_school_fee" 44 45 info['next_verdict'] = '' 45 46 if verdict in ('A','B',): … … 47 48 else: 48 49 info['next_level_id'] = level_id 49 if int(session_id) > int(context.getSessionId()[0]) -2:50 info['next_transition'] = "pay_school_fee"51 50 else: 52 51 info['next_level_id'] = "%s" % (int(level_id) + 100) -
WAeUP_SRP/base/skins/waeup_student/getStudyCourseInfo.py
r2640 r2664 81 81 82 82 current_level = sbrain.level 83 set_trace84 83 levels = context.objectIds() 85 84 review_state = wftool.getInfoFor(context,'review_state',None) 86 student_review_state = context.getStudentReviewState()85 student_review_state = sbrain.review_state 87 86 if review_state != 'content_addable' and student_review_state == 'school_fee_paid': #and context.isStudent(): 88 87 wftool.doActionFor(context,'close_for_edit') 89 may_register = (student_review_state in ('school_fee_paid',)) and\ 90 current_level not in levels and\ 91 (previous_verdict in ('A','B','C','F','J','L','M') or\ 92 sbrain.level == '100' or\ 88 89 has_paid = student_review_state == 'school_fee_paid' 90 91 may_register = has_paid and\ 92 current_level not in levels and\ 93 (previous_verdict in ('A','B','C','F','J','L','M') or\ 94 sbrain.level == '100' or\ 93 95 (sbrain.mode.startswith('de') and sbrain.level == '200')) 96 97 94 98 levels.sort() 95 99 info['create_level'] = None -
WAeUP_SRP/base/skins/waeup_student/getStudyLevelInfo.py
r2649 r2664 46 46 info['is_ca'] = is_ca = context.isCourseAdviser() 47 47 info['student'] = student = context.students_catalog(id=student_id)[0] 48 info['review_state'] = review_state = context.getStudentReviewState()48 info['review_state'] = review_state = student.review_state 49 49 info['view_only'] = review_state != "school_fee_paid" 50 info['show_check_boxes'] = (is_ca and review_state in ('school_fee_paid',)) or\ 51 (is_student and context.getStudentReviewState() == "school_fee_paid") or\ 50 51 52 has_paid = review_state == 'school_fee_paid' 53 54 info['show_check_boxes'] = (is_ca and has_paid) or\ 55 (is_student and has_paid) or\ 52 56 (is_so) 57 58 53 59 info['choosen_ids'] = request.get('ids',[]) 54 60 info['status_info'] = "" … … 77 83 info['credits_exceeded'] = credits_total > max_credits 78 84 current_session = student.session 79 info['submission_allowed']= not info['credits_exceeded'] and\ 80 current_session == context.getSessionId()[0] 85 86 info['submission_allowed']= review_state in ('school_fee_paid','returning') and has_paid 87 info['validation_allowed']= review_state == 'courses_registered' 88 info['rejection_allowed']= review_state in ('courses_registered', 'courses_validated',) 89 90 81 91 # carry_overs.sort(cmp_semester_id) 82 92 info['carry_overs'] = carry_overs … … 86 96 info['normal3'] = normal3 87 97 88 info['data_missing'] = not info['normal1'] and not info['normal2'] and not info['normal3'] 98 info['data_missing'] = not info['normal1'] and not info['normal2'] and not info['normal3'] 89 99 info['spillover'] = student.level > student.end_level 90 100 -
WAeUP_SRP/base/skins/waeup_student/study_level_view.pt
r2649 r2664 148 148 149 149 150 <table tal:condition="python: is_student and review_state == 'school_fee_paid'" width="100%" cellspacing="0" cellpadding="2"150 <table tal:condition="python: is_student and info['submission_allowed']" width="100%" cellspacing="0" cellpadding="2" 151 151 class="folderButtons"> 152 152 <tr> … … 164 164 165 165 <br /><br /> 166 <input tal:condition=" info/submission_allowed"166 <input tal:condition="not: info/credits_exceeded" 167 167 type="submit" name="register_courses:method" 168 168 class="context" value="Submit to Course Adviser" … … 210 210 class="context" value="Update" 211 211 /> 212 <input tal:condition=" python: review_state == 'school_fee_paid'" type="submit" name="register_courses:method"212 <input tal:condition="info/submission_allowed" type="submit" name="register_courses:method" 213 213 class="context" value="Submit" /> 214 <input tal:condition=" python: review_state == 'courses_registered'" type="submit" name="validate_courses:method"214 <input tal:condition="info/validation_allowed" type="submit" name="validate_courses:method" 215 215 class="context" value="Validate" /> 216 <input tal:condition=" python: review_state in ('courses_registered', 'courses_validated',)" type="submit" name="reject_courses:method"216 <input tal:condition="info/rejection_allowed" type="submit" name="reject_courses:method" 217 217 class="context" value="Reject" /> 218 218 … … 230 230 <td align="left" valign="top" rowspan="3"></td> 231 231 <td align="left" valign="top"> 232 <input tal:condition="python: review_state == 'school_fee_paid'"232 <input tal:condition="python: info['submission_allowed']" 233 233 type="button" value="Select all" class="context" 234 234 onclick="someJavaScriptFunctionThatWillBeReplaced" … … 237 237 % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))" 238 238 /> 239 <input tal:condition="python: review_state == 'school_fee_paid'"239 <input tal:condition="python: info['submission_allowed']" 240 240 type="submit" name="delete_course_result:method" value="Delete selected" 241 241 class="destructive" i18n:attributes="value" … … 243 243 ('Do you really want to delete the courses selected?', )" 244 244 /> 245 <input tal:condition="python: review_state == 'school_fee_paid'"245 <input tal:condition="python: info['submission_allowed']" 246 246 type="submit" name="refresh_level:method" 247 247 class="context" value="Update" 248 248 /> 249 <input tal:condition=" python: review_state == 'school_fee_paid'" type="submit" name="register_courses:method"249 <input tal:condition="info/submission_allowed" type="submit" name="register_courses:method" 250 250 class="context" value="Submit" /> 251 <input tal:condition=" python: review_state == 'courses_registered'" type="submit" name="validate_courses:method"251 <input tal:condition="info/validation_allowed" type="submit" name="validate_courses:method" 252 252 class="context" value="Validate" /> 253 <input tal:condition=" python: review_state in ('courses_registered', 'courses_validated',)" type="submit" name="reject_courses:method"253 <input tal:condition="info/rejection_allowed" type="submit" name="reject_courses:method" 254 254 class="context" value="Reject" /> 255 255
Note: See TracChangeset for help on using the changeset viewer.