Index: WAeUP_SRP/trunk/WAeUPTables.py
===================================================================
--- WAeUP_SRP/trunk/WAeUPTables.py	(revision 2032)
+++ WAeUP_SRP/trunk/WAeUPTables.py	(revision 2033)
@@ -550,4 +550,8 @@
             if event_type not in ("sys_add_object","sys_del_object"):
                 return
+            #import pdb;pdb.set_trace()
+            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'):
@@ -559,5 +563,4 @@
             student_rec = res[0]
             registered_courses = getattr(student_rec,'registered_courses',[])
-            #import pdb;pdb.set_trace()
             try:
                 x = course_id in registered_courses
Index: WAeUP_SRP/trunk/skins/waeup_student/add_course_result.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/add_course_result.py	(revision 2032)
+++ WAeUP_SRP/trunk/skins/waeup_student/add_course_result.py	(revision 2033)
@@ -69,7 +69,10 @@
 cr.getContent().edit(mapping=d)
 #context.portal_workflow.doActionFor(cr,'close')
-args['course_id'] = course_id
+#args['course_id'] = course_id
 
-logger.info('%s added StudentCourseResult object %s for %s' % (member,course_id,context.getStudentId()))
+logger.info('%s added StudentCourseResult object %s at level %s for %s' % (member,
+                                                                           course_id,
+                                                                           context.getId(),
+                                                                           context.getStudentId()))
 
 psm = "You successfully added course %s!" % course_id
Index: WAeUP_SRP/trunk/skins/waeup_student/create_level.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/create_level.py	(revision 2032)
+++ WAeUP_SRP/trunk/skins/waeup_student/create_level.py	(revision 2033)
@@ -130,5 +130,6 @@
         course_result = getattr(level,cr_id)
         context.portal_workflow.doActionFor(course_result,'open')
-        d['core_or_elective'] = getattr(c.getObject().getContent(),'core_or_elective')
+        #d['core_or_elective'] = getattr(c.getObject().getContent(),'core_or_elective')
+        d['core_or_elective'] = True
         course_result.getContent().edit(mapping=d)
         context.waeup_tool.doCommit()
Index: WAeUP_SRP/trunk/skins/waeup_student/getStudyLevelInfo.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/getStudyLevelInfo.py	(revision 2032)
+++ WAeUP_SRP/trunk/skins/waeup_student/getStudyLevelInfo.py	(revision 2033)
@@ -112,5 +112,5 @@
         d = context.getCourseInfo(id)
         d['id'] = id
-        coe = obj.getContent().core_or_elective
+        coe = getattr(obj.getContent(),'core_or_elective',True)
         d['coe'] = 'Core'
         try:
Index: WAeUP_SRP/trunk/skins/waeup_utilities/ti_311_resolve.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_utilities/ti_311_resolve.py	(revision 2033)
+++ WAeUP_SRP/trunk/skins/waeup_utilities/ti_311_resolve.py	(revision 2033)
@@ -0,0 +1,41 @@
+## Script (Python) "findStudentsWithCourses"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+"""
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+import logging
+logger = logging.getLogger('Skins.ti_311_resolve')
+from Products.AdvancedQuery import Eq, Between, Le,In
+aq_students = context.students_catalog.evalAdvancedQuery
+
+request = context.REQUEST
+session = request.SESSION
+response = request.RESPONSE
+setheader = request.RESPONSE.setHeader
+students = context.portal_url.getPortalObject().campus.students
+#from string import Template
+def rwrite(s):
+    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
+    response.write("%s<br>\n\r" % s)
+
+#logger.info('')
+
+query = Eq('review_state','courses_registered') & Eq('session','05')
+brains = aq_students(query)
+total = len(brains)
+logger.info('found %d students with session 05 and courses_registered' % total)
+count = 0
+for brain in brains:
+    rwrite('%s , %s ,%s, %s' % (brain.id,brain.jamb_reg_no,brain.matric_no,brain.name))
