Index: /main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py	(revision 7204)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py	(revision 7205)
@@ -54,4 +54,5 @@
     IPasswordValidator)
 from waeup.sirp.permissions import get_users_with_local_roles, get_all_roles
+from waeup.sirp.students.catalog import search as searchstudents
 from waeup.sirp.university.catalog import search
 from waeup.sirp.university.vocabularies import course_levels
@@ -1369,4 +1370,27 @@
             yield(dict(url=url, name=key, container=val))
 
+class ShowStudentsPage(WAeUPPage):
+    """Page that lists all students in the department.
+    """
+    grok.context(IDepartment)
+    grok.require('waeup.showStudents')
+    grok.name('showstudents')
+    pnav = 1
+    label = 'Students'
+
+    @property
+    def title(self):
+        return self.context.longtitle()
+
+    @property
+    def getStudents(self):
+        hitlist = searchstudents(query=self.context.code,
+            searchtype='depcode', view=self)
+        return hitlist
+
+    def update(self, *args, **kw):
+        datatable.need()
+        return
+
 class DepartmentManageFormPage(WAeUPEditFormPage):
     """Manage the basic properties of a `Department` instance.
Index: /main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/showstudentspage.pt
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/showstudentspage.pt	(revision 7205)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/showstudentspage.pt	(revision 7205)
@@ -0,0 +1,19 @@
+<h2 i18n:translate=""
+tal:condition="view/label"
+tal:content="view/label">Label</h2>
+
+<table class="display dataTableManage">
+  <thead>
+	<tr>
+	  <th>Student Id</th><th>Fullname</th>
+	</tr>
+  </thead>
+  <tbody>
+	<tr tal:repeat="item view/getStudents">
+	  <td> <a tal:attributes="href item/url">
+      <span tal:content="item/student_id">A123456</span></a>
+    </td>
+	  <td tal:content="item/fullname">Bob</td>
+	</tr>
+  </tbody>
+</table>
Index: /main/waeup.sirp/trunk/src/waeup/sirp/browser/viewlets.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/browser/viewlets.py	(revision 7204)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/browser/viewlets.py	(revision 7205)
@@ -416,4 +416,14 @@
     text = 'Manage department'
 
+class ShowDepartmentStudentsActionButton(ManageActionButton):
+    """ 'Show students' button for departments.
+    """
+    grok.context(IDepartment)
+    grok.view(DepartmentPage)
+    grok.require('waeup.showStudents')
+    icon = 'actionicon_student.png'
+    text = 'Show students'
+    target = 'showstudents'
+
 class ManageCourseActionButton(ManageActionButton):
     """ 'Edit settings' button for courses.
Index: /main/waeup.sirp/trunk/src/waeup/sirp/permissions.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/permissions.py	(revision 7204)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/permissions.py	(revision 7205)
@@ -54,4 +54,7 @@
     grok.name('waeup.manageUsers')
 
+class ShowStudents(grok.Permission):
+    grok.name('waeup.showStudents')
+
 class EditUser(grok.Permission):
     grok.name('waeup.editUser')
@@ -70,5 +73,5 @@
     grok.name('waeup.local.DepartmentManager')
     grok.title(u'Department Manager')
-    grok.permissions('waeup.manageUniversity')
+    grok.permissions('waeup.manageUniversity','waeup.showStudents')
 
 class ClearanceOfficer(grok.Role):
@@ -78,4 +81,5 @@
     grok.name('waeup.local.ClearanceOfficer')
     grok.title(u'Clearance Officer')
+    grok.permissions('waeup.showStudents')
 
 class CourseAdviser(grok.Role):
@@ -85,4 +89,5 @@
     grok.name('waeup.local.CourseAdviser')
     grok.title(u'Course Adviser')
+    grok.permissions('waeup.showStudents')
 
 class Owner(grok.Role):
@@ -112,5 +117,6 @@
                      'waeup.viewStudent', 'waeup.manageStudent', 'clearStudent',
                      'waeup.uploadStudentFile', 'waeup.viewStudents',
-                     'waeup.viewHostels', 'waeup.manageHostels')
+                     'waeup.viewHostels', 'waeup.manageHostels',
+                     'waeup.showStudents')
 
 def get_all_roles():
Index: /main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py	(revision 7204)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py	(revision 7205)
@@ -70,6 +70,9 @@
     if changed_fields:
         changed_fields = reduce(lambda x,y: x+y, changed_fields.values())
+    # Inform catalog if certificate has changed
+    # (applyData does this only for the context)
+    if 'certificate' in changed_fields:
+        notify(grok.ObjectModifiedEvent(view.context.getStudent()))
     fields_string = ' + '.join(changed_fields)
-    #view.context._p_changed = True
     view.flash('Form has been saved.')
     if fields_string:
@@ -599,5 +602,5 @@
     @property
     def department(self):
-        if self.context.certificate:
+        if self.context.certificate is not None:
             return self.context.certificate.__parent__.__parent__
         return
@@ -605,5 +608,5 @@
     @property
     def faculty(self):
-        if self.context.certificate:
+        if self.context.certificate is not None:
             return self.context.certificate.__parent__.__parent__.__parent__
         return
Index: /main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/containermanagepage.pt
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/containermanagepage.pt	(revision 7204)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/containermanagepage.pt	(revision 7205)
@@ -10,5 +10,8 @@
     <option value="student_id">with id</option>
     <option value="fullname">with name</option>
+    <option value="reg_number">with registration number</option>
+    <option value="matric_number">with matriculation number</option>
     <option value="current_session">in session</option>
+    <option value="depcode">in department</option>
   </select>
 
Index: /main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/containerpage.pt
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/containerpage.pt	(revision 7204)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/containerpage.pt	(revision 7205)
@@ -13,4 +13,5 @@
     <option value="matric_number">with matriculation number</option>
     <option value="current_session">in session</option>
+    <option value="depcode">in department</option>
   </select>
 
Index: /main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py	(revision 7204)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py	(revision 7205)
@@ -149,5 +149,5 @@
         self.certificate.end_level = 500
         self.app['faculties']['fac1'] = Faculty()
-        self.app['faculties']['fac1']['dep1'] = Department()
+        self.app['faculties']['fac1']['dep1'] = Department(code='dep1')
         self.app['faculties']['fac1']['dep1'].certificates.addCertificate(
             self.certificate)
@@ -196,4 +196,6 @@
         self.student['studycourse'].current_verdict = 'A'
         self.student['studycourse'].current_level = 100
+        # Update the catalog
+        notify(grok.ObjectModifiedEvent(self.student))
 
         # Put the prepopulated site into test ZODB and prepare test
@@ -263,4 +265,11 @@
         self.browser.getControl(name="searchtype").value = ['student_id']
         self.browser.getControl(name="searchterm").value = self.student_id
+        self.browser.getControl("Search").click()
+        self.assertTrue('Anna Tester' in self.browser.contents)
+
+        # We can find a student in a certain department
+        self.browser.open(self.container_path)
+        self.browser.getControl(name="searchtype").value = ['depcode']
+        self.browser.getControl(name="searchterm").value = 'dep1'
         self.browser.getControl("Search").click()
         self.assertTrue('Anna Tester' in self.browser.contents)
