Changeset 3426


Ignore:
Timestamp:
7 Apr 2008, 10:42:13 (17 years ago)
Author:
Henrik Bettermann
Message:

apply_admission.py: fixed

manage mode removed

application_manage layout extended

Location:
WAeUP_SRP
Files:
5 edited

Legend:

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

    r3416 r3426  
    2929request = REQUEST
    3030
    31 manage = "manage" in request.keys()
     31#manage = "manage" in request.keys()
    3232screening_types = ('prence','pume','pce','pde','cest','sandwich')
    33 if not (traverse_subpath and traverse_subpath[0] in screening_types) and not manage:
     33if not (traverse_subpath and traverse_subpath[0] in screening_types):
    3434    return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
    3535configuration = []
     
    102102mode = request.get('mode','')
    103103if not mode:
    104     if apply_admission or edit or manage:
     104    if apply_admission or edit:
    105105        mode = "edit"
    106106    elif slip:
     
    110110validate = create or edit or apply_admission
    111111
    112 if manage:
    113     validate = False
    114112without_reg_no = False
    115113
     
    177175        submitted = True
    178176    # cannot happen anymore but anyway
    179     if not (create or slip) and (pin != object['pin'] and not context.isSectionOfficer()):
    180         logger.info('%s/%s entered wrong pin %s' % (member,reg_no,pin))
    181         return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
     177    #if not (create or slip) and (pin != object['pin'] and not context.isSectionOfficer()):
     178    #    logger.info('%s/%s entered wrong pin %s' % (member,reg_no,pin))
     179    #    return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
    182180
    183181    #rerender with current object = application-record
    184    
     182
    185183    if slip:
    186184        mode = "view_slip"
    187185        logger.info('%s/%s views application slip' % (member,reg_no))
    188    
     186
    189187    res,psm,ds = lt.renderLayout(layout_id= layout,
    190188                                schema_id= 'import_application',
     
    201199                                            ds = ds,
    202200                                            info = info,
    203                                            )                               
    204                                
     201                                           )
     202
    205203    if psm == 'invalid':
    206204        return context.apply_admission_form(rendered = res,
     
    224222        data[field] = dm.get(field)
    225223data['reg_no'] = reg_no
    226 if manage:
    227     if submitted:
    228         mode = "view"
    229         psm = "You are now assuming the applicant's role!"
    230         logger.info('%s/%s entered application record' % (member,reg_no))
    231         # res,psm_dummy,ds_dummy = lt.renderLayout(layout_id= layout,
    232         #                         schema_id= 'import_application',
    233         #                         layout_mode = mode,
    234         #                         context=context,
    235         #                         mapping={},
    236         #                         ob=object,
    237         #                         commit = False,
    238         #                         )
    239     else:
    240         mode = "edit"
    241         psm = "You are now assuming the applicant's role!"
    242         logger.info('%s/%s entered application record' % (member,reg_no))
    243 elif apply_admission:
     224
     225if apply_admission:
    244226    if submitted:
    245227        mode = "view"
  • WAeUP_SRP/base/skins/waeup_student/apply_admission_form.pt

    r3421 r3426  
    4141          <div tal:replace="structure rendered_main" />
    4242         
    43           <metal:block tal:condition="python: show_submit and mode == 'edit'">
     43          <metal:block tal:condition="python: show_submit and mode == 'edit' and not expired">
    4444            <br/>
    4545            <input type="checkbox" class="standalone"
     
    5555                 name="edit"
    5656                 value="Save"
    57                  tal:condition="python: mode == 'edit' and not expired" />
     57                 tal:condition="python: mode == 'edit'" />
    5858          <input type="submit" class="standalone" name="apply"
    5959                 value="Final Submit"
  • WAeUP_SRP/uniben/profiles/default/layouts/application_manage.xml

    r2984 r3426  
    258258    <property name="label">'English' Score</property>
    259259    <property name="label_edit">'English' Score</property>
    260     <property name="description"></property>
     260    <property name="description">JAMB Scores</property>
    261261    <property name="help"></property>
    262262    <property name="is_i18n">False</property>
     
    522522    <property name="label">Application Date</property>
    523523    <property name="label_edit">Application Date</property>
    524     <property name="description"></property>
     524    <property name="description">Application Data</property>
    525525    <property name="help"></property>
    526526    <property name="is_i18n">False</property>
     
    730730    <property name="vocabulary">high_qual</property>
    731731  </widget>
    732 
    733 
     732 
    734733  <widget name="hq_grade" meta_type="Select Widget">
    735     <property name="title">Higher Qualification Grade</property>
    736     <property name="fields">
    737     <element value="hq_grade"/>
    738     </property>
    739     <property name="label">Higher Qualification Grade</property>
    740     <property name="label_edit">Higher Qualification Grade</property>
    741     <property name="readonly_layout_modes">
    742     </property>
    743     <property name="hidden_layout_modes">
    744     <element value="create"/>
    745     </property>
    746     <property name="hidden_readonly_layout_modes"/>
    747     <property name="vocabulary">high_grade</property>
    748   </widget>
     734      <property name="title">Higher Qualification Grade</property>
     735      <property name="fields">
     736       <element value="hq_grade"/>
     737      </property>
     738      <property name="label">Higher Qualification Grade</property>
     739      <property name="label_edit">Higher Qualification Grade</property>
     740      <property name="readonly_layout_modes"/>
     741      <property name="hidden_layout_modes">
     742       <element value="create"/>
     743      </property>
     744      <property name="hidden_readonly_layout_modes"/>
     745      <property name="vocabulary">high_grade</property>
     746     </widget>
     747     <widget name="hq_disc" meta_type="String Widget">
     748      <property name="title">Discipline</property>
     749      <property name="fields">
     750       <element value="hq_disc"/>
     751      </property>
     752      <property name="label">Discipline</property>
     753      <property name="label_edit">Discipline</property>
     754      <property name="readonly_layout_modes"/>
     755      <property name="hidden_layout_modes">
     756       <element value="create"/>
     757      </property>
     758      <property name="hidden_readonly_layout_modes"/>
     759     </widget>
     760     <widget name="hq_matric_no" meta_type="String Widget">
     761      <property name="title">Former Matric Number</property>
     762      <property name="fields">
     763       <element value="hq_matric_no"/>
     764      </property>
     765      <property name="label">Former Matric Number</property>
     766      <property name="label_edit">Former Matric Number</property>
     767      <property name="description">Higher Educational Data</property>
     768      <property name="readonly_layout_modes"/>
     769      <property name="hidden_layout_modes">
     770       <element value="create"/>
     771      </property>
     772      <property name="hidden_readonly_layout_modes"/>
     773     </widget>
     774     <widget name="hq_school" meta_type="String Widget">
     775      <property name="title">School Attended</property>
     776      <property name="fields">
     777       <element value="hq_school"/>
     778      </property>
     779      <property name="label">School Attended</property>
     780      <property name="label_edit">School Attended</property>
     781      <property name="readonly_layout_modes"/>
     782      <property name="hidden_layout_modes">
     783       <element value="create"/>
     784      </property>
     785      <property name="hidden_readonly_layout_modes"/>
     786     </widget>
     787     <widget name="hq_session" meta_type="String Widget">
     788      <property name="title">Session Obtained</property>
     789      <property name="fields">
     790       <element value="hq_session"/>
     791      </property>
     792      <property name="label">Session Obtained</property>
     793      <property name="label_edit">Session Obtained</property>
     794      <property name="readonly_layout_modes"/>
     795      <property name="hidden_layout_modes">
     796       <element value="create"/>
     797      </property>
     798      <property name="hidden_readonly_layout_modes"/>
     799  </widget>
     800  <widget name="fst_sit_fname" meta_type="String Widget">
     801      <property name="title">Full Name</property>
     802      <property name="fields">
     803       <element value="fst_sit_fname"/>
     804      </property>
     805      <property name="label">Full Name</property>
     806      <property name="label_edit">Full Name</property>
     807      <property name="description">First Sitting Data</property>
     808      <property
     809         name="help">Full name as it appears on certificate/result</property>
     810      <property name="readonly_layout_modes"/>
     811      <property name="hidden_layout_modes">
     812       <element value="create"/>
     813      </property>
     814      <property name="hidden_readonly_layout_modes"/>
     815     </widget>
     816     <widget name="fst_sit_no" meta_type="String Widget">
     817      <property name="title">Exam Number</property>
     818      <property name="fields">
     819       <element value="fst_sit_no"/>
     820      </property>
     821      <property name="label">Exam Number</property>
     822      <property name="label_edit">Exam Number</property>
     823      <property name="readonly_layout_modes"/>
     824      <property name="hidden_layout_modes">
     825       <element value="create"/>
     826      </property>
     827      <property name="hidden_readonly_layout_modes"/>
     828     </widget>
     829     <widget name="fst_sit_date" meta_type="DateTime Widget">
     830      <property name="title">Exam Date</property>
     831      <property name="fields">
     832       <element value="fst_sit_date"/>
     833      </property>
     834      <property name="label">Exam Date</property>
     835      <property name="label_edit">Exam Date (dd/mm/yyyy)</property>
     836      <property name="readonly_layout_modes"/>
     837      <property name="hidden_layout_modes">
     838       <element value="create"/>
     839      </property>
     840      <property name="hidden_readonly_layout_modes"/>
     841      <property name="view_format">%d/%m/%Y</property>
     842      <property name="time_setting">False</property>
     843     </widget>
     844     <widget name="fst_sit_results" meta_type="WAeUp Results Widget">
     845      <property name="title">Results</property>
     846      <property name="fields">
     847       <element value="fst_sit_results"/>
     848      </property>
     849      <property name="label">Results</property>
     850      <property name="label_edit">Results</property>
     851      <property name="readonly_layout_modes"/>
     852      <property name="hidden_layout_modes">
     853       <element value="create"/>
     854      </property>
     855      <property name="hidden_readonly_layout_modes"/>
     856     </widget>
     857     <widget name="fst_sit_type" meta_type="Select Widget">
     858      <property name="title">Exam Type</property>
     859      <property name="fields">
     860       <element value="fst_sit_type"/>
     861      </property>
     862      <property name="label">Exam Type</property>
     863      <property name="label_edit">Exam Type</property>
     864      <property name="readonly_layout_modes"/>
     865      <property name="hidden_layout_modes">
     866       <element value="create"/>
     867      </property>
     868      <property name="hidden_readonly_layout_modes"/>
     869      <property name="vocabulary">exam_types</property>
     870     </widget>
     871     <widget name="scd_sit_fname" meta_type="String Widget">
     872      <property name="title">Full Name</property>
     873      <property name="fields">
     874       <element value="scd_sit_fname"/>
     875      </property>
     876      <property name="label">Full Name</property>
     877      <property name="label_edit">Full Name</property>
     878      <property name="description">Second Sitting Data</property>
     879      <property
     880         name="help">Full name as it appears on certificate/result</property>
     881      <property name="readonly_layout_modes"/>
     882      <property name="hidden_layout_modes">
     883       <element value="create"/>
     884      </property>
     885      <property name="hidden_readonly_layout_modes"/>
     886     </widget>
     887     <widget name="scd_sit_no" meta_type="String Widget">
     888      <property name="title">Exam Number</property>
     889      <property name="fields">
     890       <element value="scd_sit_no"/>
     891      </property>
     892      <property name="label">Exam Number</property>
     893      <property name="label_edit">Exam Number</property>
     894      <property name="readonly_layout_modes"/>
     895      <property name="hidden_layout_modes">
     896       <element value="create"/>
     897      </property>
     898      <property name="hidden_readonly_layout_modes"/>
     899     </widget>
     900     <widget name="scd_sit_type" meta_type="Select Widget">
     901      <property name="title">Exam Type</property>
     902      <property name="fields">
     903       <element value="scd_sit_type"/>
     904      </property>
     905      <property name="label">Exam Type</property>
     906      <property name="label_edit">Exam Type</property>
     907      <property name="readonly_layout_modes"/>
     908      <property name="hidden_layout_modes">
     909       <element value="create"/>
     910      </property>
     911      <property name="hidden_readonly_layout_modes"/>
     912      <property name="vocabulary">exam_types</property>
     913     </widget>
     914     <widget name="scd_sit_date" meta_type="DateTime Widget">
     915      <property name="title">Exam Date</property>
     916      <property name="fields">
     917       <element value="scd_sit_date"/>
     918      </property>
     919      <property name="label">Exam Date</property>
     920      <property name="label_edit">Exam Date (dd/mm/yyyy)</property>
     921      <property name="readonly_layout_modes"/>
     922      <property name="hidden_layout_modes">
     923       <element value="create"/>
     924      </property>
     925      <property name="hidden_readonly_layout_modes"/>
     926      <property name="view_format">%d/%m/%Y</property>
     927      <property name="time_setting">False</property>
     928     </widget>
     929     <widget name="scd_sit_results" meta_type="WAeUp Results Widget">
     930      <property name="title">Results</property>
     931      <property name="fields">
     932       <element value="scd_sit_results"/>
     933      </property>
     934      <property name="label">Results</property>
     935      <property name="label_edit">Results</property>
     936      <property name="readonly_layout_modes"/>
     937      <property name="hidden_layout_modes">
     938       <element value="create"/>
     939      </property>
     940      <property name="hidden_readonly_layout_modes"/>
     941  </widget>
     942 
    749943
    750944  <widget name="aos" meta_type="Select Widget">
     
    8351029  </row>
    8361030  <row>
    837    <cell name="hq_type" ncols="2"/>
    838   </row>
    839   <row>
    840    <cell name="hq_grade" ncols="2"/>
    841   </row>
     1031   <cell name="passport" ncols="2"/>
     1032  </row> 
    8421033  <row>
    8431034   <cell name="aos" ncols="2"/>
    844   </row>
     1035  </row> 
     1036  <row>
     1037   <cell name="course1" ncols="2"/>
     1038  </row>
     1039  <row>
     1040   <cell name="course2" ncols="2"/>
     1041  </row>
     1042  <row>
     1043   <cell name="course3" ncols="2"/>
     1044  </row>
     1045     
     1046 
     1047    <row>
     1048      <cell name="hq_matric_no"/>
     1049    </row>
     1050    <row>
     1051      <cell name="hq_type"/>
     1052    </row>
     1053    <row>
     1054      <cell name="hq_grade"/>
     1055    </row>
     1056    <row>
     1057      <cell name="hq_school"/>
     1058    </row>
     1059    <row>
     1060      <cell name="hq_session"/>
     1061    </row>
     1062    <row>
     1063      <cell name="hq_disc"/>
     1064    </row>
     1065 
     1066    <row>
     1067      <cell name="fst_sit_fname"/>
     1068    </row>
     1069    <row>
     1070      <cell name="fst_sit_no"/>
     1071    </row>
     1072    <row>
     1073      <cell name="fst_sit_date"/>
     1074    </row>
     1075    <row>
     1076      <cell name="fst_sit_type"/>
     1077    </row>
     1078    <row>
     1079      <cell name="fst_sit_results"/>
     1080    </row>
     1081    <row>
     1082      <cell name="scd_sit_fname"/>
     1083    </row>
     1084    <row>
     1085      <cell name="scd_sit_no"/>
     1086    </row>
     1087    <row>
     1088      <cell name="scd_sit_date"/>
     1089    </row>
     1090    <row>
     1091      <cell name="scd_sit_type"/>
     1092    </row>
     1093    <row>
     1094      <cell name="scd_sit_results"/>
     1095    </row> 
     1096 
     1097
     1098
    8451099  <row>
    8461100   <cell name="eng_score" ncols="2"/>
     
    8611115   <cell name="aggregate" ncols="2"/>
    8621116  </row>
    863   <row>
    864    <cell name="course1" ncols="2"/>
    865   </row>
    866   <row>
    867    <cell name="course2" ncols="2"/>
    868   </row>
    869   <row>
    870    <cell name="course3" ncols="2"/>
    871   </row>
     1117
    8721118  <row>
    8731119   <cell name="application_date" ncols="2"/>
     
    8821128   <cell name="screening_type" ncols="2"/>
    8831129  </row>
    884   <row>
    885    <cell name="passport" ncols="2"/>
    886   </row>
     1130
    8871131  <row>
    8881132   <cell name="screening_score" ncols="2"/>
  • WAeUP_SRP/uniben/profiles/default/vocabularies/application_status.xml

    r2790 r3426  
    88
    99    <item key="entered" msgid="">APP PIN entered</item>
     10    <item key="reset" msgid="">Record reset (not yet re-submitted)</item>
    1011    <item key="edited" msgid="">Record edited (not yet submitted)</item>
    1112    <item key="submitted" msgid="">Record submitted (waiting for results)</item>
  • WAeUP_SRP/uniben/waeup_custom/apply_admission_manage_form.pt

    r3343 r3426  
    100100        <br/>
    101101       
    102         <form action="" id="editForm" method="post"
    103             enctype="multipart/form-data" class="workflow"
    104             tal:attributes="action string:${context/absolute_url}/apply_admission"
    105             tal:condition="rendered_main"
    106             >
    107         <input type="hidden" name="reg_no"
    108                tal:attributes="value ds/reg_no|nothing"
    109                tal:condition="ds/reg_no|nothing"/>
    110         <input type="submit"
    111                class="standalone"
    112                name="manage"
    113                value="Assume Applicant's Role"
    114                />             
    115         </form>         
     102
    116103       
    117104      </metal:block>
Note: See TracChangeset for help on using the changeset viewer.