Changeset 2456


Ignore:
Timestamp:
28 Oct 2007, 07:09:46 (17 years ago)
Author:
Henrik Bettermann
Message:

mark deprecated vocabulary
use '000' for pre-studies (no longer missing value)
improve fixReturningSession.py (do not replace level by '000')
fix getNextInfo.py
fix logged_in.py

Location:
WAeUP_SRP
Files:
3 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/Widgets.py

    r2454 r2456  
    329329
    330330    def _getLevels(self):
    331         d = {'000':'N/A'}
     331        d = {'':'N/A','000':'Pre-Studies'}
    332332        for y in range(100,800,100):
    333333            d['%s' % str(y)] = 'Year %1d (%3d Level)' % (y/100,y)
  • WAeUP_SRP/base/skins/cps_custom/logged_in.py

    r2447 r2456  
    203203        verdict = res[0].verdict
    204204        level = res[0].level
    205         has_level = level and not level == '000' 
    206         has_verdict = verdict and not verdict == 'N/A' 
     205        has_level = level and not level == '000'
     206        has_verdict = verdict and not verdict == 'N/A'
    207207        #set_trace()
    208208
     
    212212
    213213        #########################################################
    214        
     214
    215215        # fetch current verdict via getVerdict and level via getLevelFromResultsCosCode
    216216
    217         if s_review_state in ('returning','school_fee_paid') and not (has_verdict or has_level):
     217        if s_review_state in ('returning','school_fee_paid') and not (has_verdict and has_level):
    218218            if has_results:
    219219                study_course = getattr(student,'study_course')
     
    224224                if not has_level and s_review_state == 'returning':
    225225                    lnr = context.getLevelFromResultsCosCode(has_results)
    226                     dsc['current_level'] = "%d00" % lnr                   
     226                    dsc['current_level'] = "%d00" % lnr
    227227                if sc_review_state != 'opened':
    228228                    wftool.doActionFor(study_course,'open')
  • WAeUP_SRP/base/skins/waeup_student/getNextInfo.py

    r2454 r2456  
    2626    info['next_transition'] = "pay_school_fee"
    2727elif review_state == 'returning':
    28     info['next_level_id'] = "%s" % (int(level_id) + 100)
    29     info['next_session_id'] = next_session_id = "%02d" % (int(session_id)+1)
    30     if int(session_id) > int(context.getSessionId()[0]) -2:
    31         info['next_transition'] = "pay_school_fee"
    32         if verdict not in ('A','B',):
    33             info['next_level_id'] = level_id
     28    if level_id:
     29        info['next_level_id'] = "%s" % (int(level_id) + 100)
     30    if session_id:
     31        info['next_session_id'] = next_session_id = "%02d" % (int(session_id)+1)
     32        if int(session_id) > int(context.getSessionId()[0]) -2:
     33            info['next_transition'] = "pay_school_fee"
     34            if verdict not in ('A','B',):
     35                info['next_level_id'] = level_id
    3436
    3537info['next_session_str'] = context.sessions_voc(next_session_id)
  • WAeUP_SRP/base/skins/waeup_student/getStudyCourseInfo.py

    r2424 r2456  
    7777    row = {}
    7878    row['id'] = l
    79     #row['title'] = "Level %s" % l
    80     row['title'] = context.portal_vocabularies.levels_voc[l]
     79    row['title'] = "Level %s" % l
     80    #row['title'] = context.portal_vocabularies.levels_voc[l]
    8181    row['url'] = "%s/%s" % (context.absolute_url(),l)
    8282    items.append(row)
  • WAeUP_SRP/base/skins/waeup_utilities/fixReturningSession.py

    r2454 r2456  
    2727students = context.portal_url.getPortalObject().campus.students
    2828#from string import Template
    29 def rwrite(s):
    30     response.setHeader('Content-type','text/html; charset=ISO-8859-15')
    31     response.write("%s<br>\n\r" % s)
     29#def rwrite(s):
     30#    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
     31#    response.write("%s<br>\n\r" % s)
    3232
    3333#logger.info('')
     
    3636brains = aq_students(query)
    3737total = len(brains)
    38 logger.info('editet %d students with session 06 and state returning' % total)
     38logger.info('started editing %d students with session 06 in state returning' % total)
    3939count = 0
    4040commit_after = 100
     
    4848        study_course_doc = getattr(getattr(students,brain.id),'study_course').getContent()
    4949        study_course_doc.edit(mapping = { "current_session": '05',
    50                                           "current_level": '000'})
    51         rwrite('found %s , %s ,%s, %s' % (brain.id,
     50                                          "current_level": ''})
     51        #rwrite('found %s , %s ,%s, %s' % (brain.id,
     52        #                                  study_course_doc.current_session,
     53        #                                  brain.matric_no,
     54        #                                  brain.name))
     55        logger.info("Session and level of %s (%s, %s, %s) changed from ('%s', '%s') to ('%s', '%s')" % (brain.id,
     56                                          brain.matric_no,
     57                                          brain.name,
     58                                          brain.review_state,
     59                                          brain.session,
     60                                          brain.level,
    5261                                          study_course_doc.current_session,
    53                                           brain.matric_no,
    54                                           brain.name))
     62                                          study_course_doc.current_level,
     63                                          ))
    5564    except:
    56         rwrite('>>>> not found %s study_course' % (brain.id))
     65        #rwrite('>>>> not found %s study_course' % (brain.id))
     66        pass
     67logger.info('finished editing %d students with session 06 in state returning' % total)
    5768
     69return
  • WAeUP_SRP/fceokene/profiles/default/students_catalog.xml

    r2069 r2456  
    5858  <indexed_attr value="course"/>
    5959 </index>
    60  <index name="registered_courses" meta_type="KeywordIndex">
    61   <indexed_attr value="registered_courses"/>
    62  </index>
     60
    6361 <column value="id"/>
    6462 <column value="review_state"/>
     
    7068 <column value="department"/>
    7169 <column value="course"/>
    72  <column value="registered_courses"/>
    7370 <column value="lga"/>
    7471 <column value="perm_address"/>
  • WAeUP_SRP/fceokene/profiles/default/vocabularies.xml

    r2374 r2456  
    1616 <object name="get_departments_voc" meta_type="CPS Method Vocabulary"/>
    1717 <object name="get_faculties_voc" meta_type="CPS Method Vocabulary"/>
    18  <object name="levels_voc" meta_type="CPS Method Vocabulary"/>
    1918 <object name="groups_voc" meta_type="CPS Method Vocabulary"/>
    2019 <object name="waeup_bed_letters" meta_type="CPS Vocabulary"/>
  • WAeUP_SRP/fceokene/profiles/default/vocabularies/levels.xml

    r1989 r2456  
    66 <property name="description"></property>
    77 <property name="acl_write_roles">Manager</property>
    8  <item key="000" msgid="">N/A</item>
     8 <item key="" msgid="">N/A</item>
     9 <item key="000" msgid="">Pre-Studies</item>
    910 <item key="100" msgid="">Year 1 (100 Level)</item>
    1011 <item key="200" msgid="">Year 2 (200 Level)</item>
Note: See TracChangeset for help on using the changeset viewer.