Index: WAeUP_SRP/base/WAeUPTables.py
===================================================================
--- WAeUP_SRP/base/WAeUPTables.py	(revision 2663)
+++ WAeUP_SRP/base/WAeUPTables.py	(revision 2664)
@@ -1057,17 +1057,4 @@
                                              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
             self.addRecord(**data)
         if pghandler: pghandler.finish()
@@ -1101,38 +1088,4 @@
             elif event_type == 'sys_del_object':
                 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
         if pt not in self.affected_types.keys():
             return
Index: WAeUP_SRP/base/skins/waeup_epayment/pay_by_sc.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_epayment/pay_by_sc.py	(revision 2663)
+++ WAeUP_SRP/base/skins/waeup_epayment/pay_by_sc.py	(revision 2664)
@@ -125,14 +125,4 @@
         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_epayment/pay_interswitch.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_epayment/pay_interswitch.py	(revision 2663)
+++ WAeUP_SRP/base/skins/waeup_epayment/pay_interswitch.py	(revision 2664)
@@ -44,5 +44,4 @@
 fee_dict = context.getSchoolFee(sbrain)
 fulltime = sbrain.mode.endswith('_ft')
-#new =  sbrain.entry_session == context.getSessionId()[-2:]
 new = sbrain.review_state == 'cleared_and_validated'
 returning = sbrain.review_state == 'returning'
Index: WAeUP_SRP/base/skins/waeup_student/create_level.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_student/create_level.py	(revision 2663)
+++ WAeUP_SRP/base/skins/waeup_student/create_level.py	(revision 2664)
@@ -65,4 +65,7 @@
     results = context.results_import(matric_no = student.matric_no)
 l = []
+
+
+# fetch carry_over courses from results_import   
 if student.session in ('6', '06') and results:
     carry_overs = results
@@ -106,5 +109,8 @@
         d['session_id'] = session_id
         records.append(d)
+# fetch carry_over courses from the course_results catalog         
+# else 
 
+# fetch session courses from the certificate  
 res = context.portal_catalog(portal_type="Certificate", id = cert_id)
 if res:
Index: WAeUP_SRP/base/skins/waeup_student/getNextInfo.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_student/getNextInfo.py	(revision 2663)
+++ WAeUP_SRP/base/skins/waeup_student/getNextInfo.py	(revision 2664)
@@ -42,4 +42,5 @@
     info['next_session_id'] = next_session_id = "%02d" % (int(session_id)+1)
     if int(session_id) > 4:
+        info['next_transition'] = "pay_school_fee"
         info['next_verdict'] = ''
         if verdict in ('A','B',):
@@ -47,6 +48,4 @@
         else:
             info['next_level_id'] = level_id
-        if int(session_id) > int(context.getSessionId()[0]) -2:
-            info['next_transition'] = "pay_school_fee"
     else:
         info['next_level_id'] = "%s" % (int(level_id) + 100)
Index: WAeUP_SRP/base/skins/waeup_student/getStudyCourseInfo.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_student/getStudyCourseInfo.py	(revision 2663)
+++ WAeUP_SRP/base/skins/waeup_student/getStudyCourseInfo.py	(revision 2664)
@@ -81,15 +81,19 @@
 
 current_level = sbrain.level
-set_trace
 levels = context.objectIds()
 review_state = wftool.getInfoFor(context,'review_state',None)
-student_review_state = context.getStudentReviewState()
+student_review_state = sbrain.review_state
 if review_state != 'content_addable' and student_review_state == 'school_fee_paid': #and context.isStudent():
     wftool.doActionFor(context,'close_for_edit')
-may_register = (student_review_state in ('school_fee_paid',)) and\
-                current_level not in levels and\
-                (previous_verdict in ('A','B','C','F','J','L','M') or\
-                sbrain.level == '100' or\
+    
+has_paid = student_review_state == 'school_fee_paid'
+
+may_register = has_paid and\
+               current_level not in levels and\
+               (previous_verdict in ('A','B','C','F','J','L','M') or\
+               sbrain.level == '100' or\
                (sbrain.mode.startswith('de') and sbrain.level == '200'))
+
+
 levels.sort()
 info['create_level'] = None
Index: WAeUP_SRP/base/skins/waeup_student/getStudyLevelInfo.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_student/getStudyLevelInfo.py	(revision 2663)
+++ WAeUP_SRP/base/skins/waeup_student/getStudyLevelInfo.py	(revision 2664)
@@ -46,9 +46,15 @@
 info['is_ca'] = is_ca = context.isCourseAdviser()
 info['student'] = student = context.students_catalog(id=student_id)[0]
-info['review_state'] = review_state = context.getStudentReviewState()
+info['review_state'] = review_state = student.review_state
 info['view_only'] =  review_state != "school_fee_paid"
-info['show_check_boxes'] =  (is_ca and review_state in ('school_fee_paid',)) or\
-                            (is_student and context.getStudentReviewState() == "school_fee_paid") or\
+
+
+has_paid =  review_state == 'school_fee_paid'
+
+info['show_check_boxes'] =  (is_ca and has_paid) or\
+                            (is_student and has_paid) or\
                             (is_so)
+
+
 info['choosen_ids'] = request.get('ids',[])
 info['status_info'] = ""
@@ -77,6 +83,10 @@
 info['credits_exceeded'] = credits_total > max_credits
 current_session = student.session
-info['submission_allowed']= not info['credits_exceeded'] and\
-    current_session == context.getSessionId()[0]
+
+info['submission_allowed']= review_state in  ('school_fee_paid','returning') and has_paid
+info['validation_allowed']= review_state == 'courses_registered'
+info['rejection_allowed']= review_state in ('courses_registered', 'courses_validated',)
+
+
 # carry_overs.sort(cmp_semester_id)
 info['carry_overs'] = carry_overs
@@ -86,5 +96,5 @@
 info['normal3'] = normal3
 
-info['data_missing'] = not info['normal1'] and not info['normal2'] and not info['normal3'] 
+info['data_missing'] = not info['normal1'] and not info['normal2'] and not info['normal3']
 info['spillover'] = student.level > student.end_level
 
Index: WAeUP_SRP/base/skins/waeup_student/study_level_view.pt
===================================================================
--- WAeUP_SRP/base/skins/waeup_student/study_level_view.pt	(revision 2663)
+++ WAeUP_SRP/base/skins/waeup_student/study_level_view.pt	(revision 2664)
@@ -148,5 +148,5 @@
     
       
-      <table tal:condition="python: is_student and review_state == 'school_fee_paid'" width="100%" cellspacing="0" cellpadding="2"
+      <table tal:condition="python: is_student and info['submission_allowed']" width="100%" cellspacing="0" cellpadding="2"
              class="folderButtons">
         <tr>
@@ -164,5 +164,5 @@
                      
               <br /><br />
-              <input tal:condition="info/submission_allowed" 
+              <input tal:condition="not: info/credits_exceeded" 
                      type="submit" name="register_courses:method"
                      class="context" value="Submit to Course Adviser" 
@@ -210,9 +210,9 @@
                      class="context" value="Update" 
                      />
-              <input tal:condition="python: review_state == 'school_fee_paid'" type="submit" name="register_courses:method"
+              <input tal:condition="info/submission_allowed" type="submit" name="register_courses:method"
                      class="context" value="Submit" />  
-              <input tal:condition="python: review_state == 'courses_registered'" type="submit" name="validate_courses:method"
+              <input tal:condition="info/validation_allowed" type="submit" name="validate_courses:method"
                      class="context" value="Validate" />
-              <input tal:condition="python: review_state in ('courses_registered', 'courses_validated',)" type="submit" name="reject_courses:method"
+              <input tal:condition="info/rejection_allowed" type="submit" name="reject_courses:method"
                      class="context" value="Reject" />
                      
@@ -230,5 +230,5 @@
           <td align="left" valign="top" rowspan="3"></td>
           <td align="left" valign="top">
-              <input tal:condition="python: review_state == 'school_fee_paid'"
+              <input tal:condition="python: info['submission_allowed']"
                      type="button" value="Select all" class="context"
                      onclick="someJavaScriptFunctionThatWillBeReplaced"
@@ -237,5 +237,5 @@
                      % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
                      />
-              <input tal:condition="python: review_state == 'school_fee_paid'"
+              <input tal:condition="python: info['submission_allowed']"
                      type="submit" name="delete_course_result:method" value="Delete selected"
                      class="destructive" i18n:attributes="value"
@@ -243,13 +243,13 @@
                      ('Do you really want to delete the courses selected?', )" 
                      />
-              <input tal:condition="python: review_state == 'school_fee_paid'"
+              <input tal:condition="python: info['submission_allowed']"
                      type="submit" name="refresh_level:method"
                      class="context" value="Update" 
                      />
-              <input tal:condition="python: review_state == 'school_fee_paid'" type="submit" name="register_courses:method"
+              <input tal:condition="info/submission_allowed" type="submit" name="register_courses:method"
                      class="context" value="Submit" />  
-              <input tal:condition="python: review_state == 'courses_registered'" type="submit" name="validate_courses:method"
+              <input tal:condition="info/validation_allowed" type="submit" name="validate_courses:method"
                      class="context" value="Validate" />
-              <input tal:condition="python: review_state in ('courses_registered', 'courses_validated',)" type="submit" name="reject_courses:method"
+              <input tal:condition="info/rejection_allowed" type="submit" name="reject_courses:method"
                      class="context" value="Reject" />
                      
