Changeset 841


Ignore:
Timestamp:
11 Nov 2006, 13:32:24 (18 years ago)
Author:
joachim
Message:

add vocabularies for subjects and grades according to Kehindes Data
use them in clearance form.

Location:
WAeUP_SRP/trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/Widgets.py

    r819 r841  
    329329        v = datamodel[self.fields[0]]
    330330        #import pdb;pdb.set_trace()
    331         #clear_doc = self.getStudentInfo()['clear_doc']
    332         #vd = getattr(clear_doc,self.fields[0],None)
    333 ##        if not vd:
    334 ##            vd = []
    335331        widget_id = self.getWidgetId()
    336332        datastructure[widget_id] = v
     
    384380            raise RuntimeError("Unknown Render Method %s for widget type %s"
    385381                               % (render_method, self.getId()))
    386 
    387         # XXX AT: datastructure has to be set again here, in case we're in edit
    388         # or create mode, because a default value has to be provided.
    389382        #import pdb;pdb.set_trace()
    390383        datamodel = datastructure.getDataModel()
  • WAeUP_SRP/trunk/profiles/default/vocabularies.xml

    r629 r841  
    33 <property name="title"></property>
    44 <object name="courselevel" meta_type="CPS Vocabulary"/>
     5 <object name="exam_subjects" meta_type="CPS Vocabulary"/>
     6 <object name="exam_types" meta_type="CPS Vocabulary"/>
     7 <object name="exam_grades" meta_type="CPS Vocabulary"/>
    58 <object name="institution_types_voc" meta_type="CPS Vocabulary"/>
    69 <object name="get_departments_voc" meta_type="CPS Method Vocabulary"/>
  • WAeUP_SRP/trunk/skins/waeup_student/widget_waeup_result_render.pt

    r836 r841  
    66                   subject options/datastructure/?id_s;
    77                   grade options/datastructure/?id_g;
     8                   grade_voc context/portal_vocabularies/exam_grades;   
     9                   subjects_voc context/portal_vocabularies/exam_subjects;   
    810">
    911<tal:block condition="python: mode == 'view'">
    1012    <div tal:repeat="res results">
    11       <span tal:repeat="col res"><span tal:content="col" />&nbsp;&nbsp;</span>
     13      <span tal:content="python:subjects_voc.get(res[0])" />&nbsp;&nbsp;<span tal:content="python:grade_voc.get(res[1])" />
    1214    </div>
    1315</tal:block>
     
    1719    <tr><th>Subject</th><th>Grade</th>
    1820    <tr tal:repeat="res results">
    19       <td tal:repeat="col res" tal:content="col" />
     21      <td tal:content="python:subjects_voc.get(res[0])" /><td tal:content="python:grade_voc.get(res[1])" />
    2022    </tr>
    2123    <tr>
     
    2325                  tal:attributes="name string:${name}_s;
    2426                  id string:${name}_s;">
    25               <option tal:repeat="sub python:(('','----'),('Mathematics','Mathematics'),('English','English'))"
     27              <option tal:repeat="sub subjects_voc/items"
    2628                      tal:attributes="value python:sub[0]"
    2729                      tal:content="python: sub[1]">
     
    3335                  tal:attributes="name string:${name}_g;
    3436                  id string:${name}_g;">
    35                   <option tal:repeat="sub python:(('','-'),('A','A'),('B','B'),('C','C'),('D','D'))"
     37                  <option tal:repeat="sub grade_voc/items"
    3638                          tal:attributes="value python:sub[0]"
    3739                          tal:content="python: sub[1]">
Note: See TracChangeset for help on using the changeset viewer.