Changeset 2485


Ignore:
Timestamp:
30 Oct 2007, 23:56:17 (17 years ago)
Author:
Henrik Bettermann
Message:

getSessionResults.py: fetch verdict from results
aos.xml: ticket #371
logged_in.py: fixed

Location:
WAeUP_SRP
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/cps_custom/logged_in.py

    r2483 r2485  
    212212        #########################################################
    213213
    214         has_results = context.results_import(matric_no = matric_no)
     214        if matric_no:
     215            has_results = context.results_import(matric_no = matric_no)
     216        else:
     217            has_results = ''
    215218
    216219        #########################################################
  • WAeUP_SRP/base/skins/waeup_student/getSessionResults.py

    r2466 r2485  
    6868session = None
    6969level = None
     70verdict = None
    7071
    7172for r in results:
     
    7374        session = r.Session
    7475    if level is None:
    75         level = r.Level       
     76        level = r.Level
     77    if verdict is None:
     78        verdict = r.Verdict       
    7679    result = {}
    7780    for field in fields:
     
    106109
    107110#set_trace()
    108 verdict_voc = context.portal_vocabularies.verdicts
    109 verdict_code = student_from_cat.verdict
    110 if verdict_code:
    111     info['verdict'] = verdict = verdict_voc.get(verdict_code,'N/A').upper()
    112 else:
    113     info['verdict'] = verdict = 'N/A'
     111#verdict_voc = context.portal_vocabularies.verdicts
     112#verdict_code = student_from_cat.verdict
     113#if verdict_code:
     114#    info['verdict'] = verdict = verdict_voc.get(verdict_code,'N/A').upper()
     115#else:
     116#    info['verdict'] = verdict = 'N/A'
    114117
     118if verdict:
     119    info['verdict'] = verdict
    115120if session:
    116121    info['session'] = session
  • WAeUP_SRP/base/skins/waeup_utilities/fix06Verdict.py

    r2478 r2485  
    4747    try:
    4848        study_course_doc = getattr(getattr(students,brain.id),'study_course').getContent()
    49         verdict = study_course_doc.current_verdict
     49       
     50        # final fix
     51        if brain.matric_no:
     52            verdict = study_course_doc.current_verdict
     53        else:
     54            verdict = ''
    5055        study_course_doc.edit(mapping = { "current_verdict": '',
    5156                                          "previous_verdict": verdict})
    52         #rwrite('found %s , %s ,%s, %s' % (brain.id,
    53         #                                  study_course_doc.current_session,
    54         #                                  brain.matric_no,
    55         #                                  brain.name))
     57
     58        # Info: The logging message is wrong if not matric_no
    5659        logger.info("Current verdict of %s (%s, %s, %s, %s) moved to previous verdict" % (brain.id,
    5760                                          brain.matric_no,
  • WAeUP_SRP/fceokene/profiles/default/vocabularies/aos.xml

    r2446 r2485  
    8181    <item key="as72" msgid="">MARKETING</item>
    8282    <item key="as73" msgid="">EDUCATION ECONOMICS/SOCIAL STUDIES</item>
     83    <item key="as74" msgid="">PHYSIOLOGY</item>
     84    <item key="as75" msgid="">AGRICULTURE</item>
    8385
    8486
Note: See TracChangeset for help on using the changeset viewer.