Changeset 4424


Ignore:
Timestamp:
23 Jul 2009, 19:18:59 (15 years ago)
Author:
Henrik Bettermann
Message:

make signature date of pastoral_report_slip dependent on term

Location:
WAeUP_SRP/trunk/skins/waeup_ois
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_ois/getPastoralReportInfo.py

    r3804 r4424  
    1818"""
    1919
     20import DateTime
     21
    2022info = context.waeup_tool.getAccessInfo(context)
    2123student_id = info['student_id']
     
    2628member = mtool.getAuthenticatedMember()
    2729member_id = str(member)
     30pprops = context.portal_properties
    2831
    2932course_results = context.course_results
     
    3841info['level'] = context.portal_vocabularies.student_levels.get(context.aq_parent.getId())
    3942info['term'] = context.portal_vocabularies.terms.get(context.getId())
     43
     44if pprops.session == info['session']:
     45    info['date1'] = DateTime.DateTime(pprops.date1).strftime('%d/%m/%Y')
     46    info['date2'] = DateTime.DateTime(pprops.date2).strftime('%d/%m/%Y')
     47    info['date3'] = DateTime.DateTime(pprops.date3).strftime('%d/%m/%Y')
     48else:
     49    info['date1'] = 'n/a'
     50    info['date2'] = 'n/a'
     51    info['date3'] = 'n/a'
     52if context.getId() == 'fpr':
     53    info['term_num'] = 1
     54elif context.getId() == 'spr':
     55    info['term_num'] = 2
     56elif context.getId() == 'tpr':
     57    info['term_num'] = 3
     58 
    4059info['is_so'] = is_so = info['is_sectionofficer']
    4160#info['is_student'] = is_student = context.isStudent()
  • WAeUP_SRP/trunk/skins/waeup_ois/pastoral_report_slip.pt

    r3808 r4424  
    55              info_base context/getStudentBaseInfo;
    66              house_staff info/doc/house_staff|nothing;
     7             
     8              term_num info/term_num;
     9              sem_series python:(('Term One','normal1','complete1','score_calc_average_1','yga1','counter1','date1','over_pos_term1','no_stud_term1'),
     10                                  ('Term Two','normal2','complete2','score_calc_average_2','yga2','counter2','date2','over_pos_term2','no_stud_term2'),
     11                                  ('Term Three','normal3','complete3','score_calc_average_3','yga3','counter3','date3','over_pos_term3','no_stud_term3'));
     12              sem python:sem_series[int(term_num)-1];
     13             
     14             
    715              ">
    816    <span tal:condition="not: info">
     
    8492            <table width=100%>
    8593                <tr >
    86                     <td width="180px">Date:</td><td>12/12/2008</td>
     94                    <td width="180px">Date:</td><td><span tal:content="python:info[sem[6]]"/></td>
    8795                </tr>
    8896                <tr >
Note: See TracChangeset for help on using the changeset viewer.