source: WAeUP_SRP/trunk/skins/waeup_utilities/reindex_entry_mode.py @ 1378

Last change on this file since 1378 was 1363, checked in by joachim, 18 years ago

better reindex fixes wrong spellings can be run tonight

File size: 762 bytes
Line 
1## Script (Python) "reindex_entry_mode"
2##bind container=container
3##bind context=context
4##bind namespace=
5##bind script=script
6##bind subpath=traverse_subpath
7##parameters=
8##title=
9##
10# $Id: reindex_entry_mode.py 1328 2007-01-19 18:16:32Z joachim $
11"""
12reindex students_catalog entry_mode index
13"""
14cat = context.students_catalog
15
16sbrains = cat()
17for sb in sbrains:
18    normalized = False
19    em= context.getFromData_entry_mode(sb.id)
20    if em:
21        normalized = True
22    elif sb.entry_mode in ('DIRECT', 'DIRECT ENTRY',):
23        em = 'DE'
24        normalized = True
25    elif sb.entry_mode in ('U.M.E', 'UNE',):
26        em ="UME"
27        normalized = True
28    if normalized:
29        cat.modifyRecord(id = sb.id,
30                         entry_mode = em)
31
Note: See TracBrowser for help on using the repository browser.