Index: WAeUP_SRP/trunk/skins/waeup_student/course_result_delete.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/course_result_delete.py	(revision 1552)
+++ WAeUP_SRP/trunk/skins/waeup_student/course_result_delete.py	(revision 1557)
@@ -18,7 +18,13 @@
 ret_url = here.absolute_url()
 
+message = ''
 if ids:
-    here.manage_delObjects(ids)
-    message = 'portal_status_message=psm_item(s)_deleted'
+    real_ids = []
+    for id in ids:
+        if context.hasObject(id):
+            real_ids.append(id)
+    if real_ids:
+        context.manage_delObjects(real_ids)
+        message = 'portal_status_message=psm_item(s)_deleted'
 else:
     message = 'portal_status_message=psm_select_at_least_one_document'
Index: WAeUP_SRP/trunk/skins/waeup_student/get_searchable_student_states.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/get_searchable_student_states.py	(revision 1552)
+++ WAeUP_SRP/trunk/skins/waeup_student/get_searchable_student_states.py	(revision 1557)
@@ -23,4 +23,7 @@
     return [item for item in voc.items() if item[0].startswith('clear') or
                                          item[0] in ("all",)]
+elif "CourseAdvisers" in member.getGroups():
+    return [item for item in voc.items() if item[0].startswith('courses') or
+                                         item[0] in ("all",)]
 return voc.items()
 
Index: WAeUP_SRP/trunk/skins/waeup_student/search_students.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/search_students.py	(revision 1552)
+++ WAeUP_SRP/trunk/skins/waeup_student/search_students.py	(revision 1557)
@@ -61,7 +61,9 @@
 user_info['faculties'] = []
 co_view = False
+ca_view = False
 faculties =  fget('faculties')
 departments = fget('departments')
-dep_str = fac_str = ''
+certificate_level = fget('certificate_level')
+dep_str = fac_str = certificate_level_str = ''
 if "ClearanceOfficers" in member.getGroups():
     state = "clearance_requested"
@@ -93,4 +95,21 @@
         user_info['departments'] = departments
         dep_str = " ".join(departments)
+elif "CourseAdvisers" in member.getGroups():
+    state = "courses_registered"
+    only_review = False
+    ca_view = True
+    if certificate_level:
+        #from Products.zdb import set_trace;set_trace()
+        certificate_level_str = certificate_level
+        certificate_level = certificate_level.split()
+    else:
+        query = In('portal_type',('StudyLevel',)) &\
+                 In('localUsersWithRoles', ("user:%s" % member,))
+        res = evalAdvancedQuery(query)
+        certificate_level = []
+        if res:
+            certificate_level = ['/'.join(f.getPath().split('/')[-2:]) for f in res]
+        user_info['certificate_level'] = certificate_level
+        certificate_level_str = " ".join(certificate_level)
 default = {'search_mode': 'student_id',
         'review_state': state,
@@ -106,4 +125,5 @@
                       faculties = fac_str,
                       departments = dep_str,
+                      certificate_level = certificate_level_str,
                       commit = False,
                       )
@@ -200,4 +220,22 @@
         end = DateTime().timeTime()
         logger.info('"%s","searchtime","%6.2f"' % (member,end-start))
+elif ca_view:
+    only_review = False
+    with_review = True
+    if with_timer:
+        start = DateTime().timeTime()
+        logger.info('"%s","start 200"' % member)
+    courses = [cl.split('/')[0] for cl in certificate_level]
+    levels = [cl.split('/')[1] for cl in certificate_level]
+    query = In('course',courses) & In('level',levels)
+    res = aq_students(query)
+    if with_timer:
+        end = DateTime().timeTime()
+        logger.info('"%s","searchtime","%6.2f"' % (member,end-start))
+        start = DateTime().timeTime()
+    search_set = [r.id for r in res]
+    if with_timer:
+        end = DateTime().timeTime()
+        logger.info('"%s","searchtime","%6.2f"' % (member,end-start))
 if with_timer:
     logger.info('"%s","start 300"' % member)
Index: WAeUP_SRP/trunk/skins/waeup_student/search_students_form.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/search_students_form.pt	(revision 1552)
+++ WAeUP_SRP/trunk/skins/waeup_student/search_students_form.pt	(revision 1557)
@@ -35,6 +35,4 @@
       </span>
       </strong>
-     
-              
         <h3> Search Student Section</h3><br />
           You are logged in as member <span tal:replace="info/member|nothing" /> 
@@ -45,4 +43,8 @@
           <span tal:condition="info/departments|nothing" tal:omit-tag="">
             and <span tal:repeat="department info/departments|nothing" tal:content="department"/></span>.
+          <span tal:condition="info/certificate_level|nothing" tal:omit-tag="">
+            who is CourseAdviser for 
+            <span tal:repeat="cl info/certificate_level" tal:content="cl" />
+          </span>
           <br /><br />
         <span tal:replace="structure rendered" />
Index: WAeUP_SRP/trunk/skins/waeup_student/students_index.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/students_index.py	(revision 1552)
+++ WAeUP_SRP/trunk/skins/waeup_student/students_index.py	(revision 1557)
@@ -23,5 +23,6 @@
 students_url = "%s/campus/students" % (context.portal_url())
 
-if "ClearanceOfficers" in member.getGroups():
+if "ClearanceOfficers" in member.getGroups() or\
+   "CourseAdvisers" in member.getGroups():
     return redirect("%s/search_students" % context.portal_url())
 if context.isSectionOfficer():
Index: WAeUP_SRP/trunk/skins/waeup_student/study_level_view.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/study_level_view.pt	(revision 1552)
+++ WAeUP_SRP/trunk/skins/waeup_student/study_level_view.pt	(revision 1557)
@@ -63,5 +63,9 @@
         <h4>Session Courses</h4>
         <br />
-        <table class="contentListing" width="100%" summary="content layout" id="folder_content">      
+      <div class="" tal:condition="not: info/normal">
+        Your faculty has not yet provided the list of courses for your certificate. Please contact your faculty!
+      </div>
+        <table class="contentListing" width="100%" id="folder_content"
+               tal:condition="info/normal">      
           <tr tal:repeat="row info/normal"
               tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
@@ -106,5 +110,6 @@
                        />
                 <br /><br />
-                <input type="submit" name="register_courses:method"
+                <input tal:condition="info/normal" 
+                       type="submit" name="register_courses:method"
                        class="context" value="Submit" />
             </td>
