Index: /WAeUP_SRP/trunk/skins/waeup_epayment/payment_receipt.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_epayment/payment_receipt.pt	(revision 1391)
+++ /WAeUP_SRP/trunk/skins/waeup_epayment/payment_receipt.pt	(revision 1392)
@@ -105,6 +105,9 @@
         <br />        
         </metal:block>
-
-
+        
+        <metal:block tal:condition="python:info_doc['doc'].resp_code not in ('SC','00','')">            
+        <h3>Response from Bank: "<span tal:content="python:info_doc['doc'].resp_desc" />"</h3>
+        <br />        
+        </metal:block>
 
       </span>
Index: /WAeUP_SRP/trunk/skins/waeup_utilities/fixLevelFromResults.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_utilities/fixLevelFromResults.py	(revision 1391)
+++ /WAeUP_SRP/trunk/skins/waeup_utilities/fixLevelFromResults.py	(revision 1392)
@@ -44,4 +44,7 @@
 res = scat()
 for sbrain in res:
+
+    old_level = str(sbrain.level)
+ 
     if str(sbrain.level) == '100':
         ec = "new"
@@ -58,6 +61,5 @@
         level = "%d" % (int(level) + 100)
 
-        # würde ich an dieser Stelle nicht machen (siehe unten)
-        #context.students_catalog.modifyRecord(id = sbrain.id, level=level)
+        context.students_catalog.modifyRecord(id = sbrain.id, level="")
 
         while True:
@@ -70,16 +72,11 @@
             if study_course is None:
                 break
-            # zum Testen auskommentiert    
-            #study_course.getContent().edit(mapping = {'current_level':level})
 
-            #dies ist der richtige Platz
+            study_course.getContent().edit(mapping = {'current_level':level})
             context.students_catalog.modifyRecord(id = sbrain.id, level=level)
 
             ec = "reg"
             break
-        if sbrain.level:
-            old_level = str(sbrain.level)
-        else:
-            old_level = 'non'
+
 #        rwrite(ec +"--"+ sbrain.id +"--"+ sbrain.matric_no +"--"+ old_level +"--"+ level +"<br />")
 
Index: /WAeUP_SRP/trunk/skins/waeup_utilities/reindex_entry_mode.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_utilities/reindex_entry_mode.py	(revision 1391)
+++ /WAeUP_SRP/trunk/skins/waeup_utilities/reindex_entry_mode.py	(revision 1392)
@@ -16,28 +16,30 @@
 response = request.RESPONSE
 students = context.portal_url.getPortalObject().campus.students
-def rwrite(s):
-    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
-    #response.setHeader('Content-length','%d' % (len(s)))
-    #response.setStatus('OK')
-    response.write(s)
-    
+
+#def rwrite(s):
+#    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
+#    response.write(s)
+
 cat = context.students_catalog
-ems = cat.uniqueValuesFor('entry_mode')
-rwrite("entry_mode values: %s<br />\n" % (str(ems)))
-for em in ems:
-    res = cat(entry_mode = em)
-    rwrite("entry_mode: %s = %d<br />\n" % (em,len(res)))
-#from Products.zdb import set_trace;set_trace()
+
+#ems = cat.uniqueValuesFor('entry_mode')
+#rwrite("entry_mode values: %s<br />\n" % (str(ems)))
+#for em in ems:
+#    res = cat(entry_mode = em)
+#    rwrite("entry_mode: %s = %d<br />\n" % (em,len(res)))
+
 sbrains = cat()
 count = 0
+lines = []
 
 for sb in sbrains:
-    normalized = False
+
     em = context.getFromData_entry_mode(sb.id)
     ec = 'x'
     if em in ('UME','DE'):
-        ec = 'cu'
+        ec = 'cup'
         #cat.modifyRecord(id = sb.id,entry_mode = em)
-        rwrite(ec +"--"+ sb.id +"--"+ em +"<br />")
+        lines.append('"%s","%s","","%s",""' % (ec,sb.id,sb.em))
+        #rwrite(ec +"--"+ sb.id +"--"+ em +"<br />")
     else:
         ret = context.returning_import(matric_no=sb.matric_no)
@@ -47,8 +49,8 @@
             new_em = 'DE'
         elif moe in ('UME','U.M.E', 'UNE',):
-            ec = 'um'
+            ec = 'ume'
             new_em ="UME"
         else:
-            ec = 'un'
+            ec = 'unk'
             new_em = 'unknown'
             moe = 'none'
@@ -59,6 +61,14 @@
             #cat.modifyRecord(id = sb.id,entry_mode = new_em)
         #else:
-            #cat.modifyRecord(id = sb.id,entry_mode = None)
-            
-        rwrite(ec +"--"+ sb.id +"--"+ em +"--"+ moe +"--"+ new_em +"<br />")
+            #cat.modifyRecord(id = sb.id,entry_mode = "")
 
+        lines.append('"%s","%s","%s","%s","%s"' % (ec,sb.id,sb.matric_no,moe,new_em))
+        #rwrite(ec +"--"+ sb.id +"--"+ em +"--"+ moe +"--"+ new_em +"<br />")
+
+setheader('Content-type','text/semicolon-seperated-values')
+setheader('Content-Disposition:', 'attachment; filename="fixLevelExport.csv"')
+setheader('Expires',  'Mon, 26 Jul 1997 05:00:00GMT') # Date in the past
+setheader('Cache-Control', 'no-store, no-cache,must-revalidate') # HTTP/1.1
+setheader('Cache-Control', 'post-check=0,pre-check=0')
+setheader('Pragma', 'no-cache') # HTTP/1.0
+return '\n'.join(lines)
