Index: WAeUP_SRP/base/skins/waeup_student/getStudentFolderInfo.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_student/getStudentFolderInfo.py	(revision 2960)
+++ WAeUP_SRP/base/skins/waeup_student/getStudentFolderInfo.py	(revision 2961)
@@ -58,8 +58,5 @@
 student_path = "%s/campus/students/%s" % (context.portal_url(),student_id)
 students_folder = context.portal_url.getPortalObject().campus.students
-# res = context.students_catalog(id = student_id)
-# if not res:
-#     return None
-# student_record = res[0]
+
 student_record = context.students_catalog.getRecordByKey(student_id)
 if student_record is None:
@@ -69,8 +66,4 @@
 for field in context.students_catalog.schema():
     info[field] = getattr(student_record,field)
-
-#res = context.portal_catalog(portal_type='Student',id = student_id)
-#if res:
-#    info['review_state'] = res[0].review_state
 
 #info['review_state'] = context.getStudentReviewState()
@@ -98,34 +91,8 @@
               'PaymentsFolder': 'payments_view',
               }
-#logger.info("before search")
-#starttime = DateTime.DateTime().timeTime()
-#sos = context.portal_catalog(container_path=student_path_root)
-# query = Eq('container_path',student_path_root)
-# sos = aq_portal(query)
-# logger.info("searchtime %f" % (DateTime.DateTime().timeTime() - starttime))
-# starttime = DateTime.DateTime().timeTime()
-# for so in sos:
-#     row = {}
-#     row['id'] = so.getId
-#     row['title'] = so.Title
-#     url = row['url'] = "%s/%s" % (student_path,so.getId)
-#     row['type'] = so.portal_type
-#     review_state = row['review_state'] = so.review_state
-#     row['is_editable'] = (is_student and review_state == "opened") or is_sectionofficer
-#     sv_link = s_view_links.get(so.portal_type,None) or "waeup_document_view"
-#     row['s_view_link'] = "%s/%s" % (url,sv_link)
-#     se_link = s_edit_links.get(so.portal_type,None)
-#     row['s_edit_link'] = None
-#     if se_link:
-#         row['s_edit_link'] = "%s/%s" % (url,se_link)
-#     row['display'] = review_state in ('opened','closed','bed_reserved','maintenance_fee_paid',)\
-#                     and so.portal_type not in  ('StudentPume','StudentAccommodation','PaymentsFolder',) or\
-#                     so.portal_type == 'StudentStudyCourse'
-#     items.append(row)
-#sos = context.portal_catalog(container_path=student_path_root)
+
 student_obj = getattr(students_folder,student_id)
 subobjects = student_obj.objectValues()
-#logger.info("searchtime %f" % (DateTime.DateTime().timeTime() - starttime))
-#starttime = DateTime.DateTime().timeTime()
+
 for subobject in subobjects:
     row = {}
@@ -146,9 +113,16 @@
                     subobject.portal_type == 'StudentStudyCourse'
     items.append(row)
-#logger.info("listtime %f" % (DateTime.DateTime().timeTime() - starttime))
-#set_trace()
+
 items.sort(cmp=lambda x,y: cmp( x['title'],y['title']))
 info['items'] = items
 info['member'] = member
+
+try:
+    current_level = int(info['level'])
+except:
+    current_level = 0
+info['transition_return_allowed'] = info['review_state'] == 'school_fee_paid' and current_level > 100 and is_sectionofficer
+info['transition_pay_school_fee_allowed'] = info['review_state'] == 'returning' and is_sectionofficer
+
 return info
 
Index: WAeUP_SRP/base/skins/waeup_student/student_view.pt
===================================================================
--- WAeUP_SRP/base/skins/waeup_student/student_view.pt	(revision 2960)
+++ WAeUP_SRP/base/skins/waeup_student/student_view.pt	(revision 2961)
@@ -2,5 +2,5 @@
   <metal:main fill-slot="main" 
               tal:define="info context/getStudentFolderInfo;
-              baseinfo info/base_info|nothing"
+                          baseinfo info/base_info|nothing"
               >
     <metal:block tal:condition="not: info">
@@ -104,4 +104,31 @@
           <input type="submit" class="context" value="Send Email with Authentication Data" />
         </form>
+        
+        
+        
+        
+        <form action="" method="post" class="group"
+              tal:condition="info/transition_return_allowed"
+              tal:attributes="action string:${context/absolute_url}/changeRegState">
+          <input type="submit" class="context" value="Execute Transition 'return'" />
+          <input type="hidden" name="transition"
+                 tal:attributes="value string:return"
+                 /> &nbsp; <br /><br />     
+          <font color='red'>Attention: This low-level method does not change the study course and/or payment objects! They must be edited separately.</font>
+        </form>        
+        
+        <form action="" method="post" class="group"
+              tal:condition="info/transition_pay_school_fee_allowed"
+              tal:attributes="action string:${context/absolute_url}/changeRegState">
+          <input type="submit" class="context" value="Execute Transition 'pay_school_fee'" />
+          <input type="hidden" name="transition"
+                 tal:attributes="value string:pay_school_fee"
+                 /> &nbsp; <br /><br />
+          <font color='red'>Attention: This low-level method does not change the study course and/or payment objects! They must be edited separately.</font>
+        </form>             
+    
+    
+        
+        
         <div tal:condition="python:info['review_state']=='deactivated'">
           <font color="red">This student record has been deactivated!</font>
Index: WAeUP_SRP/base/skins/waeup_utilities/changeRegState.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_utilities/changeRegState.py	(revision 2960)
+++ WAeUP_SRP/base/skins/waeup_utilities/changeRegState.py	(revision 2961)
@@ -15,6 +15,10 @@
 mtool = context.portal_membership
 member = mtool.getAuthenticatedMember()
-if str(member) not in ('admin','joachim') or transition is None:
-    return
+
+#if str(member) not in ('admin','joachim') or transition is None:
+#    return 'Forbidden!'
+    
+if not context.isSectionOfficer() or transition is None:
+    return 'Forbidden!'    
 
 import logging
@@ -34,7 +38,8 @@
 try:
     wftool.doActionFor(student,transition)
-    logger.info('%s executes transition %s for %s' % (member,transition,student_id))
+    logger.info('%s executed transition %s for %s' % (member,transition,student_id))
 except:
     logger.info('%s tried to execute transition %s for %s, transition not allowed' % (member,transition,student_id))
+    return 'Transition not allowed!'
 
 return request.RESPONSE.redirect("%s" % context.absolute_url())
Index: WAeUP_SRP/uniben/profiles/default/workflows/waeup_student_wf/definition.xml
===================================================================
--- WAeUP_SRP/uniben/profiles/default/workflows/waeup_student_wf/definition.xml	(revision 2960)
+++ WAeUP_SRP/uniben/profiles/default/workflows/waeup_student_wf/definition.xml	(revision 2961)
@@ -182,4 +182,5 @@
   <exit-transition transition_id="register_courses"/>
   <exit-transition transition_id="deactivate"/>
+  <exit-transition transition_id="return"/>
   <permission-map name="Delete objects" acquired="False">
    <permission-role>Manager</permission-role>
