Changeset 1392


Ignore:
Timestamp:
5 Feb 2007, 15:59:08 (18 years ago)
Author:
Henrik Bettermann
Message:

gemaess Telefongespräch

Location:
WAeUP_SRP/trunk/skins
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_epayment/payment_receipt.pt

    r1372 r1392  
    105105        <br />       
    106106        </metal:block>
    107 
    108 
     107       
     108        <metal:block tal:condition="python:info_doc['doc'].resp_code not in ('SC','00','')">           
     109        <h3>Response from Bank: "<span tal:content="python:info_doc['doc'].resp_desc" />"</h3>
     110        <br />       
     111        </metal:block>
    109112
    110113      </span>
  • WAeUP_SRP/trunk/skins/waeup_utilities/fixLevelFromResults.py

    r1391 r1392  
    4444res = scat()
    4545for sbrain in res:
     46
     47    old_level = str(sbrain.level)
     48 
    4649    if str(sbrain.level) == '100':
    4750        ec = "new"
     
    5861        level = "%d" % (int(level) + 100)
    5962
    60         # würde ich an dieser Stelle nicht machen (siehe unten)
    61         #context.students_catalog.modifyRecord(id = sbrain.id, level=level)
     63        context.students_catalog.modifyRecord(id = sbrain.id, level="")
    6264
    6365        while True:
     
    7072            if study_course is None:
    7173                break
    72             # zum Testen auskommentiert   
    73             #study_course.getContent().edit(mapping = {'current_level':level})
    7474
    75             #dies ist der richtige Platz
     75            study_course.getContent().edit(mapping = {'current_level':level})
    7676            context.students_catalog.modifyRecord(id = sbrain.id, level=level)
    7777
    7878            ec = "reg"
    7979            break
    80         if sbrain.level:
    81             old_level = str(sbrain.level)
    82         else:
    83             old_level = 'non'
     80
    8481#        rwrite(ec +"--"+ sbrain.id +"--"+ sbrain.matric_no +"--"+ old_level +"--"+ level +"<br />")
    8582
  • WAeUP_SRP/trunk/skins/waeup_utilities/reindex_entry_mode.py

    r1389 r1392  
    1616response = request.RESPONSE
    1717students = context.portal_url.getPortalObject().campus.students
    18 def rwrite(s):
    19     response.setHeader('Content-type','text/html; charset=ISO-8859-15')
    20     #response.setHeader('Content-length','%d' % (len(s)))
    21     #response.setStatus('OK')
    22     response.write(s)
    23    
     18
     19#def rwrite(s):
     20#    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
     21#    response.write(s)
     22
    2423cat = context.students_catalog
    25 ems = cat.uniqueValuesFor('entry_mode')
    26 rwrite("entry_mode values: %s<br />\n" % (str(ems)))
    27 for em in ems:
    28     res = cat(entry_mode = em)
    29     rwrite("entry_mode: %s = %d<br />\n" % (em,len(res)))
    30 #from Products.zdb import set_trace;set_trace()
     24
     25#ems = cat.uniqueValuesFor('entry_mode')
     26#rwrite("entry_mode values: %s<br />\n" % (str(ems)))
     27#for em in ems:
     28#    res = cat(entry_mode = em)
     29#    rwrite("entry_mode: %s = %d<br />\n" % (em,len(res)))
     30
    3131sbrains = cat()
    3232count = 0
     33lines = []
    3334
    3435for sb in sbrains:
    35     normalized = False
     36
    3637    em = context.getFromData_entry_mode(sb.id)
    3738    ec = 'x'
    3839    if em in ('UME','DE'):
    39         ec = 'cu'
     40        ec = 'cup'
    4041        #cat.modifyRecord(id = sb.id,entry_mode = em)
    41         rwrite(ec +"--"+ sb.id +"--"+ em +"<br />")
     42        lines.append('"%s","%s","","%s",""' % (ec,sb.id,sb.em))
     43        #rwrite(ec +"--"+ sb.id +"--"+ em +"<br />")
    4244    else:
    4345        ret = context.returning_import(matric_no=sb.matric_no)
     
    4749            new_em = 'DE'
    4850        elif moe in ('UME','U.M.E', 'UNE',):
    49             ec = 'um'
     51            ec = 'ume'
    5052            new_em ="UME"
    5153        else:
    52             ec = 'un'
     54            ec = 'unk'
    5355            new_em = 'unknown'
    5456            moe = 'none'
     
    5961            #cat.modifyRecord(id = sb.id,entry_mode = new_em)
    6062        #else:
    61             #cat.modifyRecord(id = sb.id,entry_mode = None)
    62            
    63         rwrite(ec +"--"+ sb.id +"--"+ em +"--"+ moe +"--"+ new_em +"<br />")
     63            #cat.modifyRecord(id = sb.id,entry_mode = "")
    6464
     65        lines.append('"%s","%s","%s","%s","%s"' % (ec,sb.id,sb.matric_no,moe,new_em))
     66        #rwrite(ec +"--"+ sb.id +"--"+ em +"--"+ moe +"--"+ new_em +"<br />")
     67
     68setheader('Content-type','text/semicolon-seperated-values')
     69setheader('Content-Disposition:', 'attachment; filename="fixLevelExport.csv"')
     70setheader('Expires',  'Mon, 26 Jul 1997 05:00:00GMT') # Date in the past
     71setheader('Cache-Control', 'no-store, no-cache,must-revalidate') # HTTP/1.1
     72setheader('Cache-Control', 'post-check=0,pre-check=0')
     73setheader('Pragma', 'no-cache') # HTTP/1.0
     74return '\n'.join(lines)
Note: See TracChangeset for help on using the changeset viewer.