Changeset 2739


Ignore:
Timestamp:
22 Nov 2007, 10:30:31 (17 years ago)
Author:
joachim
Message:

belongs to previous (2738)

Location:
WAeUP_SRP/base/skins/waeup_student
Files:
2 edited

Legend:

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

    r2670 r2739  
    2929request = REQUEST
    3030
     31manage = "manage" in request.keys()
     32screening_types = ('prence','pume','pce','pde','cest','pt')
     33if not (traverse_subpath and traverse_subpath[0] in screening_types) and not manage:
     34    return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
     35configuration = []
     36headings = {}
     37headings['pume'] = 'Apply for Post UME Screening Test (2007/2008)! '
     38headings['pde'] = 'Apply for Post UDE Screening Test (2007/2008)! '
     39headings['prence'] = 'Apply for Pre-NCE Programme (2007/2008)! '
     40headings['pce'] = 'Apply for PCE Screening (2007/2008)! '
     41headings['cest'] = 'Apply for Common Entrance Screening Test (2007/2008)! '
     42headings['pt'] = 'Apply for Part Time '
     43
     44configuration += ('heading',headings),
     45headings_slip = {}
     46headings_slip['pume'] = 'Post UME Screening (2007/2008) Aknowledgement Slip!'
     47headings_slip['pde'] = 'Post UDE Screening (2007/2008) Aknowledgement Slip'
     48headings_slip['prence'] = 'Pre-NCE Application (2007/2008) Aknowledgement Slip'
     49headings_slip['pce'] = 'PCE Screening (2007/2008) Aknowledgement Slip'
     50headings_slip['cest'] = 'Common Entrance Screening (2007/2008) Aknowledgement Slip'
     51headings_slip['pt'] = 'Part Time (2007/2008) Aknowledgement Slip'
     52configuration += ('heading_slip',headings_slip),
     53
     54deaddates = {}
     55deaddates['pume'] = DateTime.DateTime('2007/08/12 23:59')
     56deaddates['pde'] = DateTime.DateTime('2007/11/04 23:59')
     57deaddates['prence'] = DateTime.DateTime('2007/8/12 23:59')
     58deaddates['pce'] = DateTime.DateTime('2007/8/12 23:59')
     59deaddates['cest'] = DateTime.DateTime('2007/8/12 23:59')
     60deaddates['pt'] = DateTime.DateTime('2007/12/24 23:59')
     61configuration += ('deaddate',deaddates),
     62
     63deadline = {}
     64#deadline['pume'] = '[Date of PUME Deadline]'
     65for sct in screening_types:
     66    deadline[sct] = deaddates[sct].strftime('%A, %d. %B %Y')
     67# deadline['pde'] = 'Sunday, 4th November 2007'
     68# deadline['prence'] = '[Date of PRENCE Deadline]'
     69# deadline['pce'] = '[Date of PCE Deadline]'
     70# deadline['cest'] = '[Date of CEST Deadline]'
     71# deadline['pt'] = '[Date of PT Deadline]'
     72configuration += ('deadline',deadline),
     73
     74confirm = {}
     75confirm['pume'] = "I confirm that the Passport Photograph uploaded on this form is a true picture of me."
     76confirm['pde'] = "I confirm that the Passport Photograph uploaded on this form is a true picture of me."
     77confirm['prence'] = "I confirm that the Passport Photograph uploaded on this form is a true picture of me."
     78confirm['pce'] = "I confirm that the Passport Photograph uploaded on this form is a true picture of me."
     79confirm['cest'] = "I confirm that the Passport Photograph uploaded on this form is a true picture of me."
     80confirm['pt'] = """I hereby acknowledge by ticking this check box that if it is discovered
     81at any time, that I do not possess any of the qualifications, which I have obtained, I will be
     82expelled from the University and shall not be readmitted for the same or any other programme,
     83even if I have upgraded my previous qualification or posses additional qualifications."""
     84configuration += ('confirm',confirm),
     85
    3186#type_name = 'StudentApplication'
    3287#ti = context.portal_types[type_name]
     
    3489create = "create" in request.keys()
    3590apply_admission = "apply" in request.keys()
    36 edit = "edit" in request.keys()
     91edit = "edit" in request.keys() or "cpsdocument_edit_button" in request.form.keys()
    3792slip = "slip" in request.keys()
    38 manage = "manage" in request.keys()
    3993submitted = False
    4094mode = request.get('mode','')
     
    83137
    84138
    85 screening_types = ('prence','pume','pce','pde','cest')
    86 headings = {}
    87 headings['pume'] = 'Apply for Post UME Screening Test (2007/2008)! '
    88 headings['pde'] = 'Apply for Post UDE Screening Test (2007/2008)! '
    89 headings['prence'] = 'Apply for Pre-NCE Programme (2007/2008)! '
    90 headings['pce'] = 'Apply for PCE Screening (2007/2008)! '
    91 headings['cest'] = 'Apply for Common Entrance Screening Test (2007/2008)! '
    92 headings_slip = {}
    93 headings_slip['pume'] = 'Post UME Screening (2007/2008) Aknowledgement Slip!'
    94 headings_slip['pde'] = 'Post UDE Screening (2007/2008) Aknowledgement Slip'
    95 headings_slip['prence'] = 'Pre-NCE Application (2007/2008) Aknowledgement Slip'
    96 headings_slip['pce'] = 'PCE Screening (2007/2008) Aknowledgement Slip'
    97 headings_slip['cest'] = 'Common Entrance Screening (2007/2008) Aknowledgement Slip'
    98 
    99 deadline = {}
    100 deadline['pume'] = '[Date of PUME Deadline]'
    101 deadline['pde'] = 'Sunday, 4th November 2007'
    102 deadline['prence'] = '[Date of PRENCE Deadline]'
    103 deadline['pce'] = '[Date of PCE Deadline]'
    104 deadline['cest'] = '[Date of CEST Deadline]'
    105139
    106140info = {}
    107141
    108142info['status'] = object.get('status','')
    109 
    110143if traverse_subpath and traverse_subpath[0] in screening_types:
    111144    screening_type = info['screening_type'] = traverse_subpath[0]
    112     info['heading'] = headings[screening_type]
    113     info['heading_slip'] = headings_slip[screening_type]
    114     info['deadline'] = deadline[screening_type]
    115     layout = "application_%s" % screening_type
    116     without_reg_no = screening_type in ('prence',)
    117145elif manage:
    118146    if object['screening_type']:
     
    121149        st = 'pume'
    122150    screening_type = info['screening_type'] = st
    123     info['heading'] = headings[screening_type]
    124     info['heading_slip'] = headings_slip[screening_type]
    125     info['deadline'] = deadline[screening_type]
    126     layout = "application_%s" % screening_type
    127     without_reg_no = screening_type in ('prence',)
    128 else:
    129     return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
     151
     152for co_name,co_dict in configuration:
     153    info[co_name] = co_dict[screening_type]
     154layout = "application_%s" % screening_type
     155without_reg_no = screening_type in ('prence','pt')
     156info['expired'] = current.greaterThan(deaddates[screening_type])
    130157
    131158
     
    173200        data[field] = dm.get(field)
    174201data['reg_no'] = reg_no
    175 
    176202if apply_admission:
    177203    if submitted:
     
    232258                                )
    233259elif edit:
     260    #set_trace()
    234261    if submitted:
    235262        mode = "view"
  • WAeUP_SRP/base/skins/waeup_student/apply_admission_form.pt

    r2670 r2739  
    55           show_submit options/show_submit|nothing;
    66           info options/info;
    7            expired python:not info['screening_type'] in ('pce','prence');
     7           expired info/expired;
    88           venue_display python:info['screening_type']=='pde';
    99           deadline info/deadline
     
    4444                   value=""
    4545                   />
    46               I confirm that the Passport Photograph uploaded on this form is a true picture of me.
     46            <span tal:replace="info/confirm" />
    4747            <br/><br/>
    4848          </metal:block>
     
    7777              <br />  <br /> 
    7878          </metal:block>         
    79          
    8079          <metal:block tal:condition="python: mode in ('create','edit') and not expired">
    8180            <p>Instructions :</p>
Note: See TracChangeset for help on using the changeset viewer.