## Script (Python) "reindex_entry_mode" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters= ##title= ## # $Id: reindex_entry_mode.py 1328 2007-01-19 18:16:32Z joachim $ """ reindex students_catalog entry_mode index """ cat = context.students_catalog sbrains = cat() for sb in sbrains: normalized = False em= context.getFromData_entry_mode(sb.id) if em: normalized = True elif sb.entry_mode in ('DIRECT', 'DIRECT ENTRY',): em = 'DE' normalized = True elif sb.entry_mode in ('U.M.E', 'UNE',): em ="UME" normalized = True if normalized: cat.modifyRecord(id = sb.id, entry_mode = em)