Changeset 1839


Ignore:
Timestamp:
31 May 2007, 10:18:04 (17 years ago)
Author:
joachim
Message:

better fix for 238 (in custom)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_student/clearance_edit.py

    r1838 r1839  
    6666                                use_session=True)
    6767
    68 
    69 if is_valid:
     68if clear_and_validate_button and info['review_state'] == "clearance_requested":
     69    logger.info('%s cleared %s' % (member_id,student_id ))
     70    #from Products.zdb import set_trace
     71    #set_trace()
     72    info['clear_doc'].edit(mapping = {'cleared_date': current,})
     73    wftool.doActionFor(info['student'],'clear_and_validate')
     74    psm = "Clearance and eligibility record is validated and and student is cleared!"
     75elif clear_and_validate_button and info['review_state'] == "cleared_and_validated":
     76    psm = "This student is already cleared!"
     77elif reject_clearance_button:
     78    logger.info('%s rejected clearance for %s' % (member_id,student_id ))
     79    wftool.doActionFor(info['clear'],'open')
     80    wftool.doActionFor(info['student'],'reject_clearance')
     81    action = "/external_contact_student_form"
     82    psm = "Student's clearance request has been rejected! Please fill and submit the form below!"
     83    subject = "Clearance request rejected"
     84    args['subject'] = subject
     85    args['continue'] = 'external_clearance_edit_form'
     86elif is_valid:
    7087    if cpsdocument_edit_button or result_edit_button:
    7188        psm = "Content changed!"
     
    107124        else:
    108125            psm = "You must tick the acknowledgement check box before submission!"
    109 elif clear_and_validate_button and info['review_state'] == "clearance_requested":
    110     logger.info('%s cleared %s' % (member_id,student_id ))
    111     #from Products.zdb import set_trace
    112     #set_trace()
    113     info['clear_doc'].edit(mapping = {'cleared_date': current,})
    114     wftool.doActionFor(info['student'],'clear_and_validate')
    115     psm = "Clearance and eligibility record is validated and and student is cleared!"
    116 elif clear_and_validate_button and info['review_state'] == "cleared_and_validated":
    117     psm = "This student is already cleared!"
    118 elif reject_clearance_button:
    119     logger.info('%s rejected clearance for %s' % (member_id,student_id ))
    120     wftool.doActionFor(info['clear'],'open')
    121     wftool.doActionFor(info['student'],'reject_clearance')
    122     action = "/external_contact_student_form"
    123     psm = "Student's clearance request has been rejected! Please fill and submit the form below!"
    124     subject = "Clearance request rejected"
    125     args['subject'] = subject
    126     args['continue'] = 'external_clearance_edit_form'
    127126else:
    128127    psm = "Please correct your errors!"
Note: See TracChangeset for help on using the changeset viewer.