Ignore:
Timestamp:
26 Apr 2007, 05:04:59 (18 years ago)
Author:
Henrik Bettermann
Message:

this fix takes 10 hours, thus we have to run it several times and check if records have already been changed

File:
1 edited

Legend:

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

    r1707 r1713  
    3636logger.info('setNewEntryMode start')
    3737for brain in brains:
     38    if not brain.entry_mode in ('UME','DE'):
     39        continue
    3840    stud_obj = brain.getObject()
    39     try:     
     41    try:
    4042        app_doc = stud_obj.application.getContent()
    4143    except:
    4244        continue
    43     try: 
     45    try:
    4446        sc_doc = stud_obj.study_course.getContent()
    4547    except:
     
    5961    if sc_doc:
    6062        sc_doc.edit(mapping={'current_mode': new_em})
    61         context.students_catalog.modifyRecord(id = sid, 
     63        context.students_catalog.modifyRecord(id = sid,
    6264                                              mode=new_em,
    6365                                              entry_mode=new_em,
    6466                                              entry_level=el)
    6567    else:
    66         context.students_catalog.modifyRecord(id = sid, 
     68        context.students_catalog.modifyRecord(id = sid,
    6769                                              entry_mode=new_em,
    6870                                              entry_level=el)
    69        
     71
    7072    count += 1
    7173    commit_count += 1
Note: See TracChangeset for help on using the changeset viewer.