Changeset 1389 for WAeUP_SRP/trunk/skins


Ignore:
Timestamp:
4 Feb 2007, 12:44:50 (18 years ago)
Author:
Henrik Bettermann
Message:

neue sorgfältig getestete Version
(macht noch keine Änderungen)

Location:
WAeUP_SRP/trunk/skins/waeup_utilities
Files:
2 edited

Legend:

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

    r1380 r1389  
    1818app = getattr(student,'application',None)
    1919if app is None:
    20     return None
     20    return "nyr"
    2121#from Products.zdb import set_trace;set_trace()
    2222em = app.getContent().entry_mode
    2323if em:
    2424    return em
    25 return "None"
     25return "none"
     26
  • WAeUP_SRP/trunk/skins/waeup_utilities/reindex_entry_mode.py

    r1380 r1389  
    3131sbrains = cat()
    3232count = 0
    33 lc = 1
    34 rwrite("%3d " % lc)
     33
    3534for sb in sbrains:
    3635    normalized = False
    3736    em = context.getFromData_entry_mode(sb.id)
    3837    ec = 'x'
    39     if em is None:
    40         ec = 'n'
    41         em = 'None'
    4238    if em in ('UME','DE'):
    43         ec = 'C'
    44         normalized = True
    45     elif sb.entry_mode in ('DIRECT', 'DIRECT ENTRY',):
    46         ec = 'D'
    47         em = 'DE'
    48         normalized = True
    49     elif sb.entry_mode in ('U.M.E', 'UNE',):
    50         ec = 'U'
    51         em ="UME"
    52         normalized = True
    53     elif not sb.entry_mode:
    54         ec = 'u'
    55         em ="UME"
    56         normalized = True
    57     if ec != "C" and em != sb.entry_mode:
    58         #from Products.zdb import set_trace;set_trace()
    59         app = getattr(getattr(students,sb.id),'application',None)
    60         ec = 'a'
    61         if app is not None:
    62             ec = 'A'
    63             app.getContent().edit(mapping={'entry_mode': sb.entry_mode})
    64     if normalized:
    65         cat.modifyRecord(id = sb.id,
    66                          entry_mode = em)
    67     rwrite(ec)
    68     count += 1
    69     if count > 60:
    70         lc += 1
    71         rwrite("<br />\n%3d " % lc)
    72         count = 0
     39        ec = 'cu'
     40        #cat.modifyRecord(id = sb.id,entry_mode = em)
     41        rwrite(ec +"--"+ sb.id +"--"+ em +"<br />")
     42    else:
     43        ret = context.returning_import(matric_no=sb.matric_no)
     44        moe = ret[0].Mode_of_Entry
     45        if moe in ('DE','DIRECT', 'DIRECT ENTRY',):
     46            ec = 'de'
     47            new_em = 'DE'
     48        elif moe in ('UME','U.M.E', 'UNE',):
     49            ec = 'um'
     50            new_em ="UME"
     51        else:
     52            ec = 'un'
     53            new_em = 'unknown'
     54            moe = 'none'
    7355
     56        #app = getattr(getattr(students,sb.id),'application',None)
     57        #if app is not None:
     58            #app.getContent().edit(mapping={'entry_mode': new_em})
     59            #cat.modifyRecord(id = sb.id,entry_mode = new_em)
     60        #else:
     61            #cat.modifyRecord(id = sb.id,entry_mode = None)
     62           
     63        rwrite(ec +"--"+ sb.id +"--"+ em +"--"+ moe +"--"+ new_em +"<br />")
     64
Note: See TracChangeset for help on using the changeset viewer.