Changeset 5022 for WAeUP_SRP


Ignore:
Timestamp:
17 Feb 2010, 07:16:53 (15 years ago)
Author:
Henrik Bettermann
Message:

do no longer fetch verdict from 05 course results

File:
1 edited

Legend:

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

    r3998 r5022  
    224224        has_level = level
    225225        has_verdict = verdict and not verdict == 'N/A'
    226         #set_trace()
    227 
    228         #########################################################
    229 
    230         if matric_no:
    231             has_results = context.results_import(matric_no = matric_no)
    232         else:
    233             has_results = ''
     226
     227        #########################################################
     228
     229        #if matric_no:
     230        #    has_results = context.results_import(matric_no = matric_no)
     231        #else:
     232        #    has_results = ''
    234233
    235234        #########################################################
     
    237236        # fetch current verdict via getVerdict and level via getLevelFromResultsCosCode
    238237
    239         if s_review_state in ('returning','school_fee_paid') and not (has_verdict and has_level):
    240             if has_results:
    241                 study_course = getattr(student,'study_course')
    242                 sc_review_state = wftool.getInfoFor(study_course,'review_state',None)
    243                 dsc = {}
    244                 if not has_verdict and s_review_state == 'returning':
    245                     dsc['current_verdict'] = context.getVerdict(has_results[0].Verdict)[0]
    246                 if not has_level and s_review_state == 'returning':
    247                     lnr = context.getLevelFromResultsCosCode(has_results)
    248                     dsc['current_level'] = "%d00" % lnr
    249                 elif not has_level and s_review_state == 'school_fee_paid':
    250                     lnr = context.getLevelFromResultsCosCode(has_results)
    251                     cv = context.getVerdict(has_results[0].Verdict)[0]
    252                     if cv in ('A','B',):
    253                         lnr += 1
    254                     dsc['current_level'] = "%d00" % lnr
    255                     dsc['previous_verdict'] = cv
    256                 if sc_review_state != 'opened':
    257                     wftool.doActionFor(study_course,'open')
    258                 study_course_doc =study_course.getContent()
    259                 study_course_doc.edit(mapping = dsc)
    260                 wftool.doActionFor(study_course,'close_for_edit')
     238        #if s_review_state in ('returning','school_fee_paid') and not (has_verdict and has_level):
     239        #    if has_results:
     240        #        study_course = getattr(student,'study_course')
     241        #        sc_review_state = wftool.getInfoFor(study_course,'review_state',None)
     242        #        dsc = {}
     243        #        if not has_verdict and s_review_state == 'returning':
     244        #            dsc['current_verdict'] = context.getVerdict(has_results[0].Verdict)[0]
     245        #        if not has_level and s_review_state == 'returning':
     246        #            lnr = context.getLevelFromResultsCosCode(has_results)
     247        #            dsc['current_level'] = "%d00" % lnr
     248        #        elif not has_level and s_review_state == 'school_fee_paid':
     249        #            lnr = context.getLevelFromResultsCosCode(has_results)
     250        #            cv = context.getVerdict(has_results[0].Verdict)[0]
     251        #            if cv in ('A','B',):
     252        #                lnr += 1
     253        #            dsc['current_level'] = "%d00" % lnr
     254        #            dsc['previous_verdict'] = cv
     255        #        if sc_review_state != 'opened':
     256        #            wftool.doActionFor(study_course,'open')
     257        #        study_course_doc =study_course.getContent()
     258        #        study_course_doc.edit(mapping = dsc)
     259        #        wftool.doActionFor(study_course,'close_for_edit')
    261260
    262261        #########################################################
Note: See TracChangeset for help on using the changeset viewer.