Changeset 7215


Ignore:
Timestamp:
26 Nov 2011, 18:07:42 (13 years ago)
Author:
Henrik Bettermann
Message:

Show more information in student listings.

Location:
main/waeup.sirp/trunk/src/waeup/sirp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/showstudentspage.pt

    r7205 r7215  
    77        <tr>
    88          <th>Student Id</th><th>Fullname</th>
     9    <th>Status</th>
     10    <th>Certificate</th>
     11    <th>Current Session</th>
     12    <th>Current Level</th>
    913        </tr>
    1014  </thead>
     
    1418      <span tal:content="item/student_id">A123456</span></a>
    1519    </td>
    16           <td tal:content="item/fullname">Bob</td>
     20          <td tal:content="item/fullname">FULLNAME</td>
     21    <td tal:content="item/state">STATE</td>
     22    <td>
     23      <a tal:attributes="href python: view.url(item.certificate)"
     24         tal:content="item/certificate/code">
     25         CERTIFICATE
     26      </a>
     27    </td>
     28    <td tal:content="item/current_session">SESSION</td>
     29    <td tal:content="item/current_level">LEVEL</td>
    1730        </tr>
    1831  </tbody>
  • main/waeup.sirp/trunk/src/waeup/sirp/students/catalog.py

    r7203 r7215  
    2424from zope.catalog.interfaces import ICatalog
    2525from zope.component import queryUtility
    26 from waeup.sirp.interfaces import IUniversity, IQueryResultItem
     26from waeup.sirp.interfaces import (
     27    IUniversity, IQueryResultItem, academic_sessions_vocab)
    2728from waeup.sirp.students.interfaces import IStudent
     29from waeup.sirp.university.vocabularies import course_levels
    2830
    2931class StudentIndexes(grok.Indexes):
     
    5860        self.matric_number = context.matric_number
    5961        self.state = context.state
     62        try:
     63            current_level = course_levels.getTerm(
     64                context['studycourse'].current_level).title
     65        except LookupError:
     66            current_level = None
     67        self.current_level = current_level
     68        try:
     69            current_session = academic_sessions_vocab.getTerm(
     70                context['studycourse'].current_session).title
     71        except LookupError:
     72            current_session = None
     73        self.current_session = current_session
     74        self.certificate = context['studycourse'].certificate
    6075
    6176def search(query=None, searchtype=None, view=None):
Note: See TracChangeset for help on using the changeset viewer.