Changeset 766 for WAeUP_SRP/trunk


Ignore:
Timestamp:
27 Oct 2006, 16:35:27 (18 years ago)
Author:
joachim
Message:

added request_clearance

Location:
WAeUP_SRP/trunk
Files:
3 added
11 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/Students.py

    r765 r766  
    310310            student = getattr(self,sid)
    311311            student.manage_setLocalRoles(sid, ['Owner',])
     312            student.invokeFactory('StudentClearance','clearance')
     313            wftool.doActionFor(student.clearance,'open')
     314            dp = {'Title': 'Clearance Data'}
     315            student.clearance.manage_setLocalRoles(sid, ['Owner',])
    312316            student.invokeFactory('StudentPume','pume')
    313317            dp = {'Title': 'Pume Data'}
     
    329333            app = student.application
    330334            app.getContent().edit(mapping=da)
    331             #wftool.doActionFor(app,'open',dest_container=app)
    332335            app.manage_setLocalRoles(sid, ['Owner',])
    333336            dp_fields = (
     
    343346            pume.manage_setLocalRoles(sid, ['Owner',])
    344347            student.getContent().createSubObjects()
     348            wftool.doActionFor(student,'admit',dest_container=student)
    345349            if len(no_import) > 1:
    346350                open("%s/import/%s_not_imported.csv" % (i_home,name),"w").write(
  • WAeUP_SRP/trunk/profiles/default/actionicons.xml

    r761 r766  
    241241              title="Apply for PUME" priority="2"
    242242              icon_expr="bell.png"/>
     243 <action-icon category="student" action_id="request_clearance"
     244              title="Apply for PUME" priority="3"
     245              icon_expr="bell.png"/>
    243246 <action-icon category="student" action_id="reserve_accommodation"
    244247              title="Book Hostel" priority="3"
  • WAeUP_SRP/trunk/profiles/default/actions.xml

    r759 r766  
    138138   <permission>View</permission>
    139139  </action>
     140  <action title="Request Clearance" action_id="request_clearance"
     141     category="student" condition_expr="not:member"
     142     url_expr="string:${portal_url}/request_clearance"
     143     visible="True">
     144   <permission>View</permission>
     145  </action>
    140146  <action title="Book Hostel" action_id="reserve_accommodation"
    141147     category="student" condition_expr="member"
  • WAeUP_SRP/trunk/profiles/default/layouts/student_application_fe.xml

    r710 r766  
    3636  <property name="hidden_layout_modes"/>
    3737  <property name="hidden_readonly_layout_modes"/>
    38   <property name="prefix">APP</property>
     38  <property name="prefix">CLR</property>
    3939  <property name="reference">jamb_reg_no</property>
    4040  </widget>
  • WAeUP_SRP/trunk/profiles/default/layouts/student_clearance_fe.xml

    r488 r766  
    655655 <table>
    656656  <row>
     657   <cell name="clr_ac_pin"/>
     658  </row>
     659  <row>
     660   <cell name="entry_date"/>
     661  </row>
     662  <row>
     663   <cell name="entry_session"/>
     664  </row>
     665  <row>
     666   <cell name="email"/>
     667  </row>
     668  <row>
     669   <cell name="passport"/>
     670  </row>
     671  <row>
    657672   <cell name="lga"/>
    658673  </row>
    659674  <row>
    660675   <cell name="nationality"/>
     676  </row>
     677  <row>
     678   <cell name="matric_no"/>
     679  </row>
     680  <row>
     681   <cell name="birthday"/>
     682  </row>
     683  <row>
     684   <cell name="birth_certificate"/>
    661685  </row>
    662686 </table>
  • WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/definition.xml

    r754 r766  
    2828 </state>
    2929 <state state_id="clearance_pin_entered" title="">
    30   <exit-transition transition_id="request_clearence"/>
     30  <exit-transition transition_id="request_clearance"/>
     31  <permission-map name="Modify portal content"
     32                  acquired="True">
     33  </permission-map>
    3134 </state>
    3235 <state state_id="cleared_and_validated" title="">
    3336  <exit-transition transition_id="create_content"/>
    3437 </state>
    35  <state state_id="clearence_requested" title="">
     38 <state state_id="clearance_requested" title="">
    3639  <exit-transition transition_id="clear_and_validate"/>
    3740  <exit-transition transition_id="reject_clearance"/>
     41  <permission-map name="Modify portal content"
     42                  acquired="True">
     43  </permission-map>
    3844 </state>
    3945 <state state_id="deferred" title="">
     
    5056 </state>
    5157 <state state_id="student_created" title="">
     58  <exit-transition transition_id="admit"/>
    5259  <exit-transition transition_id="clear_and_validate"/>
    5360  <exit-transition transition_id="create_content"/>
     
    184191  </guard>
    185192 </transition>
    186  <transition transition_id="request_clearence" title=""
    187              new_state="clearence_requested" trigger="USER"
     193 <transition transition_id="request_clearance" title=""
     194             new_state="clearance_requested" trigger="USER"
    188195             before_script="" after_script="">
    189196 
  • WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py

    r753 r766  
    5151            info = context.getStudentInfo()
    5252            student = info['student']
    53             if info['review_state'] == "student_created":
    54                 student.content_status_modify(workflow_action="enter_application_pin")
     53            if info['review_state'] in ("student_created","admitted"):
     54                student.content_status_modify(workflow_action="enter_clearance_pin")
    5555                wftool.doActionFor(info['app'],'open',dest_container=info['app'])
    5656                da = {}
    5757                pin = request.get('pin')
     58                app_doc = info['app_doc']
    5859                da['app_ac_pin'] = pin
    5960                da['app_ac_date'] = current
    60                 info['app_doc'].edit(mapping = da)
     61                app_doc.edit(mapping = da)
     62                dc = {}
     63                dc['clr_ac_pin'] = pin
     64                dc['entry_date'] = current
     65                dc['session'] = "%s" % current.year()
     66                dc['lga'] = app_doc.jamb_lga
     67                info['clear_doc'].edit(mapping = dc)
    6168        elif "Manager" in member.getRoles():
    6269            pass
  • WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py

    r750 r766  
    5959else:
    6060    info['acco'] = None
     61res = context.portal_catalog(container_path=student_path,
     62                             portal_type='StudentClearance')
     63if res:
     64    clear = res[0].getObject()
     65    info['clear'] = clear
     66    info['clear_doc'] = clear.getContent()
     67    info['clear_review_state'] = wf.getInfoFor(clear,'review_state',None)
     68else:
     69    info['clear'] = None
    6170
    6271items = []
    6372s_edit_links = {'StudentApplication': 'student_edit',
    6473              'StudentAccommodation': '',
     74              'StudentClearance': '',
    6575              'StudentPersonal': '',
    6676              }
    6777s_view_links = {'StudentApplication': None,
    6878              'StudentAccommodation': 'accommodation_view',
     79              'StudentClearance': None,
    6980              'StudentPersonal': None,
    7081              'StudentApplication': 'application_view',
  • WAeUP_SRP/trunk/skins/waeup_student/passport_entry_view.pt

    r711 r766  
    1818      <span tal:condition="info"
    1919            tal:define="review_state info/review_state">
    20         <h3>Upload your Passport Picture!</h3>
     20        <h3>Upload or Change your Passport Picture!</h3>
    2121        <br />
    2222        <span tal:omit-tag="" tal:replace="structure rendered_main"/>
  • WAeUP_SRP/trunk/skins/waeup_student/student_edit.py

    r710 r766  
    99# $Id$
    1010"""
    11 Called when a document form is posted.
    12 
    13 Validates data, then:
    14 
    15  - if there's no error, updates the object and redirects to it,
    16 
    17  - if there's an error, puts data in session and redirects to edit form.
    18 
    19 A form uid is propagated during the redirect to uniquely identify the
    20 form in the session.
    2111"""
    2212wftool = context.portal_workflow
    2313from urllib import urlencode
    2414from Products.CPSDocument.utils import getFormUidUrlArg
     15import DateTime
     16current = DateTime.DateTime()
    2517
    2618# Until ajax posts directly to its own script...
     
    3830app = info['app']
    3931app_doc = info['app_doc']
     32clear = info['clear']
     33clear_doc = info['clear_doc']
    4034state = context.getStudentInfo()['review_state']
    4135
     
    7771    else:
    7872        args = {}
    79         student.content_status_modify(workflow_action="apply_for_admission")
    80         wftool.doActionFor(app,'close',dest_container= app)
    81         psm = 'You applied for admission.'
    82         action = "/application_view"
     73        if info['review_state'] == "student_created":
     74            student.content_status_modify(workflow_action="apply_for_admission")
     75            wftool.doActionFor(app,'close',dest_container= app)
     76            psm = 'You applied for admission.'
     77            action = "/application_view"
     78        elif info['review_state'] == "clearance_pin_entered":
     79            student.content_status_modify(workflow_action="request_clearance")
     80            #wftool.doActionFor(info['clear'],'open',dest_container=info['clear'])
     81            da = {}
     82            pin = REQUEST.get('pin')
     83            da['app_ac_pin'] = pin
     84            da['app_ac_date'] = current
     85            app_doc = info['app_doc']
     86            app_doc.edit(mapping = da)
     87            dc = {}
     88            dc['email'] = app_doc.appl_email
     89            dc['mobil'] = app_doc.appl_mobile
     90            dc['passport'] = app_doc.passport
     91            info['clear_doc'].edit(mapping = dc)
     92            wftool.doActionFor(app,'close',dest_container= app)
     93            psm = 'You requested clearance.'
     94            action = "/clearance_view"
     95        else:
     96            psm = ''
     97            action = "/clearance_view"
     98           
    8399else:
    84100    is_valid, ds = app_doc.validate(request=REQUEST, proxy=context, cluster=cluster,
  • WAeUP_SRP/trunk/skins/waeup_student/student_index.py

    r765 r766  
    3232    if state == 'admission_applied':
    3333        return redirect("%s/application_view" % student.absolute_url())
    34     elif state == 'application_pin_entered':
     34    elif state in ('application_pin_entered','clearance_pin_entered'):
    3535        return redirect("%s/passport_entry_view" % student.absolute_url())
     36    elif state == 'request_clearance':
     37        return redirect("%s/student_view" % info['clear'].absolute_url())
    3638    elif context.portal_type == 'StudentStudyLevel':
    3739        return context.study_level_student_view()
    3840    return redirect("%s/student_view" % student.absolute_url())
    39 
    40 
Note: See TracChangeset for help on using the changeset viewer.