Changeset 1986


Ignore:
Timestamp:
5 Jul 2007, 09:10:38 (17 years ago)
Author:
Henrik Bettermann
Message:

show sessions, courselevel and entrymodes vocabularies in correct order, please check
(btw courselevel should be renamed to levels)

Location:
WAeUP_SRP/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/WAeUPTables.py

    r1971 r1986  
    6161    def manage_catalogClear(self, REQUEST=None, RESPONSE=None, URL1=None):
    6262        """ clears the whole enchilada """
    63        
     63
    6464        #if REQUEST and RESPONSE:
    6565        #    RESPONSE.redirect(
     
    357357            digit = int(doc.jamb_reg_no[0])
    358358        except:
    359             return "xx"
     359            return "-1"
    360360        if digit < 8:
    361361            return "0%c" % doc.jamb_reg_no[0]
    362362        return "9%c" % doc.jamb_reg_no[0]
    363 
    364     def get_from_doc_session(self,doc):
    365         "return the students session"
    366         if doc is None:
    367             return None
    368         return getattr(doc,'current_session',None)
    369363
    370364    def get_from_doc_course(self,doc):
  • WAeUP_SRP/trunk/Widgets.py

    r1915 r1986  
    177177
    178178class WAeUPStudyModeWidget(CPSSelectWidget): ###(
    179     """WAeUP StudyMode widget."""
     179    """WAeUP StudyMode Widget."""
    180180    meta_type = 'WAeUP StudyMode Widget'
    181181    vocabulary = 'entry_modes'
     
    246246
    247247class WAeUPSessionWidget(CPSSelectWidget): ###(
    248     """WAeUP Session widget."""
     248    """WAeUP Session Widget."""
    249249    meta_type = 'WAeUP Session Widget'
    250250
    251251    def _getSessions(self):
    252252        current_year = DateTime().year()
    253         d = {'xx': 'unknown'}
     253        d = {'-1': 'N/A'}
    254254        for y in range(current_year - 9,current_year + 1):
    255255            d['%s' % str(y)[-2:]] = '%4d/%4d' % (y,y+1)
     
    295295            vocabulary_items = sessions.items()
    296296            if self.sorted:
    297                 vocabulary_items.sort(key=operator.itemgetter(1))
     297                vocabulary_items.sort(key=operator.itemgetter(0))
    298298            for k, v in vocabulary_items:
    299299                kw = {'value': k, 'contents': v}
     
    321321
    322322    def _getLevels(self):
    323         d = {'999':'unknown'}
     323        d = {'000':'N/A'}
    324324        for y in range(100,800,100):
    325325            d['%s' % str(y)] = 'Year %1d (%3d Level)' % (y/100,y)
     
    363363            vocabulary_items = levels.items()
    364364            if self.sorted:
    365                 vocabulary_items.sort(key=operator.itemgetter(1))
     365                vocabulary_items.sort(key=operator.itemgetter(0))
    366366            for k, v in vocabulary_items:
    367367                kw = {'value': k, 'contents': v}
     
    385385
    386386class WAeUPVerdictWidget(CPSSelectWidget): ###(
    387     """WAeUP Verdict widget."""
     387    """WAeUP Verdict Widget."""
    388388    meta_type = 'WAeUP Verdict Widget'
    389389
  • WAeUP_SRP/trunk/profiles/default/layouts/import_student.xml

    r1958 r1986  
    164164  <property name="hidden_layout_modes"/>
    165165  <property name="hidden_readonly_layout_modes"/>
    166   <property name="vocabulary">sessions</property>
     166  <property name="vocabulary">unset</property>
    167167  <property name="sorted">True</property>
    168168 </widget>
     
    179179  <property name="hidden_layout_modes"/>
    180180  <property name="hidden_readonly_layout_modes"/>
    181   <property name="vocabulary">courselevel</property>
     181  <property name="vocabulary">unset</property>
    182182  <property name="sorted">True</property>
    183183 </widget>
     
    195195  <property name="hidden_readonly_layout_modes"/>
    196196  <property name="vocabulary">verdicts</property>
     197  <property name="sorted">True</property>
    197198 </widget>
    198199 <widget name="entry_session" meta_type="WAeUP Session Widget">
     
    206207  <property name="hidden_layout_modes"/>
    207208  <property name="hidden_readonly_layout_modes"/>
    208   <property name="vocabulary">sessions</property>
     209  <property name="vocabulary">unset</property>
    209210  <property name="sorted">True</property>
    210211 </widget>
  • WAeUP_SRP/trunk/profiles/default/vocabularies/courselevel.xml

    r1736 r1986  
    66 <property name="description"></property>
    77 <property name="acl_write_roles">Manager</property>
    8  <item key="unknown" msgid="">unknown</item>
     8 <item key="000" msgid="">N/A</item>
    99 <item key="100" msgid="">Year 1 (100 Level)</item>
    1010 <item key="200" msgid="">Year 2 (200 Level)</item>
  • WAeUP_SRP/trunk/profiles/default/vocabularies/entry_modes.xml

    r1736 r1986  
    66 <property name="description"></property>
    77 <property name="acl_write_roles">Manager</property>
    8  <item key="unknown" msgid="">unknown</item>
     8 <item key="unknown" msgid="">N/A</item>
    99 <item key="ume_ft" msgid="">UME Full Time</item>
    1010 <item key="de_ft" msgid="">Direct Entry Full Time</item>
  • WAeUP_SRP/trunk/profiles/default/vocabularies/verdicts.xml

    r1769 r1986  
    66 <property name="description"></property>
    77 <property name="acl_write_roles">Manager</property>
     8 <item key="N/A" msgid="">N/A</item>
    89 <item key="A" msgid="">successful student</item>
    910 <item key="B" msgid="">student with carryover courses</item>
     
    1819 <item key="K" msgid="">unregistered student</item>
    1920 <item key="L" msgid="">referred student</item>
    20  <item key="N/A" msgid="">N/A</item>
    2121</object>
  • WAeUP_SRP/trunk/skins/waeup_default/sessions_voc.py

    r1758 r1986  
    66"""
    77if key is None:
    8     l = [('xx','unknown')]
     8    # not used for WAeUPSessionWidget, only for SelectWidget
     9    l = [('-1','N/A')]
    910    for y in range(1998,2008):
    1011        l.append( ('%s' % str(y)[-2:],'%4d/%4d' % (y,y+1)))
     
    1415    y = int(key)
    1516except:
    16     return 'unknown'
     17    return 'N/A'
     18if y == -1:
     19    return 'N/A'
    1720if y < 90:
    1821    cent = 2000
  • WAeUP_SRP/trunk/skins/waeup_student/create_level.py

    r1856 r1986  
    3434current_level = student.level
    3535in_progress =  request.get('in_progress','not started')
    36 level_created =  request.get('level_created','xxx')
     36#level_created =  request.get('level_created','xxx')
    3737create_level =  request.get('create_level',None)
    3838
     
    7171    l = []
    7272    carry_overs = results
    73    
     73
    7474    # carry_overs for probation students: yes or not, that is the question
    7575    #if student.verdict == "C": # on probation
Note: See TracChangeset for help on using the changeset viewer.