Ignore:
Timestamp:
15 Nov 2007, 14:35:05 (17 years ago)
Author:
Henrik Bettermann
Message:

fix course registration for returning students

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_student/getStudyLevelInfo.py

    r2649 r2664  
    4646info['is_ca'] = is_ca = context.isCourseAdviser()
    4747info['student'] = student = context.students_catalog(id=student_id)[0]
    48 info['review_state'] = review_state = context.getStudentReviewState()
     48info['review_state'] = review_state = student.review_state
    4949info['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
     52has_paid =  review_state == 'school_fee_paid'
     53
     54info['show_check_boxes'] =  (is_ca and has_paid) or\
     55                            (is_student and has_paid) or\
    5256                            (is_so)
     57
     58
    5359info['choosen_ids'] = request.get('ids',[])
    5460info['status_info'] = ""
     
    7783info['credits_exceeded'] = credits_total > max_credits
    7884current_session = student.session
    79 info['submission_allowed']= not info['credits_exceeded'] and\
    80     current_session == context.getSessionId()[0]
     85
     86info['submission_allowed']= review_state in  ('school_fee_paid','returning') and has_paid
     87info['validation_allowed']= review_state == 'courses_registered'
     88info['rejection_allowed']= review_state in ('courses_registered', 'courses_validated',)
     89
     90
    8191# carry_overs.sort(cmp_semester_id)
    8292info['carry_overs'] = carry_overs
     
    8696info['normal3'] = normal3
    8797
    88 info['data_missing'] = not info['normal1'] and not info['normal2'] and not info['normal3'] 
     98info['data_missing'] = not info['normal1'] and not info['normal2'] and not info['normal3']
    8999info['spillover'] = student.level > student.end_level
    90100
Note: See TracChangeset for help on using the changeset viewer.