Changeset 1681 for WAeUP_SRP/trunk/skins


Ignore:
Timestamp:
11 Apr 2007, 14:37:44 (18 years ago)
Author:
joachim
Message:

add review_state

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_utilities/ti_188_resolve.py

    r1680 r1681  
    4343count = 0
    4444ok_count = 0
     45reg_count = 0
    4546nyl_count = 0
    4647wrong_count = 0
     
    6970        code = 'xxx'
    7071        comment = ""
     72        dict['review_state'] = ''
     73        sres = context.portal_catalog(id = sbrain.id)
     74        if sres:
     75            dict['review_state'] = sres[0].review_state
    7176        if sbrain.level == '':
    7277            code = 'nyl'
     
    7883            study_course = getObject(student,'study_course')
    7984            level = getObject(study_course,sbrain.level)
    80             if level is not None:
    81                 code = 'nok_cr'
     85            if level is not None:
    8286                cr_count += 1
    83                 comment = "%(level)s deleted" % dict
    84                 ##study_course.manage_delObjects((sbrain.level,))
     87                if dict['review_state'] == "school_fee_paid":
     88                    code = 'nok_cr'
     89                    comment = "%(level)s deleted" % dict
     90                    ##study_course.manage_delObjects((sbrain.level,))
     91                elif dict['review_state'] != "school_fee_paid":
     92                    reg_count += 1
    8593            comment = comment + " level in students_catalog modified to %s" % lc
    8694            ##context.students_catalog.modifyRecord(id = sbrain.id,level=lc,)
     
    9199        dict['ok_count'] = ok_count
    92100        dict['cr_count'] = cr_count
     101        dict['reg_count'] = reg_count
    93102        dict['wrong_count'] = wrong_count
    94103        dict['code'] = code
    95104        dict['comment'] = comment
    96         rwrite('"%(count)d:%(ok_count)d:%(nyl_count)d:%(wrong_count)d:%(cr_count)d","%(code)s","%(id)s","%(name)s","%(level)s","%(level_res)s","%(comment)s"' % dict)
     105        rwrite('"%(count)d:%(ok_count)d:%(nyl_count)d:%(wrong_count)d:%(cr_count)d:%(reg_count)d","%(code)s","%(id)s","%(name)s","%(level)s","%(level_res)s","%(review_state)s","%(comment)s"' % dict)
    97106
    98 rwrite("total: %(count)d<br> correct: %(ok_count)d<br> level == '': %(nyl_count)d<br> wrong: %(wrong_count)d<br> level created: %(cr_count)d" % dict )
     107rwrite("total: %(count)d<br> correct: %(ok_count)d<br> level == '': %(nyl_count)d<br> wrong: %(wrong_count)d<br> level created: %(cr_count)d<br> courses registered: %(reg_count)d" % dict )
Note: See TracChangeset for help on using the changeset viewer.