Changeset 870 for WAeUP_SRP/trunk


Ignore:
Timestamp:
15 Nov 2006, 17:30:45 (18 years ago)
Author:
joachim
Message:

added owner_guard and clearance_officer_guard
modified waeup_student_wf to use those.

Location:
WAeUP_SRP/trunk
Files:
2 added
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/definition.xml

    r869 r870  
    102102
    103103  <guard>
    104    <guard-expression>python: context.student_wf_guard(transition,state_change)</guard-expression>
     104   <guard-expression>here/clearance_officer_guard</guard-expression>
    105105  </guard>
    106106 </transition>
     
    110110
    111111  <guard>
    112    <guard-expression>python: context.student_wf_guard(transition,state_change)</guard-expression>
     112   <guard-expression>here/owner_guard</guard-expression>
    113113  </guard>
    114114 </transition>
     
    118118
    119119  <guard>
    120    <guard-expression>python: context.student_wf_guard(transition,state_change)</guard-expression>
     120   <guard-expression>here/clearance_officer_guard</guard-expression>
    121121  </guard>
    122122 </transition>
     
    135135
    136136  <guard>
    137    <guard-expression>python: context.student_wf_guard(transition,state_change)</guard-expression>
     137   <guard-expression>here/owner_guard</guard-expression>
    138138  </guard>
    139139  <transition-behavior behavior_id="allow-sub-create"/>
     
    144144
    145145  <guard>
    146    <guard-expression>python: context.student_wf_guard(transition,state_change)</guard-expression>
     146   <guard-expression>here/owner_guard</guard-expression>
    147147  </guard>
    148148 </transition>
     
    152152
    153153  <guard>
    154    <guard-expression>python: context.student_wf_guard(transition,state_change)</guard-expression>
     154   <guard-expression>here/owner_guard</guard-expression>
    155155  </guard>
    156156 </transition>
     
    160160
    161161  <guard>
    162    <guard-expression>python: context.student_wf_guard(transition,state_change)</guard-expression>
     162   <guard-expression>here/owner_guard</guard-expression>
    163163  </guard>
    164164 </transition>
     
    168168
    169169  <guard>
    170    <guard-expression>python: context.student_wf_guard(transition,state_change)</guard-expression>
     170   <guard-expression>here/clearance_officer_guard</guard-expression>
    171171  </guard>
    172172 </transition>
     
    176176
    177177  <guard>
    178    <guard-expression>python: context.student_wf_guard(transition,state_change)</guard-expression>
     178   <guard-expression>here/clearance_officer_guard</guard-expression>
    179179  </guard>
    180180 </transition>
     
    184184
    185185  <guard>
    186    <guard-expression>python: context.student_wf_guard(transition,state_change)</guard-expression>
     186   <guard-expression>here/clearance_officer_guard</guard-expression>
    187187  </guard>
    188188 </transition>
     
    192192
    193193  <guard>
    194    <guard-expression>python: context.student_wf_guard(transition,state_change)</guard-expression>
     194   <guard-expression>here/clearance_officer_guard</guard-expression>
    195195  </guard>
    196196 </transition>
     
    200200
    201201  <guard>
    202    <guard-expression>python: context.student_wf_guard(transition,state_change)</guard-expression>
     202   <guard-expression>here/clearance_officer_guard</guard-expression>
    203203  </guard>
    204204 </transition>
     
    208208
    209209  <guard>
    210    <guard-expression>python: context.student_wf_guard(transition,state_change)</guard-expression>
     210   <guard-expression>here/clearance_officer_guard</guard-expression>
    211211  </guard>
    212212 </transition>
     
    216216
    217217  <guard>
    218    <guard-expression>python: context.student_wf_guard(transition,state_change)</guard-expression>
     218   <guard-expression>here/owner_guard</guard-expression>
    219219  </guard>
    220220 </transition>
  • WAeUP_SRP/trunk/skins/waeup_student/clearance_edit_form_manager.pt

    r865 r870  
    6666             value="Reject Clearance"
    6767             id="reject_clearance_button"
    68              tal:condition="python:review_state == 'clearance_requested'" />
    69       <input type="submit" class="standalone"
    70              name="undo_clear_button"
    71              value="Undo Validate & Clear"
    72              id="undo_clear_button"
    7368             tal:condition="python:review_state == 'cleared_and_validated'" />
    7469      </form>
  • WAeUP_SRP/trunk/skins/waeup_student/clearance_edit_manager.py

    r858 r870  
    1919cpsdocument_edit_and_view_button = REQUEST.has_key('cpsdocument_edit_and_view_button')
    2020clear_and_validate_button = REQUEST.has_key('clear_and_validate_button')
    21 undo_clear_button = REQUEST.has_key('undo_clear_button')
    2221reject_clearance_button = REQUEST.has_key('reject_clearance_button')
    23 
    2422# Until ajax posts directly to its own script...
    2523##if 'ajax_edit' in REQUEST.form:
     
    5250    elif cpsdocument_edit_and_view_button:
    5351        wftool.doActionFor(info['clear'],'close')
    54         wftool.doActionFor(info['student'],'request_clearance')
     52        wftool.doActionFor(info['student'],'request_clearance',dest_container=1)
    5553    elif clear_and_validate_button:
    5654        wftool.doActionFor(info['student'],'clear_and_validate')
    5755    elif reject_clearance_button:
    5856        wftool.doActionFor(info['clear'],'open')
    59         wftool.doActionFor(info['student'],'enter_clearance_pin')
    60     elif undo_clear_button:
    61         wftool.doActionFor(info['student'],'request_clearance')
     57        wftool.doActionFor(info['student'],'reject_clearance')
    6258else:
    6359    psm = "Please correct your errors."
  • WAeUP_SRP/trunk/skins/waeup_student/isClearanceOfficer.py

    r867 r870  
    55##bind script=script
    66##bind subpath=traverse_subpath
    7 ##parameters=REQUEST
     7##parameters=
    88##title=
    99##
     
    1212
    1313"""
    14 request = REQUEST
    1514wftool = context.portal_workflow
    1615mtool = context.portal_membership
     
    2322    return False
    2423   
    25 
    2624res = context.portal_catalog(portal_type="Department",id=info['course_doc'].department)
    27 if len res != 1:
     25if len(res) != 1:
    2826    return False
    2927
Note: See TracChangeset for help on using the changeset viewer.