Changeset 13168 for main


Ignore:
Timestamp:
14 Jul 2015, 20:17:10 (9 years ago)
Author:
Henrik Bettermann
Message:

More docs.

Location:
main/waeup.kofa/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/docs/source/userdocs/applicants/interfaces.rst

    r13104 r13168  
    11.. _applicants_interfaces:
    22
    3 Parent Containers
    4 =================
     3Parent Containers Interfaces
     4============================
    55
    66`IApplicantsRoot`
     
    8181<certificate>`.
    8282
    83 Applicant
    84 =========
     83Applicant Interfaces
     84====================
    8585
    8686As already mentioned, the applicant objects contains all information
     
    117117components only, it does not instantiate applicant objects.
    118118
    119 Applicant Payment
    120 =================
     119Applicant Payment Interfaces
     120============================
    121121
    122122`IApplicantOnlinePayment`
  • main/waeup.kofa/trunk/docs/source/userdocs/hostels.rst

    r13167 r13168  
    2121==========
    2222
     23`IHostelsContainer`
     24-------------------
     25
     26The unique hostels container serves also as a configuration object. It defines for which academic session booking is enabled. The student's `current_session` must match `accommodation_session`. It also defines the booking period and the registration workflow states for which booking is allowed, see :ref:`bed_tickets`. The only property attribute is `expired` which returns True if the current datetime is within the booking period.
    2327
    2428.. literalinclude:: ../../../src/waeup/kofa/hostels/interfaces.py
    2529   :pyobject: IHostelsContainer
    2630
     31`IHostel`
     32---------
     33
     34The hostels container contains the various `Hostel` objects. Hostels are  buildings with blocks, floors rooms and beds. When adding a hostel, the form page is requesting the hostel's name. The `hostel_id` is derived from the name by applying :code:`lower().replace(' ','-').replace('_','-')` to it. As usual, the id will be omitted in manage forms and can thus not be changed after hostel creation.
     35
     36The add and manage form pages let us define the 'dimensions' of the hostel and and configure blocks with their assignment to either female or male students. And they are requesting the number of floors per block as well as the number of rooms per floor. All blocks have the same number of floors with a fixed number of rooms and a fixed number of beds per room. If beds or even entire rooms do not exist on a floor, these beds must be later marked reserved, so that they are skipped during the automatic allocation process, see below.
     37
     38.. note::
     39
     40  Blocks for either female or male students? Does Kofa's hostel management accommodate girls and boys strictly separately? No, it doesn't. Blocks are not necessarily real buildings. They can be used as virtual subunits. If the entire hostel has only one block, then yes, either only female or only male students can be hosted in such a hostel. If two blocks are configured (one for male and one for female students), beds of the same room can be assigned to either the female or the male block, which means - even though very uncommon - girls and boys would be accommodated in the same room.
     41
    2742.. literalinclude:: ../../../src/waeup/kofa/hostels/interfaces.py
    2843   :pyobject: IHostel
    2944
     45Beds can be dedicated to pre-study students, fresh students (`entry_session` and the hostels container's `accommodation_session` correspond), final-year students (`current_level` and the certificate's `end_level` correspond, or is even higher) and returning students (non-fresh and non-final-year students). Or they can be made bookable for all students (beds without category). The latter bed type can be configured but is not being used in the base package by :py:meth:`getAccommodationDetails<waeup.kofa.students.utils.StudentsUtils.getAccommodationDetails>`, the method which determines the appropriate bed type of the student.
     46
     47Usually, not every student can be accommodated in every hostel. Faculties are sometimes far apart and do manage their own student hostels. These hostels require a 'special handling' in :py:meth:`getAccommodationDetails<waeup.kofa.students.utils.StudentsUtils.getAccommodationDetails>`. The special handling code must be set on the add and manage form pages of hostels.
     48
     49The interface defines also two schema invariants (invariant-decorated methods). These methods validate one or more depending schema fields. In our case, the methods take care that blocks and beds are not assigned twice.
     50
     51All the parameters above define the construction rules for beds when filling the hostel with beds, which is done by the `updateBeds` method described further below.
     52
     53`IBed`
     54------
     55
    3056.. literalinclude:: ../../../src/waeup/kofa/hostels/interfaces.py
    3157   :pyobject: IBed
     58
     59The `bed_id` contains the 'coordinates' of the bed. It tells us precisely in which hostel, in which block, on which floor and in which room the bed can be found. The bed id is composed as follows: ``[hostel id]_[block letter]_[room number]_[bed letter]``. The room number contains the floor level: :code:`room_nr = floor*100 + room`. Example: ``hall-1_A_101_C`` means, the bed is located in Hostel 1, block A, 1st floor, room 101 (or 1) and labelled with 'C'.
     60
     61The `bed_type` attribute is similarly being constructed. It describes which kind of student can be allocated: ``[special handling code]_[sex]_[stage]``. Example: ``regular_female_re`` means, this bed can be booked by regular female returning students. Other stages are: ``fr`` (fresh), ``pr`` (pre-study), ``fi`` (final-year) and ``all`` (all students).
  • main/waeup.kofa/trunk/docs/source/userdocs/students/browser.rst

    r13103 r13168  
    308308===========
    309309
     310Allocation
     311----------
     312
    310313Students can obtain a bed ticket if a series of conditions is met:
    311314
  • main/waeup.kofa/trunk/docs/source/userdocs/students/interfaces.rst

    r13078 r13168  
    11.. _students_interfaces:
    22
    3 Student
    4 =======
     3Student Interfaces
     4==================
    55
    66The `Student` class is a container class which means, there are not
     
    171171   :pyobject: IStudentNavigation
    172172
    173 Student Study Course
    174 ====================
     173Student Study Course Interfaces
     174===============================
    175175
    176176All data related to an individual course of study are stored with
     
    302302  to replace them by new tickets.
    303303
    304 Student Payment
    305 ===============
     304Student Payment Interfaces
     305==========================
    306306
    307307`IStudentOnlinePayment`
     
    320320   :pyobject: IStudentOnlinePayment
    321321
    322 Student Accommodation
    323 =====================
     322Student Accommodation Interfaces
     323================================
    324324
    325325`IBedTicket`
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/hostel.py

    r13166 r13168  
    114114                            bt = 're'
    115115                        bt = u'%s_%s_%s' % (self.special_handling,sex,bt)
    116                         uid = u'%s_%s_%d_%s' % (self.hostel_id,block,room_nr,bed)
     116                        uid = u'%s_%s_%d_%s' % (
     117                            self.hostel_id,block,room_nr,bed)
    117118                        if uid in self:
    118119                            bed = self[uid]
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py

    r13129 r13168  
    20652065                if bed.__parent__.__parent__ is None:
    20662066                    self.flash(_(
    2067                         'System error: Please contact the adminsitrator.'),
     2067                        'System error: Please contact the administrator.'),
    20682068                        type="warning")
    20692069                    self.context.writeLogMessage(
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/accommodationmanagepage.pt

    r11432 r13168  
    99      <th i18n:translate="">Booking Date</th>
    1010      <th i18n:translate="">Bed Coordinates</th>
    11       <th i18n:translate="">Bed Category</th>
     11      <th i18n:translate="">Bed Type</th>
    1212    </tr>
    1313    </thead>
Note: See TracChangeset for help on using the changeset viewer.