Index: /main/waeup.kofa/trunk/src/waeup/kofa/browser/layout.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/browser/layout.py	(revision 8735)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/browser/layout.py	(revision 8736)
@@ -282,5 +282,5 @@
         """
         if IStudentNavigation.providedBy(self.context):
-            return self.context.getStudent().display_fullname
+            return self.context.student.display_fullname
         return
 
Index: /main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/staffsitelayout.pt
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/staffsitelayout.pt	(revision 8735)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/staffsitelayout.pt	(revision 8736)
@@ -61,9 +61,9 @@
         tal:condition="layout/getStudentName" class="wfstatus">
           <span i18n:translate="">Student Id:</span>
-          <span tal:replace="python:context.getStudent().student_id">
+          <span tal:replace="python:context.student.student_id">
             ID
           </span>&nbsp;&nbsp;
           <span i18n:translate="">State:</span>
-          <span tal:replace="python:context.getStudent().translated_state">
+          <span tal:replace="python:context.student.translated_state">
             STATE
           </span>
Index: /main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/studentsitelayout.pt
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/studentsitelayout.pt	(revision 8735)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/studentsitelayout.pt	(revision 8736)
@@ -64,9 +64,9 @@
               tal:content="structure provider:breadcrumbs" />
         <span tal:condition="layout/getStudentName" class="wfstatus">
-            <span tal:replace="python:context.getStudent().student_id">
+            <span tal:replace="python:context.student.student_id">
               Id
             </span>
             |
-            <span tal:replace="python:context.getStudent().translated_state">
+            <span tal:replace="python:context.student.translated_state">
               State
             </span>
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/accommodation.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/accommodation.py	(revision 8735)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/accommodation.py	(revision 8736)
@@ -48,5 +48,6 @@
         return
 
-    def getStudent(self):
+    @property
+    def student(self):
         return self.__parent__
 
@@ -69,6 +70,10 @@
         return
 
-    def getStudent(self):
-        return self.__parent__.__parent__
+    @property
+    def student(self):
+        try:
+            return self.__parent__.__parent__
+        except AttributeError:
+            return None
 
     def writeLogMessage(self, view, message):
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/batching.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/batching.py	(revision 8735)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/batching.py	(revision 8736)
@@ -650,5 +650,5 @@
             return 'Current session does not correspond.'
         # Check if student is in state REGISTERED
-        if obj.getStudent().state != VALIDATED:
+        if obj.student.state != VALIDATED:
             return 'Student in wrong state.'
         return None
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 8735)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 8736)
@@ -431,10 +431,10 @@
 
     def render(self):
-        studentview = StudentBaseDisplayFormPage(self.context.getStudent(),
+        studentview = StudentBaseDisplayFormPage(self.context.student,
             self.request)
         students_utils = getUtility(IStudentsUtils)
         return students_utils.renderPDF(
             self, 'clearance.pdf',
-            self.context.getStudent(), studentview)
+            self.context.student, studentview)
 
 class StudentClearanceManageFormPage(KofaEditFormPage):
@@ -700,5 +700,5 @@
             target_language=lang)
         return _('${a}: Study Level ${b}', mapping = {
-            'a':self.context.getStudent().display_fullname,
+            'a':self.context.student.display_fullname,
             'b':level_title})
 
@@ -751,5 +751,5 @@
         Mand = translate(_('Mand.'), 'waeup.kofa', target_language=portal_language)
         Score = translate(_('Score'), 'waeup.kofa', target_language=portal_language)
-        studentview = StudentBaseDisplayFormPage(self.context.getStudent(),
+        studentview = StudentBaseDisplayFormPage(self.context.student,
             self.request)
         students_utils = getUtility(IStudentsUtils)
@@ -758,5 +758,5 @@
         return students_utils.renderPDF(
             self, 'course_registration.pdf',
-            self.context.getStudent(), studentview,
+            self.context.student, studentview,
             tableheader=[(Sem,'semester', 1.5),(Code,'code', 2.5),
                          (Title,'title', 5),
@@ -843,6 +843,6 @@
         if str(self.context.__parent__.current_level) != self.context.__name__:
             self.flash(_('This level does not correspond current level.'))
-        elif self.context.getStudent().state == REGISTERED:
-            IWorkflowInfo(self.context.getStudent()).fireTransition(
+        elif self.context.student.state == REGISTERED:
+            IWorkflowInfo(self.context.student).fireTransition(
                 'validate_courses')
             self.flash(_('Course list has been validated.'))
@@ -867,10 +867,10 @@
             self.redirect(self.url(self.context))
             return
-        elif self.context.getStudent().state == VALIDATED:
-            IWorkflowInfo(self.context.getStudent()).fireTransition('reset8')
+        elif self.context.student.state == VALIDATED:
+            IWorkflowInfo(self.context.student).fireTransition('reset8')
             message = _('Course list request has been annulled.')
             self.flash(message)
-        elif self.context.getStudent().state == REGISTERED:
-            IWorkflowInfo(self.context.getStudent()).fireTransition('reset7')
+        elif self.context.student.state == REGISTERED:
+            IWorkflowInfo(self.context.student).fireTransition('reset7')
             message = _('Course list request has been rejected:')
             self.flash(message)
@@ -880,5 +880,5 @@
             return
         args = {'subject':message}
-        self.redirect(self.url(self.context.getStudent()) +
+        self.redirect(self.url(self.context.student) +
             '/contactstudent?%s' % urlencode(args))
         return
@@ -938,5 +938,5 @@
     def label(self):
         return _('${a}: Course Ticket ${b}', mapping = {
-            'a':self.context.getStudent().display_fullname,
+            'a':self.context.student.display_fullname,
             'b':self.context.code})
 
@@ -1068,5 +1068,5 @@
     def label(self):
         return _('${a}: Online Payment Ticket ${b}', mapping = {
-            'a':self.context.getStudent().display_fullname,
+            'a':self.context.student.display_fullname,
             'b':self.context.p_id})
 
@@ -1129,9 +1129,9 @@
         #    self.redirect(self.url(self.context))
         #    return
-        studentview = StudentBaseDisplayFormPage(self.context.getStudent(),
+        studentview = StudentBaseDisplayFormPage(self.context.student,
             self.request)
         students_utils = getUtility(IStudentsUtils)
         return students_utils.renderPDF(self, 'payment_slip.pdf',
-            self.context.getStudent(), studentview, note=self.note)
+            self.context.student, studentview, note=self.note)
 
 
@@ -1208,5 +1208,5 @@
 
     def update(self, SUBMIT=None):
-        student = self.context.getStudent()
+        student = self.context.student
         students_utils = getUtility(IStudentsUtils)
         acc_details  = students_utils.getAccommodationDetails(student)
@@ -1285,5 +1285,5 @@
             # expect an exception, but the owner might be different
             if not invalidate_accesscode(
-                pin,comment,self.context.getStudent().student_id):
+                pin,comment,self.context.student.student_id):
                 self.flash(_('You are not the owner of this access code.'))
                 return
@@ -1349,10 +1349,10 @@
 
     def render(self):
-        studentview = StudentBaseDisplayFormPage(self.context.getStudent(),
+        studentview = StudentBaseDisplayFormPage(self.context.student,
             self.request)
         students_utils = getUtility(IStudentsUtils)
         return students_utils.renderPDF(
             self, 'bed_allocation.pdf',
-            self.context.getStudent(), studentview)
+            self.context.student, studentview)
 
 class BedTicketRelocationPage(UtilityView, grok.View):
@@ -1366,5 +1366,5 @@
     # of the bed has changed
     def update(self):
-        student = self.context.getStudent()
+        student = self.context.student
         students_utils = getUtility(IStudentsUtils)
         acc_details  = students_utils.getAccommodationDetails(student)
@@ -1496,5 +1496,5 @@
 
     def update(self):
-        if self.context.getStudent().state != ADMITTED:
+        if self.context.student.state != ADMITTED:
             emit_lock_message(self)
             return
@@ -1676,15 +1676,15 @@
             # expect an error, but the owner might be different
             if not invalidate_accesscode(
-                pin,comment,self.context.getStudent().student_id):
+                pin,comment,self.context.student.student_id):
                 self.flash(_('You are not the owner of this access code.'))
                 return
-        if self.context.getStudent().state == CLEARED:
-            IWorkflowInfo(self.context.getStudent()).fireTransition(
+        if self.context.student.state == CLEARED:
+            IWorkflowInfo(self.context.student).fireTransition(
                 'pay_first_school_fee')
-        elif self.context.getStudent().state == RETURNING:
-            IWorkflowInfo(self.context.getStudent()).fireTransition(
+        elif self.context.student.state == RETURNING:
+            IWorkflowInfo(self.context.student).fireTransition(
                 'pay_school_fee')
-        elif self.context.getStudent().state == PAID:
-            IWorkflowInfo(self.context.getStudent()).fireTransition(
+        elif self.context.student.state == PAID:
+            IWorkflowInfo(self.context.student).fireTransition(
                 'pay_pg_fee')
         self.flash(_('Session started.'))
@@ -1710,5 +1710,5 @@
 
     def update(self):
-        if self.context.getStudent().state != PAID:
+        if self.context.student.state != PAID:
             emit_lock_message(self)
             return
@@ -1742,5 +1742,5 @@
 
     def update(self):
-        if self.context.getStudent().state != PAID:
+        if self.context.student.state != PAID:
             emit_lock_message(self)
             return
@@ -1799,5 +1799,5 @@
                 mapping = {'a':self.max_credits}))
             return
-        IWorkflowInfo(self.context.getStudent()).fireTransition(
+        IWorkflowInfo(self.context.student).fireTransition(
             'register_courses')
         self.flash(_('Course list has been registered.'))
@@ -1814,5 +1814,5 @@
 
     def update(self):
-        if self.context.getStudent().state != PAID:
+        if self.context.student.state != PAID:
             emit_lock_message(self)
             return
@@ -1823,5 +1823,5 @@
     def addCourseTicket(self, **data):
         # Safety belt
-        if self.context.getStudent().state != PAID:
+        if self.context.student.state != PAID:
             return
         ticket = createObject(u'waeup.CourseTicket')
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/export.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/export.py	(revision 8735)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/export.py	(revision 8736)
@@ -146,5 +146,5 @@
             value = value.code
         if name == 'student_id' and context is not None:
-            student = context.getStudent()
+            student = context.student
             value = getattr(student, name, None)
         return super(
@@ -181,5 +181,5 @@
         """
         if name == 'student_id' and context is not None:
-            student = context.getStudent()
+            student = context.student
             value = getattr(student, name, None)
         return super(
@@ -214,5 +214,5 @@
         """
         if context is not None:
-            student = context.getStudent()
+            student = context.student
             if name == 'student_id' and student is not None:
                 value = getattr(student, name, None)
@@ -251,5 +251,5 @@
         """
         if context is not None:
-            student = context.getStudent()
+            student = context.student
             if name in ['student_id'] and student is not None:
                 value = getattr(student, name, None)
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py	(revision 8735)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py	(revision 8736)
@@ -132,8 +132,5 @@
 
     """
-    def getStudent():
-        """Return student object.
-
-        """
+    student = Attribute('Student object of context.')
 
     def writeLogMessage(view, message):
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/payments.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/payments.py	(revision 8735)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/payments.py	(revision 8736)
@@ -40,5 +40,6 @@
         return
 
-    def getStudent(self):
+    @property
+    def student(self):
         return self.__parent__
 
@@ -58,5 +59,6 @@
         return
 
-    def getStudent(self):
+    @property
+    def student(self):
         try:
             return self.__parent__.__parent__
@@ -68,5 +70,5 @@
 
     def _createActivationCodes(self):
-        student = self.getStudent()
+        student = self.student
         if self.p_category == 'clearance':
             # Create CLR access code
@@ -132,20 +134,20 @@
     def display_fullname(self):
         "Name of  payee."
-        return self.context.getStudent().display_fullname
+        return self.context.student.display_fullname
 
     @property
     def id(self):
         "Id of payee"
-        return self.context.getStudent().student_id
+        return self.context.student.student_id
 
     @property
     def faculty(self):
         "Faculty of payee"
-        return self.context.getStudent().faccode
+        return self.context.student.faccode
 
     @property
     def department(self):
         "Department of payee"
-        return self.context.getStudent().depcode
+        return self.context.student.depcode
 
 # Student online payments must be importable. So we might need a factory.
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/student.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/student.py	(revision 8735)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/student.py	(revision 8736)
@@ -96,5 +96,6 @@
         return history
 
-    def getStudent(self):
+    @property
+    def student(self):
         return self
 
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/studycourse.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/studycourse.py	(revision 8735)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/studycourse.py	(revision 8736)
@@ -40,5 +40,6 @@
         return
 
-    def getStudent(self):
+    @property
+    def student(self):
         return self.__parent__
 
@@ -51,8 +52,8 @@
         if certificate == None:
             return False
-        if self.getStudent().state in (CLEARED, RETURNING):
+        if self.student.state in (CLEARED, RETURNING):
             return True
-        if self.getStudent().state == PAID \
-            and self.getStudent().is_postgrad:
+        if self.student.state == PAID \
+            and self.student.is_postgrad:
             return True
         return False
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/studylevel.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/studylevel.py	(revision 8735)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/studylevel.py	(revision 8736)
@@ -41,6 +41,10 @@
         return
 
-    def getStudent(self):
-        return getattr(getattr(self, '__parent__', None), '__parent__', None)
+    @property
+    def student(self):
+        try:
+            return self.__parent__.__parent__
+        except AttributeError:
+            return None
 
     def writeLogMessage(self, view, message):
@@ -101,8 +105,8 @@
         return
 
-    def getStudent(self):
+    @property
+    def student(self):
         """Get the associated student object.
         """
-        # XXX: shouldn't that be an attribute?
         try:
             return self.__parent__.__parent__.__parent__
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/viewlets.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/viewlets.py	(revision 8735)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/viewlets.py	(revision 8736)
@@ -74,5 +74,5 @@
 
     def render(self):
-        url = self.view.url(self.context.getStudent(), self.link)
+        url = self.view.url(self.context.student, self.link)
         # Here we know that the cookie has been set
         lang = self.request.cookies.get('kofa.language')
@@ -89,5 +89,5 @@
     def render(self):
         slip = getUtility(IExtFileStore).getFileByContext(
-            self.context.getStudent(), attr=self.link)
+            self.context.student, attr=self.link)
         if slip:
             url = self.view.url(self.context,self.link)
@@ -266,5 +266,5 @@
     @property
     def target_url(self):
-        if self.context.getStudent().state != REGISTERED or \
+        if self.context.student.state != REGISTERED or \
             str(self.context.__parent__.current_level) != self.context.__name__:
             return ''
@@ -282,5 +282,5 @@
     @property
     def target_url(self):
-        if self.context.getStudent().state not in (VALIDATED, REGISTERED) or \
+        if self.context.student.state not in (VALIDATED, REGISTERED) or \
             str(self.context.__parent__.current_level) != self.context.__name__:
             return ''
@@ -456,5 +456,5 @@
     @property
     def target_url(self):
-        student = self.view.context.getStudent()
+        student = self.view.context.student
         condition1 = student.state != PAID
         condition2 = str(student['studycourse'].current_level) in \
@@ -474,5 +474,5 @@
     @property
     def target_url(self):
-        student = self.view.context.getStudent()
+        student = self.view.context.student
         condition1 = student.state != PAID
         condition2 = student[
@@ -545,5 +545,5 @@
             '/students/%s' % self.request.principal.id)
         #app_slip = getUtility(IExtFileStore).getFileByContext(
-        #    self.context.getStudent(), 'application_slip')
+        #    self.context.student, 'application_slip')
         targets = []
         #if app_slip:
Index: /main/waeup.kofa/trunk/src/waeup/kofa/utils/helpers.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/utils/helpers.py	(revision 8735)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/utils/helpers.py	(revision 8736)
@@ -693,5 +693,5 @@
     # (applyData does this only for the context)
     if 'certificate' in changed_fields:
-        notify(grok.ObjectModifiedEvent(view.context.getStudent()))
+        notify(grok.ObjectModifiedEvent(view.context.student))
     fields_string = ' + '.join(changed_fields)
     view.flash(_('Form has been saved.'))
