Changeset 1183 for WAeUP_SRP/trunk


Ignore:
Timestamp:
3 Jan 2007, 12:53:20 (18 years ago)
Author:
joachim
Message:

corrections already in custom

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

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_student/display_session_results.py

    r1177 r1183  
    4141elif psm == 'valid':
    4242    pass
     43s_fields = context.returning_import.schema()
     44student_rec = ds.get('student')
     45student = {}
     46for field in s_fields:
     47    student[field] = getattr(student_rec,field)
    4348brains = ds.get('results')
    4449sem1 = []
    4550sem2 = []
    4651with_courses_cat = hasattr(context,'courses_catalog')
     52
    4753fields = context.results_import.schema()
     54verdict = None
     55session = None
    4856for r in brains:
     57    if verdict is None:
     58        verdict = r.Verdict
     59        session = r.Session
    4960    result = {}
    5061    for field in fields:
     
    6273#from Products.zdb import set_trace;set_trace()
    6374results = (sem1, sem2)
     75student['verdict'] = verdict
     76student['session'] = session
    6477registered = None
    65 student_rec = ds.get('student')
    6678res = context.students_catalog(matric_no = student_rec.matric_no)
    6779if res:
     
    7284else:
    7385    registered = "no_student_object"
    74 return context.session_results_anon_view(student=student_rec,
     86return context.session_results_anon_view(student=student,
    7587                                           results=results,
    7688                                           name = "%(Firstname)s %(Middlename)s %(Lastname)s" % student_rec,
  • WAeUP_SRP/trunk/skins/waeup_student/getSessionResults.py

    r1179 r1183  
    6060gpa = 0
    6161course_count = 0
     62verdict = None
     63session = None
    6264for r in results:
     65    if verdict is None:
     66        verdict = r.Verdict
     67        session = r.Session
    6368    result = {}
    6469    for field in fields:
     
    8691    else:
    8792        sem1.append(result)
    88 
    8993if course_count:
    9094    gpa = float(gpa) / course_count
    9195    gpa = "%4.2f" % gpa
     96info['verdict'] = verdict
     97info['session'] = session
    9298info['gpa'] = gpa
    9399info['results'] = (sem1, sem2)
  • WAeUP_SRP/trunk/skins/waeup_student/reserve_accommodation.py

    r1178 r1183  
    2222    return context.REQUEST.RESPONSE.redirect("%s/srp_invalid_access" % context.portal_url())
    2323
     24mode = 'create'
     25if not info['booking_allowed']:
     26    return context.REQUEST.RESPONSE.redirect("%s/no_booking_allowed" % info['student'].absolute_url())
    2427student = info['student']
    2528acco_id = info['acco_id']
    2629session = acco_id[-4:]
    27 mode = 'create'
    28 if not info['booking_allowed']:
    29     return context.REQUEST.RESPONSE.redirect("%s/no_booking_allowed" % info['student'].absolute_url())
    3030validate = REQUEST.has_key("cpsdocument_create_button")
    3131if info.has_key('acco') and info['acco']:
  • WAeUP_SRP/trunk/skins/waeup_student/session_results_anon_view.pt

    r1179 r1183  
    2727       <table>
    2828          <tr>
    29             <th width="150px">Verdict:</th><td tal:content="python:results[0][0]['Verdict']" />
     29            <th width="150px">Verdict:</th>
     30          <td tal:content="student/verdict" />
    3031          </tr>
    3132          <tr> 
    32             <th>Session:</th><td tal:content="python:results[0][0]['Session']" />
     33            <th>Session:</th><td tal:content="student/session" />
    3334          </tr>       
    3435       </table>
  • WAeUP_SRP/trunk/skins/waeup_student/session_results_slip.pt

    r1182 r1183  
    3838       <table>
    3939          <tr>
    40             <th valign="top" width="180px">Verdict:</th><td tal:content="python:info['results'][0][0]['Verdict']" />
     40            <th width="180px">Verdict:</th><td tal:content="info/verdict" />
    4141          </tr>
    4242          <tr> 
    43             <th>Session:</th><td tal:content="python:info['results'][0][0]['Session']" />
     43            <th>Session:</th><td tal:content="info/session" />
    4444          </tr>
    4545          <tr> 
  • WAeUP_SRP/trunk/skins/waeup_student/session_results_view.pt

    r1182 r1183  
    3838       <table>
    3939          <tr>
    40             <th valign="top" width="180px">Verdict:</th><td tal:content="python:info['results'][0][0]['Verdict']" />
     40            <th width="180px">Verdict:</th><td tal:content="info/verdict" />
    4141          </tr>
    4242          <tr> 
    43             <th>Session:</th><td tal:content="python:info['results'][0][0]['Session']" />
     43            <th>Session:</th><td tal:content="info/session" />
    4444          </tr>
    4545          <tr> 
Note: See TracChangeset for help on using the changeset viewer.