Changeset 2757 for WAeUP_SRP/base/skins/waeup_student/getStudyLevelInfo.py
- Timestamp:
- 25 Nov 2007, 18:21:03 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/waeup_student/getStudyLevelInfo.py
r2664 r2757 50 50 51 51 52 has_paid = review_state == 'school_fee_paid'52 school_fee_paid = review_state == 'school_fee_paid' 53 53 54 info['show_check_boxes'] = (is_ca and has_paid) or\ 55 (is_student and has_paid) or\ 56 (is_so) 54 is_current_level = level_id == student.level 57 55 56 info['show_check_boxes'] = (is_ca and school_fee_paid and is_current_level) or\ 57 (is_student and school_fee_paid and is_current_level) or\ 58 (is_so and is_current_level) 59 60 info['is_current_level'] = is_current_level 58 61 59 62 info['choosen_ids'] = request.get('ids',[]) … … 61 64 if is_student: 62 65 if review_state == 'courses_registered': 63 info['status_info'] = "Request for Course Validation pending"66 info['status_info'] = "Request for course validation pending" 64 67 elif review_state == 'courses_validated': 65 68 info['status_info'] = "Courses validated" 66 69 elif is_ca: 67 70 if review_state == 'courses_registered': 68 info['status_info'] = "Please validate these Courses"71 info['status_info'] = "Please validate these courses" 69 72 elif review_state == 'courses_validated': 70 73 info['status_info'] = "Courses validated" 71 info['doc'] = context.getContent()74 level_doc = info['doc'] = context.getContent() 72 75 cert_id = student.course 73 76 info['cert_id'] = cert_id … … 75 78 course_results.moveResultsHere(context,student_id) 76 79 logger.info("%s initiated moveResultsHere for %s in level %s" % (member_id,student_id,level_id)) 77 credits_total,carry_overs,normal1,normal2,normal3 = course_results.getCourses(student_id,level_id)78 info[' credits_total'] = credits_total80 total_credits,gpa,carry_overs,normal1,normal2,normal3 = course_results.getCourses(student_id,level_id) 81 info['total_credits'] = total_credits 79 82 max_credits = 50 80 83 if context.getId() == student.end_level: 81 84 max_credits = 51 82 85 info['max_credits'] = max_credits 83 info['credits_exceeded'] = credits_total> max_credits86 info['credits_exceeded'] = total_credits > max_credits 84 87 current_session = student.session 85 88 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 info['gpa'] = gpa 90 if gpa and total_credits: 91 info['gpa'] = "%4.2f" % (float(gpa)/int(total_credits)) 92 93 info['submission_allowed']= school_fee_paid and level_id == student.level 94 info['validation_allowed']= review_state == 'courses_registered' and is_current_level 95 info['rejection_allowed']= review_state in ('courses_registered', 'courses_validated',) and is_current_level 89 96 97 info['verdict'] = context.portal_vocabularies.verdicts.get(level_doc.verdict) 98 info['session'] = context.portal_vocabularies.sessions.get(level_doc.session) 90 99 91 100 # carry_overs.sort(cmp_semester_id)
Note: See TracChangeset for help on using the changeset viewer.