Ignore:
Timestamp:
12 May 2007, 16:42:06 (18 years ago)
Author:
Henrik Bettermann
Message:

Three bugs fixed:

  1. the verdict key must be stored
  2. the field name is current_verdict
  3. the if statement sc_review_state != 'content_addable' did not make sense
File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py

    r1778 r1779  
    121121        matric_no = res[0].matric_no
    122122        verdict = res[0].verdict
    123         if s_review_state == "returning" and not verdict:
     123        if s_review_state in ('returning','school_fee_paid') and not verdict:
    124124            results = context.results_import(matric_no = matric_no)
    125125            if results:
    126126                study_course = getattr(student,'study_course')
    127127                sc_review_state = wftool.getInfoFor(study_course,'review_state',None)
     128                dsc = {}
     129                dsc['current_verdict'] = context.getVerdict(results[0].Verdict)[0]
    128130                if sc_review_state != 'opened':
    129131                    wftool.doActionFor(study_course,'open')
    130132                study_course_doc =study_course.getContent()
    131                 study_course_doc.edit(mapping={'verdict':results[0].Verdict})
    132                 if sc_review_state != 'opened':
    133                     wftool.doActionFor(study_course,'close_for_edit')
     133                study_course_doc.edit(mapping = dsc)
     134                wftool.doActionFor(study_course,'close_for_edit')
    134135        is_imported = context.returning_import(matric_no = matric_no)
    135136        if s_review_state == "application_pin_entered":
     
    143144        elif s_review_state == "returning" and is_imported:
    144145            redirect_url = "%s/session_results_view" % student.absolute_url()
     146        elif s_review_state in ('school_fee_paid','courses_registered'):
     147            redirect_url = "%s/study_course/study_course_view" % student.absolute_url()           
    145148        else:
    146149            redirect_url = "%s/student_index" % student.absolute_url()
Note: See TracChangeset for help on using the changeset viewer.