Changeset 1141


Ignore:
Timestamp:
28 Dec 2006, 10:59:02 (18 years ago)
Author:
joachim
Message:

set infopenalty? if CreationDate? newer than 2006/12/10 and current date later than 2006/12/30

Location:
WAeUP_SRP/trunk/skins/waeup_student
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_student/clearance_pin_form.pt

    r1028 r1141  
    22                   portal_status_message options/psm;
    33                   data_storage options/ds;
    4                    jamb options/jamb/getContent|nothing;
     4                   info options/info|nothing;
    55                   edition python:1;"
    66                   >
     
    1515      <metal:block fill-slot="main">
    1616        <h3>Start Clearance! </h3>
     17        <strong tal:condition="info/penalty">
     18          You are required to pay and obtain a receipt, the sum of Three Thousand Naira Only (N3,000.00)
     19          as penalty for late clearance as your clearance ended on 22nd December 2006.
     20        </strong>
    1721        <br />
    1822        <div tal:replace="structure rendered_main" />
  • WAeUP_SRP/trunk/skins/waeup_student/getClearanceInfo.py

    r1102 r1141  
    1414import logging
    1515logger = logging.getLogger('Student.Clearance.Info')
     16from DateTime import DateTime
    1617
    1718request = context.REQUEST
     
    3940students_object = context.portal_url.getPortalObject().campus.students
    4041student = getattr(students_object, student_id)
     42res = context.portal_catalog(portal_type='Student',id = student_id)
     43if len(res) == 0:
     44    return None
     45creation_date = DateTime(res[0].CreationDate)
     46info['penalty'] = creation_date.lessThan(DateTime('2006/12/10'))\
     47                  and DateTime().greaterThan(DateTime('2006/12/30'))
    4148info['id'] = student_id
    4249info['student'] = student
    4350info['review_state'] = wf.getInfoFor(student,'review_state',None)
    44 #info['app'] = student.application
    45 #info['app_doc'] = student.application.getContent()
     51info['app'] = student.application
     52info['app_doc'] = student.application.getContent()
    4653info['clear'] = student.clearance
    4754info['clear_doc'] = student.clearance.getContent()
  • WAeUP_SRP/trunk/skins/waeup_student/start_clearance.py

    r1108 r1141  
    1010logger = logging.getLogger('Student.Clearance.Start')
    1111
    12 type_name = 'Student'
     12#type_name = 'Student'
     13#ti = context.portal_types[type_name]
     14#request.set('type_name',type_name)
     15#wf = context.portal_workflow
    1316request=REQUEST
    14 ti = context.portal_types[type_name]
    15 request.set('type_name',type_name)
    1617redirect = request.RESPONSE.redirect
    17 wf = context.portal_workflow
    1818validate = REQUEST.has_key("cpsdocument_create_button")
     19lt = context.portal_layouts
     20#pr = context.portal_registration
    1921
    20 lt = context.portal_layouts
    21 pr = context.portal_registration
    22 
    23 info = context.getStudentInfo()
     22info = context.getClearanceInfo()
    2423if info is None:
    2524    member_id = str(context.portal_membership.getAuthenticatedMember())
     
    4443                                 lastlayout = True,
    4544                                 ds = ds,
     45                                 info = info,
    4646                                 )
    4747error = False
     
    6868                                 lastlayout = True,
    6969                                 ds = ds,
     70                                 info = info,
    7071                                 )
    7172session.set("clicked","clicked")
Note: See TracChangeset for help on using the changeset viewer.