Index: WAeUP_SRP/base/Accommodation.py
===================================================================
--- WAeUP_SRP/base/Accommodation.py	(revision 2453)
+++ WAeUP_SRP/base/Accommodation.py	(revision 2454)
@@ -196,5 +196,5 @@
                 accommodation.modifyRecord(bed=already[0].bed,student='')
                 student_obj = getattr(students_folder, student.id)
-                acco_id = "accommodation_%s" % self.getSessionId()
+                acco_id = "accommodation_%s" % self.getSessionId()[0]
                 if acco_id in student_obj.objectIds():
                     acco_doc = getattr(student_obj, acco_id).getContent()
Index: WAeUP_SRP/base/Students.py
===================================================================
--- WAeUP_SRP/base/Students.py	(revision 2453)
+++ WAeUP_SRP/base/Students.py	(revision 2454)
@@ -353,5 +353,5 @@
             da["jamb_middlename"] = middlename
             da["jamb_lastname"] = lastname
-            catalog_entry['entry_session'] = da["entry_session"] = self.getSessionId()[-2:]
+            catalog_entry['entry_session'] = da["entry_session"] = self.getSessionId()[0]
             catalog_entry['sex'] = sex = result.get(csv_d['jamb_sex']).startswith('F')
             da_fields = ('jamb_reg_no',
Index: WAeUP_SRP/base/WAeUPTables.py
===================================================================
--- WAeUP_SRP/base/WAeUPTables.py	(revision 2453)
+++ WAeUP_SRP/base/WAeUPTables.py	(revision 2454)
@@ -985,22 +985,22 @@
                                              import_record.Lastname)
                 data['jamb_reg_no'] = import_record.Entryregno
-            if reindex_special and 'registered_courses' in reindex_special:
-                try:
-                    study_course = getattr(student_object,"study_course")
-                    level_ids = study_course.objectIds()
-                except:
-                    continue
-                if not level_ids:
-                    continue
-                modified = True
-                level_ids.sort()
-                course_ids = getattr(study_course,level_ids[-1]).objectIds()
-                courses = []
-                for c in course_ids:
-                    if c.endswith('_co'):
-                        courses.append(c[:-3])
-                    else:
-                        courses.append(c)
-                data['registered_courses'] = courses
+            #if reindex_special and 'registered_courses' in reindex_special:
+            #    try:
+            #        study_course = getattr(student_object,"study_course")
+            #        level_ids = study_course.objectIds()
+            #    except:
+            #        continue
+            #    if not level_ids:
+            #        continue
+            #    modified = True
+            #    level_ids.sort()
+            #    course_ids = getattr(study_course,level_ids[-1]).objectIds()
+            #    courses = []
+            #    for c in course_ids:
+            #        if c.endswith('_co'):
+            #            courses.append(c[:-3])
+            #        else:
+            #            courses.append(c)
+            #    data['registered_courses'] = courses
             if modified:
                 self.modifyRecord(**data)
@@ -1052,17 +1052,17 @@
                                              import_record.Lastname)
                 data['jamb_reg_no'] = import_record.Entryregno
-            else:
-                study_course = getattr(student_object,'study_course',None)
-                current_level = data.get('level',None)
-                data['registered_courses'] = []
-                if study_course and current_level and current_level in study_course.objectIds():
-                    level_obj = getattr(study_course,current_level)
-                    courses = []
-                    for c in level_obj.objectIds():
-                        if c.endswith('_co'):
-                            courses.append(c[:-3])
-                        else:
-                            courses.append(c)
-                    data['registered_courses'] = courses
+            #else:
+            #    study_course = getattr(student_object,'study_course',None)
+            #    current_level = data.get('level',None)
+            #    data['registered_courses'] = []
+            #    if study_course and current_level and current_level in study_course.objectIds():
+            #        level_obj = getattr(study_course,current_level)
+            #        courses = []
+            #        for c in level_obj.objectIds():
+            #            if c.endswith('_co'):
+            #                courses.append(c[:-3])
+            #            else:
+            #                courses.append(c)
+            #        data['registered_courses'] = courses
             self.addRecord(**data)
         if pghandler: pghandler.finish()
@@ -1097,37 +1097,37 @@
                 self.deleteRecord(student_id)
                 #import pdb;pdb.set_trace()
-        elif pt == 'StudentCourseResult' and mt == 'CPS Proxy Folder':
-            if event_type not in ("sys_add_object","sys_del_object"):
-                return
-            level_session = getattr(object.aq_parent.getContent(),'session','unknown')
-            if level_session not in (self.getSessionId()[-2:],'2006/2007'):
-                return
-            course_id = object.getId()
-            if course_id.endswith('_co'):
-                course_id = course_id[:-3]
-            student_id = object.absolute_url_path().split('/')[-4]
-            res = students_catalog(id = student_id)
-            if not res:
-                return
-            student_rec = res[0]
-            registered_courses = getattr(student_rec,'registered_courses',None)
-            if not registered_courses:
-                registered_courses = []
-            if event_type == "sys_add_object":
-                if course_id not in registered_courses:
-                    registered_courses.append(course_id)
-                else:
-                    return
-            elif registered_courses and event_type == "sys_del_object":
-                removed = False
-                while course_id in registered_courses:
-                    removed = True
-                    registered_courses.remove(course_id)
-                if not removed:
-                    return
-            data['id'] = student_id
-            data['registered_courses'] = registered_courses
-            self.modifyRecord(record = student_rec, **data)
-            return
+        #elif pt == 'StudentCourseResult' and mt == 'CPS Proxy Folder':
+        #    if event_type not in ("sys_add_object","sys_del_object"):
+        #        return
+        #    level_session = getattr(object.aq_parent.getContent(),'session','unknown')
+        #    if level_session not in (self.getSessionId()[-2:],'2006/2007'):
+        #        return
+        #    course_id = object.getId()
+        #    if course_id.endswith('_co'):
+        #        course_id = course_id[:-3]
+        #    student_id = object.absolute_url_path().split('/')[-4]
+        #    res = students_catalog(id = student_id)
+        #    if not res:
+        #        return
+        #    student_rec = res[0]
+        #    registered_courses = getattr(student_rec,'registered_courses',None)
+        #    if not registered_courses:
+        #        registered_courses = []
+        #    if event_type == "sys_add_object":
+        #        if course_id not in registered_courses:
+        #            registered_courses.append(course_id)
+        #        else:
+        #            return
+        #    elif registered_courses and event_type == "sys_del_object":
+        #        removed = False
+        #        while course_id in registered_courses:
+        #            removed = True
+        #            registered_courses.remove(course_id)
+        #        if not removed:
+        #            return
+        #    data['id'] = student_id
+        #    data['registered_courses'] = registered_courses
+        #    self.modifyRecord(record = student_rec, **data)
+        #    return
         if pt not in self.affected_types.keys():
             return
Index: WAeUP_SRP/base/WAeUPTool.py
===================================================================
--- WAeUP_SRP/base/WAeUPTool.py	(revision 2453)
+++ WAeUP_SRP/base/WAeUPTool.py	(revision 2454)
@@ -458,5 +458,5 @@
 
         entry_session = dict.get('entry_session')
-        if entry_session == self.getSessionId()[-2:]:
+        if entry_session == self.getSessionId()[0]:
             wfaction = 'admit'
             wft = 'wf_transition_admit'
@@ -554,6 +554,6 @@
             level = "%d00" % lnr
             verdict,eligible = self.getVerdict(s_results[0].Verdict)
-            if eligible:
-                level = "%d00" % (lnr + 1)
+            #if eligible:
+            #    level = "%d00" % (lnr + 1)
         else:
             logger.info('matric_no %s not found in results_import' % student.matric_no)
@@ -579,11 +579,4 @@
         da['jamb_reg_no'] = student.Entryregno
         em = self.getEntryMode(student.Entryregno)
-##        em = student.Mode_of_Entry
-##        if em in ('DIRECT', 'DIRECT ENTRY',):
-##            em = 'DE'
-##        elif em in ('U.M.E', 'UNE',):
-##            em = 'UME'
-##        elif not em:
-##            em = "unknown"
         da['entry_mode'] = em
         personal = student_obj.personal
@@ -616,19 +609,4 @@
         clearance.getContent().edit(mapping=dc)
         self.portal_workflow.doActionFor(clearance,'close',dest_container=clearance)
-##        catd = {}
-##        catd['id'] = sid
-##        catd['entry_mode']= da['entry_mode']
-##        catd['matric_no'] = matric_no
-##        catd['jamb_reg_no'] = da['jamb_reg_no']
-##        catd['name'] = "%(firstname)s %(middlename)s %(lastname)s" % dp
-##        catd['sex'] = dp['sex']
-##        catd['level'] = level
-##        catd['verdict'] = verdict
-##        if certificate_brain:
-##            cpath = certificate_brain.getPath().split('/')
-##            catd['faculty'] = cpath[-4]
-##            catd['department'] = cpath[-3]
-##            catd['course'] = certcode
-##        self.students_catalog.modifyRecord(**catd)
         #
         # Study Course
@@ -1295,6 +1273,6 @@
             for field in f2t[pt]['fields']:
                 d[field] = mapping.get(field,'')
-                
-            if pt == "StudentApplication":    
+
+            if pt == "StudentApplication":
                 d['jamb_sex']  = 'M'
                 if mapping.get('sex'):
Index: WAeUP_SRP/base/Widgets.py
===================================================================
--- WAeUP_SRP/base/Widgets.py	(revision 2453)
+++ WAeUP_SRP/base/Widgets.py	(revision 2454)
@@ -277,5 +277,5 @@
             v = value = '0%c' % v
         elif not value:
-            v = value = self.getSessionId()[-2:]
+            v = value = self.getSessionId()[0]
         #import pdb;pdb.set_trace()
         sessions = self._getSessions()
Index: WAeUP_SRP/base/skins/cps_custom/config_form.pt
===================================================================
--- WAeUP_SRP/base/skins/cps_custom/config_form.pt	(revision 2453)
+++ WAeUP_SRP/base/skins/cps_custom/config_form.pt	(revision 2454)
@@ -71,4 +71,15 @@
       <tr>
         <th>
+          <label>
+            Current Session
+          </label>
+        </th>
+        <td>
+          <input name="session" id="portal_session" value=""
+                 tal:attributes="value pprops/session" />
+        </td>
+      </tr>      
+      <tr>
+        <th>
           <label for="portal_description"
                  i18n:translate="label_portal_description">
Index: WAeUP_SRP/base/skins/cps_custom/reconfig.py
===================================================================
--- WAeUP_SRP/base/skins/cps_custom/reconfig.py	(revision 2454)
+++ WAeUP_SRP/base/skins/cps_custom/reconfig.py	(revision 2454)
@@ -0,0 +1,38 @@
+##parameters=REQUEST
+#$Id: reconfig.py 33523 2006-02-27 16:17:45Z fguillaume $
+"""
+This script just saves the portal properties from the reconfig_form
+template.
+"""
+
+portal = context.portal_url.getPortalObject()
+form = REQUEST.form
+
+# The portal_properties API is dumb, so we change properties directly
+# on the portal object.
+portal.manage_changeProperties(
+    email_from_name=form.get('email_from_name'),
+    email_from_address=form.get('email_from_address'),
+    title=form.get('title'),
+    description=form.get('description'),
+    session=form.get('session'),
+    )
+
+# Update membership tool properties
+portal.portal_membership.manage_changeProperties(
+    enable_password_reset=form.get('enable_password_reset'),
+    enable_password_reminder=form.get('enable_password_reminder'),
+    )
+
+# Update registration tool properties
+portal.portal_registration.manage_changeProperties(
+    enable_portal_joining=form.get('enable_portal_joining'),
+    )
+
+# Update MailHost properties
+portal.portal_properties.editProperties({
+    'smtp_server': form.get('smtp_server'),
+    })
+
+url = '%s/config_form?portal_status_message=psm_portal_reconfigured'
+return REQUEST.RESPONSE.redirect(url % portal.portal_url())
Index: WAeUP_SRP/base/skins/waeup_accommodation/allocate_reserved_bed.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_accommodation/allocate_reserved_bed.py	(revision 2453)
+++ WAeUP_SRP/base/skins/waeup_accommodation/allocate_reserved_bed.py	(revision 2454)
@@ -64,5 +64,5 @@
 students = context.portal_url.getPortalObject().campus.students
 student_obj = getattr(students,sid)
-acco_id = "accommodation_%s" % context.getSessionId()
+acco_id = "accommodation_%s" % context.getSessionId()[0]
 while True:
     if not res:
Index: WAeUP_SRP/base/skins/waeup_accommodation/change_bed.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_accommodation/change_bed.py	(revision 2453)
+++ WAeUP_SRP/base/skins/waeup_accommodation/change_bed.py	(revision 2454)
@@ -60,5 +60,5 @@
         return redirect("%s/%s/%s" % (students.absolute_url(),student,info['acco_id']))
     student_obj = getattr(students,student_id)
-    acco_id = "accommodation_%s" % context.getSessionId()
+    acco_id = "accommodation_%s" % context.getSessionId()[0]
     if acco_id in student_obj.objectIds():
         acco_doc = getattr(student_obj, acco_id).getContent()
Index: WAeUP_SRP/base/skins/waeup_accommodation/getAccommodationInfo.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_accommodation/getAccommodationInfo.py	(revision 2453)
+++ WAeUP_SRP/base/skins/waeup_accommodation/getAccommodationInfo.py	(revision 2454)
@@ -80,22 +80,16 @@
             booking_allowed = info['verdict'] in ("A",
                                                  "B",)
-                                                 
+
 booking_allowed = False # booking temporarily disabled
                         # the algorithm must be adapted to new course_results catalog
                         # and/or FCEOkene modalities
-                        
-                        
-                        
-                        
-                        
-                        
-                        
-                                                                         
-                                                 
+
+
 info['booking_allowed'] = booking_allowed
 if not booking_allowed:
     info['acco'] = None
     return info
-acco_id = 'accommodation_2006'
+info['session'] = session = context.getSessionId()  
+acco_id = 'accommodation_' + session[0]
 acco = getattr(student,acco_id,None)
 info['acco'] = acco
Index: WAeUP_SRP/base/skins/waeup_accommodation/reserve_accommodation.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_accommodation/reserve_accommodation.py	(revision 2453)
+++ WAeUP_SRP/base/skins/waeup_accommodation/reserve_accommodation.py	(revision 2454)
@@ -27,5 +27,6 @@
 student = info['student']
 acco_id = info['acco_id']
-session = acco_id[-4:]
+session = info['session'][1]
+#session = acco_id[-4:]
 validate = REQUEST.has_key("cpsdocument_create_button")
 if info.has_key('acco') and info['acco']:
Index: WAeUP_SRP/base/skins/waeup_default/getNextSessionId.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_default/getNextSessionId.py	(revision 2453)
+++ 	(revision )
@@ -1,22 +1,0 @@
-## Script (Python) "getSessionId"
-##bind container=container
-##bind context=context
-##bind namespace=
-##bind script=script
-##bind subpath=traverse_subpath
-##parameters=session
-##title=
-##
-# $Id$
-"""
-return the next Session Id
-"""
-
-if session != context.getSessionId()[-2:]:
-    ns = int(session) + 1
-else:
-    ns = int(session)
-ns = "%02d" % ns
-ns_str = context.portal_vocabularies.sessions.get(ns)
-
-return ns,ns_str
Index: WAeUP_SRP/base/skins/waeup_default/getNextSessionId.py_deprecated
===================================================================
--- WAeUP_SRP/base/skins/waeup_default/getNextSessionId.py_deprecated	(revision 2454)
+++ WAeUP_SRP/base/skins/waeup_default/getNextSessionId.py_deprecated	(revision 2454)
@@ -0,0 +1,22 @@
+## Script (Python) "getSessionId"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=session
+##title=
+##
+# $Id: getNextSessionId.py 1771 2007-05-11 11:37:16Z henrik $
+"""
+return the next Session Id
+"""
+
+if session != context.getSessionId()[-2:]:
+    ns = int(session) + 1
+else:
+    ns = int(session)
+ns = "%02d" % ns
+ns_str = context.portal_vocabularies.sessions.get(ns)
+
+return ns,ns_str
Index: WAeUP_SRP/base/skins/waeup_default/getSessionId.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_default/getSessionId.py	(revision 2453)
+++ WAeUP_SRP/base/skins/waeup_default/getSessionId.py	(revision 2454)
@@ -15,9 +15,14 @@
 # must be changed in 2007/2008; should return only the last two digits
 
-import DateTime
-now = DateTime.DateTime()
-if now.month() > 11:
-    s = "%s" % now.year()
-else:
-    s = "%s" % (now.year() - 1)
-return s
+#import DateTime
+#now = DateTime.DateTime()
+#if now.month() > 11:
+#    s = "%s" % now.year()
+#else:
+#    s = "%s" % (now.year() - 1)
+#return s
+
+session_id = context.portal_properties.session[2:4]
+session_str = context.portal_properties.session
+
+return [session_id, session_str]
Index: WAeUP_SRP/base/skins/waeup_epayment/getPaymentsFolderInfo.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_epayment/getPaymentsFolderInfo.py	(revision 2453)
+++ WAeUP_SRP/base/skins/waeup_epayment/getPaymentsFolderInfo.py	(revision 2454)
@@ -71,5 +71,7 @@
 info['prod_id'] = '61'
 session = s_brain.session
-info['next_session'], info['next_session_str'] = context.getNextSessionId(session)
+next_info = context.getNextInfo(s_brain)
+info['next_session'] = next_info['next_session_id']
+info['next_session_str'] = next_info['next_session_str']
 
 info['student_name'] = s_brain.name
Index: WAeUP_SRP/base/skins/waeup_epayment/interswitch_cb.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_epayment/interswitch_cb.py	(revision 2453)
+++ WAeUP_SRP/base/skins/waeup_epayment/interswitch_cb.py	(revision 2454)
@@ -52,5 +52,5 @@
     pd[pdk] = request.get(rc,'')
 
-# for testing purposes
+## for testing purposes
 #pd['resp_desc'] = 'Simulated Callback'
 #pd['resp_pay_reference'] = 'XXXX'
@@ -74,5 +74,11 @@
 s_brain = context.students_catalog(id=student_id)[0]
 session = s_brain.session
-next_session, next_session_str = context.getNextSessionId(session)
+#next_session, next_session_str = context.getNextSessionId(session)
+
+next_info = context.getNextInfo(s_brain)
+next_session_id = next_info['next_session_id']
+next_session_str = next_info['next_session_str']
+next_level_id = next_info['next_level_id']
+next_transition = next_info['next_transition']
 
 if  resp == '00':
@@ -80,16 +86,14 @@
         logger.info('%s paid school_fee in state school_fee_paid' % (student_id))
     else:
-        if next_session == context.getSessionId()[-2:]:
-            wftool.doActionFor(student,'pay_school_fee')
-        else:
-            study_course = getattr(student,'study_course')
-            try:
-                wftool.doActionFor(study_course,'open')
-            except:
-                pass
-            study_course_doc = study_course.getContent()
-            next_level = "%s" % (int(s_brain.level) + 100)
-            study_course_doc.edit(mapping= {'current_level': next_level,
-                                            'current_session': next_session,})
+        study_course = getattr(student,'study_course')
+        try:
+            wftool.doActionFor(study_course,'open')
+        except:
+            pass
+        study_course.getContent().edit(mapping= {'current_level': next_level_id,
+                                                 'current_session': next_session_id,})
+        if next_transition:
+            wftool.doActionFor(student,next_transition)    
+
     logger.info('%s received valid callback' % student_id)
     referer = request.get('HTTP_REFERER','none')
Index: WAeUP_SRP/base/skins/waeup_epayment/pay_by_sc.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_epayment/pay_by_sc.py	(revision 2453)
+++ WAeUP_SRP/base/skins/waeup_epayment/pay_by_sc.py	(revision 2454)
@@ -24,5 +24,5 @@
 if context.portal_membership.isAnonymousUser():
     return None
-
+wftool = context.portal_workflow
 lt = context.portal_layouts
 request = context.REQUEST
@@ -34,18 +34,15 @@
 student = getattr(students,student_id)
 s_brain = context.students_catalog(id=student_id)[0]
-next_info = context.getNextInfo(s_brain)
-next_session_id = next_info['next_session_id'] 
-next_session_str = next_info['next_session_str']
-next_level_id = next_info['next_level_id'] 
-next_transition = next_info['next_transition'] 
-study_course = getattr(student,'study_course')
-study_course.getContent().edit(mapping= {'current_level': next_level_id,
-                                         'current_session': next_session_id,})
-if next_transition:
-    wftool.doActionFor(student,next_transition)
 
 # session = s_brain.session
 # next_session, next_session_str = context.getNextSessionId(session)
-# validate = request.has_key("cpsdocument_create_button")
+
+next_info = context.getNextInfo(s_brain)
+next_session_id = next_info['next_session_id']
+next_session_str = next_info['next_session_str']
+next_level_id = next_info['next_level_id']
+next_transition = next_info['next_transition']
+
+validate = request.has_key("cpsdocument_create_button")
 res,psm,ds = lt.renderLayout(layout_id= 'student_schoolfee',
                       schema_id= 'payment',
@@ -113,13 +110,21 @@
     payment.getContent().edit(mapping=info)
     wftool.doActionFor(payment,'close')
-    if next_session == context.getSessionId()[-2:]:
-        wftool.doActionFor(student,'pay_school_fee')
-    else:
-        study_course = getattr(student,'study_course')
-        #wftool.doActionFor(study_course,'open')
-        study_course_doc = study_course.getContent()
-        next_level = "%s" % (int(s_brain.level) + 100)
-        study_course_doc.edit(mapping= {'current_level': next_level,
-                                        'current_session': next_session,})
+
+    study_course = getattr(student,'study_course')
+    study_course.getContent().edit(mapping= {'current_level': next_level_id,
+                                             'current_session': next_session_id,})
+    if next_transition:
+        wftool.doActionFor(student,next_transition)    
+    
+    #if next_session == context.getSessionId()[-2:]:
+    #    wftool.doActionFor(student,'pay_school_fee')
+    #else:
+    #    study_course = getattr(student,'study_course')
+    #    #wftool.doActionFor(study_course,'open')
+    #    study_course_doc = study_course.getContent()
+    #    next_level = "%s" % (int(s_brain.level) + 100)
+    #    study_course_doc.edit(mapping= {'current_level': next_level,
+    #                                    'current_session': next_session,})
+    
     logger.info('%s paid school fee by scratch card' % student_id)
 else:
Index: WAeUP_SRP/base/skins/waeup_student/create_level.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_student/create_level.py	(revision 2453)
+++ WAeUP_SRP/base/skins/waeup_student/create_level.py	(revision 2454)
@@ -72,6 +72,6 @@
     results = context.results_import(matric_no = student.matric_no)
 records = []
-if results:
-    l = []
+l = []
+if student.session in ('6', '06') and results:
     carry_overs = results
     for co in carry_overs:
@@ -154,13 +154,13 @@
 logger.info('%s finished to create level %s' % (student.id,current_level))
 
-if current_session == '05':
-    next_session = '06'
-    next_level = "%s" % (int(current_level) + 100)
-    study_course = getattr(student,'study_course')
-    context.portal_workflow.doActionFor(study_course,'open')
-    study_course_doc = study_course.getContent()
-    study_course_doc.edit(mapping= {'current_level': next_level,
-                                    'current_session': next_session,})
-    context.portal_workflow.doActionFor(study_course,'close_for_edit')
+#if current_session == '05':
+#    next_session = '06'
+#    next_level = "%s" % (int(current_level) + 100)
+#    study_course = getattr(student,'study_course')
+#    context.portal_workflow.doActionFor(study_course,'open')
+#    study_course_doc = study_course.getContent()
+#    study_course_doc.edit(mapping= {'current_level': next_level,
+#                                    'current_session': next_session,})
+#    context.portal_workflow.doActionFor(study_course,'close_for_edit')
 
 return response.redirect("%s/%s" % (context.absolute_url(),current_level))
Index: WAeUP_SRP/base/skins/waeup_student/getNextInfo.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_student/getNextInfo.py	(revision 2453)
+++ WAeUP_SRP/base/skins/waeup_student/getNextInfo.py	(revision 2454)
@@ -1,3 +1,3 @@
-## Script (Python) "getSessionId"
+## Script (Python) "getNextInfo"
 ##bind container=container
 ##bind context=context
@@ -12,18 +12,26 @@
 return the students next info
 """
+
 info = {}
+
+session_id = student_brain.session
+level_id = student_brain.level
+review_state = student_brain.review_state
+verdict = student_brain.verdict
 info['next_transition'] = None
-session_id = student_brain.session
-if int(session_id) > int(context.getSessionId()[3:4]) -2:
+info['next_session_id'] = next_session_id = session_id
+info['next_level_id'] = next_level_id = level_id
+
+if review_state == 'cleared_and_validated':
     info['next_transition'] = "pay_school_fee"
+elif review_state == 'returning':
+    info['next_level_id'] = "%s" % (int(level_id) + 100)
+    info['next_session_id'] = next_session_id = "%02d" % (int(session_id)+1)
+    if int(session_id) > int(context.getSessionId()[0]) -2:
+        info['next_transition'] = "pay_school_fee"
+        if verdict not in ('A','B',):
+            info['next_level_id'] = level_id
 
-if student_brain.review_state == "returning":
-    session_id info['next_session_id'] = "%02d" % int(session_id) + 1
-info['next_session_str'] = context.session_voc(session_id)
-next_level_id = student_brain.level
-if student_brain.review_state not in ('cleared_and_validated',)
-    next_level_id = "%s" % (int(next_level_id) + 100)
-info['next_level_id'] = next_level_id
-
+info['next_session_str'] = context.sessions_voc(next_session_id)
 
 return info
Index: WAeUP_SRP/base/skins/waeup_student/getStudyLevelInfo.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_student/getStudyLevelInfo.py	(revision 2453)
+++ WAeUP_SRP/base/skins/waeup_student/getStudyLevelInfo.py	(revision 2454)
@@ -97,5 +97,5 @@
 info['credits_exceeded'] = credits_total > 51
 current_session = student.session
-info['submission_allowed']= not info['credits_exceeded'] and current_session == context.getSessionId()[-2:]
+info['submission_allowed']= not info['credits_exceeded'] and current_session == context.getSessionId()[0]
 # carry_overs.sort(cmp_semester_id)
 info['carry_overs'] = carry_overs
Index: WAeUP_SRP/base/skins/waeup_utilities/fixReservedBeds.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_utilities/fixReservedBeds.py	(revision 2453)
+++ WAeUP_SRP/base/skins/waeup_utilities/fixReservedBeds.py	(revision 2454)
@@ -17,5 +17,5 @@
 students = context.portal_url.getPortalObject().campus.students
 hostels = context.portal_url.getPortalObject().campus.accommodation.objectItems()
-acco_id = "accommodation_%s" % context.getSessionId()
+acco_id = "accommodation_%s" % context.getSessionId()[0]
 logger.info('%s starts fixReservedBeds' % (member))
 #from Products.zdb import set_trace;set_trace()
Index: WAeUP_SRP/base/skins/waeup_utilities/fixReturningSession.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_utilities/fixReturningSession.py	(revision 2453)
+++ WAeUP_SRP/base/skins/waeup_utilities/fixReturningSession.py	(revision 2454)
@@ -36,5 +36,5 @@
 brains = aq_students(query)
 total = len(brains)
-logger.info('editet %d students with session 06 and returning' % total)
+logger.info('editet %d students with session 06 and state returning' % total)
 count = 0
 commit_after = 100
@@ -55,3 +55,3 @@
     except:
         rwrite('>>>> not found %s study_course' % (brain.id))
-        
+
Index: WAeUP_SRP/fceokene/profiles/default/properties.xml
===================================================================
--- WAeUP_SRP/fceokene/profiles/default/properties.xml	(revision 2453)
+++ WAeUP_SRP/fceokene/profiles/default/properties.xml	(revision 2454)
@@ -4,3 +4,4 @@
  <property name="enable_password_reset" type="boolean">True</property>
  <property name="enable_portal_joining" type="boolean">False</property>
+ <property name="session" type="string">06</property>
 </site>
