[13025] | 1 | .. _students_browser: |
---|
| 2 | |
---|
[13076] | 3 | Browsing the Students Section |
---|
| 4 | ============================= |
---|
[13025] | 5 | |
---|
[13048] | 6 | The reader may ask: How do officers and students browse the portal? |
---|
| 7 | Where are the step-by-step operating instructions on how to use |
---|
| 8 | Kofa? We are always tempted to answer: The menu navigation should be |
---|
| 9 | self-explanatory and it's quite easy to follow the menu prompts or |
---|
| 10 | flash messages which appear above page titles in a green, yellow or |
---|
| 11 | red box. For the students section this answer seems a bit over the |
---|
| 12 | top. We must indeed describe some browser pages and what their |
---|
| 13 | clickable actions are doing with the data. The reason is, that a lot |
---|
| 14 | of Kofa's functionality is embedded in view and utility methods and |
---|
| 15 | not only provided by the functionality of content components as |
---|
| 16 | described above. |
---|
[13025] | 17 | |
---|
[13078] | 18 | .. _navigation_bar: |
---|
[13028] | 19 | |
---|
[13078] | 20 | Navigation Bar |
---|
| 21 | ============== |
---|
| 22 | |
---|
| 23 | |
---|
| 24 | |
---|
| 25 | |
---|
| 26 | |
---|
[13028] | 27 | .. _page_layout: |
---|
| 28 | |
---|
[13025] | 29 | Page Layout |
---|
| 30 | =========== |
---|
| 31 | |
---|
[13048] | 32 | Kofa makes use of two different `Bootstrap`_ layouts. Anonymous |
---|
| 33 | users, students and applicants do see a single-column theme with |
---|
| 34 | only a static top navigation bar. Students can navigate to the |
---|
[13055] | 35 | various display form pages of their record by pulling down the 'My |
---|
[13078] | 36 | Data' tab in the navigation bar. |
---|
[13025] | 37 | |
---|
[13048] | 38 | Officers see a double-column theme after logging in. The left column |
---|
| 39 | contains a box which contains links to the user's preferences (My |
---|
| 40 | Preferences) and roles (My Roles). It also contains links to the |
---|
| 41 | various sections of Kofa depending on the permissions the officer |
---|
| 42 | has has obtained. Possible sections are: 'Portal Configuration', |
---|
| 43 | 'Officers', 'Data Center', 'Reports' and 'Access Codes'. A second |
---|
| 44 | box shows up in the left column when the officer accesses a student |
---|
[13054] | 45 | record. This box gives direct access to the pages of a |
---|
[13048] | 46 | student record. |
---|
[13026] | 47 | |
---|
[13028] | 48 | |
---|
| 49 | .. _manage_edit_pages: |
---|
| 50 | |
---|
[13054] | 51 | Views, Pages and Form Pages |
---|
| 52 | =========================== |
---|
[13026] | 53 | |
---|
[13054] | 54 | Views are dealing with request and response objects. Usually a view |
---|
| 55 | renders (produces) HTML or PDF code to be displayed in a web browser |
---|
| 56 | or a pdf reader respectively. Very often a view only redirects to |
---|
| 57 | another view or page and does not render code by itself. |
---|
| 58 | Views, which render pdf code, are called pdf slips in Kofa. |
---|
[13026] | 59 | |
---|
[13054] | 60 | Kofa pages are 'layout-aware' browser views, which means they know |
---|
| 61 | about the global page layout and render content inside it. |
---|
| 62 | |
---|
| 63 | In Kofa most pages are form pages which means they are layout-aware |
---|
| 64 | views on data. These pages are either used to submit data (simple form |
---|
| 65 | page), or to display, edit or add persistant data. The latter three |
---|
| 66 | are called display, edit or add form pages respectively. Kofa is |
---|
| 67 | using the `Zope Formlib`_ package to auto-generate these forms. |
---|
| 68 | |
---|
[13026] | 69 | .. note:: |
---|
| 70 | |
---|
[13048] | 71 | Briefly, Zope Formlib is wedded to `Zope Schema`_, it provides |
---|
| 72 | display and input widgets (= views) for the fields defined in the |
---|
| 73 | Zope Schema package. Auto-generation is done with `grok.AutoFields` |
---|
| 74 | which takes the fields, declared in an interface, and renders |
---|
| 75 | display or input widgets, according to the schema declaration, for |
---|
| 76 | display or edit forms respectively. |
---|
[13026] | 77 | |
---|
[13048] | 78 | Whereas display and add form pages are usually shared by officers |
---|
| 79 | and students, edit form pages are not. Students are not allowed to |
---|
| 80 | edit all of their data all the time. Edit access is restricted by |
---|
| 81 | workflow states or other conditions. Officers' access is much less |
---|
[13072] | 82 | restricted, and we therefore speak of 'managing' instead of 'editing' |
---|
[13048] | 83 | data. In most cases, Kofa uses two different form pages which |
---|
| 84 | require different permissions: An `EditFormPage` requires the |
---|
| 85 | :py:class:`HandleStudent<waeup.kofa.students.permissions.HandleStudent>` |
---|
| 86 | permission and a `ManageFormPage` requires the |
---|
| 87 | :py:class:`ManageStudent<waeup.kofa.students.permissions.ManageStudent>` |
---|
| 88 | permission. |
---|
[13026] | 89 | |
---|
[13028] | 90 | |
---|
| 91 | .. _action_buttons: |
---|
| 92 | |
---|
[13025] | 93 | Action Buttons |
---|
| 94 | ============== |
---|
| 95 | |
---|
[13026] | 96 | There are two kinds of action buttons which appear on pages: |
---|
[13025] | 97 | |
---|
[13026] | 98 | - **Link Buttons** appear on top of the page above the page |
---|
| 99 | title and are decorated with an icon. These |
---|
| 100 | :py:class:`action |
---|
| 101 | buttons<waeup.kofa.browser.viewlets.ActionButton>` have a |
---|
| 102 | link target which means they usually refer to another Kofa |
---|
| 103 | page and are sending GET requests to open the page. |
---|
[13025] | 104 | |
---|
[13026] | 105 | - **Form Buttons** are submit buttons which appear below a form. |
---|
| 106 | They are HTML form actions which submit data by sending a |
---|
| 107 | POST request back to the form page. A form page method is |
---|
| 108 | called and processes the data or simply redirects to |
---|
| 109 | another Kofa page. |
---|
| 110 | |
---|
[13028] | 111 | |
---|
| 112 | .. _logging_in_as_student: |
---|
| 113 | |
---|
[13026] | 114 | Logging in as Student |
---|
| 115 | ===================== |
---|
| 116 | |
---|
[13048] | 117 | Officers with |
---|
| 118 | :py:class:`LoginAsStudent<waeup.kofa.students.permissions.LoginAsStudent>` |
---|
| 119 | permission do see a 'Login as student' button on student display |
---|
| 120 | pages which redirects to a page, where a temporary student password |
---|
| 121 | can be set by clicking a 'Set password now' form button. The |
---|
| 122 | temporary password is valid for 10 minutes. During this period the |
---|
| 123 | student can't login. The officer is being redirected to a login page |
---|
| 124 | which allows to directly login as student with pre-filled temporary |
---|
| 125 | credentials. The second page is to avoid that officers must remember |
---|
| 126 | the student credentials, have to logout from their own account and |
---|
| 127 | manually login as student via the regular login page. After 10 |
---|
| 128 | minutes the officer is automatically thrown out and the student is |
---|
| 129 | able to login again (if the officer hasn't changed the password). |
---|
| 130 | Attention: When logging in as student, the officer really |
---|
| 131 | impersonates the student. All actions are logged with the student id |
---|
| 132 | and not with the officer's user id. However, start of student |
---|
| 133 | impersonation is also logged, so that officers can be identified and |
---|
| 134 | fraudulent use can be discovered. |
---|
[13026] | 135 | |
---|
[13028] | 136 | |
---|
| 137 | .. _rejecting_clearance: |
---|
| 138 | |
---|
[13025] | 139 | Rejecting Clearance |
---|
| 140 | =================== |
---|
| 141 | |
---|
[13048] | 142 | When a clearance officer clicks the 'Save comment and reject |
---|
| 143 | clearance now' button, the `reject` action method of the |
---|
| 144 | :py:class:`StudentRejectClearancePage<waeup.kofa.students.browser.StudentRejectClearancePage>` |
---|
| 145 | is called. This method first checks, in which workflow state the |
---|
| 146 | student is, and fires a transition accordingly. Then the comment, |
---|
| 147 | which should explain why the request was requested, is saved twice |
---|
| 148 | in the `officer_comment` attribute of the student and in |
---|
| 149 | ``students.log``. As soon as the `clear` transition (d) is effected, |
---|
| 150 | an event handler clears the attribute again. The logfile message is |
---|
| 151 | permanent and ensures that the original cause of rejection can |
---|
| 152 | always be reconstructed. |
---|
[13028] | 153 | |
---|
[13054] | 154 | Finally, the method redirects to the `ContactStudentFormPage` and prefills |
---|
[13048] | 155 | the HTML form with the comment previously saved. The clearance |
---|
| 156 | officer can leave the comment as it is, or can modify the text to |
---|
| 157 | give more information about the reason of rejection. This comment |
---|
| 158 | will then be sent to the student by email. This comment is not saved, |
---|
| 159 | neither in the student object nor in the logfile. |
---|
[13028] | 160 | |
---|
| 161 | .. important:: |
---|
| 162 | |
---|
[13048] | 163 | All messages sent via Kofa contact forms are private. They are |
---|
| 164 | neither stored in the database nor in any logfile. The emails are |
---|
| 165 | also not forwarded to any other email address. Thus senders and |
---|
| 166 | recipients can be sure that nobody else is eavesdropping and the |
---|
| 167 | correspondence is kept secret. |
---|
[13028] | 168 | |
---|
[13046] | 169 | .. seealso:: |
---|
[13028] | 170 | |
---|
[13046] | 171 | :ref:`Clearance Handling Doctests <test_handle_clearance>` |
---|
| 172 | |
---|
| 173 | |
---|
[13028] | 174 | .. _transferring_students: |
---|
| 175 | |
---|
[13040] | 176 | Student Transfer |
---|
| 177 | ================ |
---|
[13025] | 178 | |
---|
[13048] | 179 | Transferring a student means enabling the student to study another |
---|
| 180 | programme. |
---|
[13028] | 181 | |
---|
[13048] | 182 | The simple but dirty way is to select another certificate and adjust |
---|
| 183 | study course attributes accordingly. Existing study levels can be |
---|
| 184 | either removed or, in case registered courses can be credited, left |
---|
| 185 | as they are. This simple way is tedious and also dangerous, because |
---|
| 186 | changes are not tracable. Only the logfile can tell us, that an |
---|
| 187 | officer has edited the student's data. The data of the previous |
---|
| 188 | study course are not backed up. They are lost. |
---|
[13028] | 189 | |
---|
[13048] | 190 | Kofa provides a more adequate, cleaner and tracable way of |
---|
| 191 | transferring students. It can make a backup of the entire study |
---|
| 192 | course container and create a new and empty container for the new |
---|
| 193 | study programme with only one click or even by batch processing. |
---|
[13028] | 194 | |
---|
[13048] | 195 | After clicking the 'Transfer student' button the |
---|
| 196 | `StudentTransferFormPage` opens and asks for the new certificate, |
---|
| 197 | current session, current level and current verdict. After submitting |
---|
| 198 | this form, the student transfer method checks if the old study |
---|
| 199 | course is complete and ready for transfer. It also checks if the |
---|
| 200 | number of possible transfers is not exceeded. Kofa allows two (2) |
---|
| 201 | transfers! Finally the copying process is started and history and |
---|
| 202 | logfile messages are added. |
---|
[13028] | 203 | |
---|
[13048] | 204 | The old study course container(s) can still be accessed via links on |
---|
[13054] | 205 | the current study course display form page. But, they can neither be |
---|
[13048] | 206 | edited, removed, exported or reimported. |
---|
[13028] | 207 | |
---|
[13046] | 208 | |
---|
[13028] | 209 | Batch Transferring Students |
---|
| 210 | --------------------------- |
---|
| 211 | |
---|
[13048] | 212 | Sometimes students of an entire study programme have to be |
---|
| 213 | transferred to another programme. This can be done with the |
---|
| 214 | :py:class:`StudentStudyCourseProcessor<waeup.kofa.students.batching.StudentStudyCourseProcessor>`. |
---|
| 215 | The import file must contain the following columns: `student_id` |
---|
| 216 | (or any other locator), `certificate`, `current_session`, |
---|
| 217 | `current_level` and `entry_mode`. Do not import `entry_session`. A |
---|
| 218 | transfer is automatically initialized if the `entry_mode` value is |
---|
| 219 | ``transfer``. |
---|
[13028] | 220 | |
---|
[13046] | 221 | |
---|
[13040] | 222 | Reverting Previous Transfers |
---|
| 223 | ---------------------------- |
---|
[13028] | 224 | |
---|
[13048] | 225 | Previous transfers can be reverted by opening the previous study |
---|
| 226 | course and clicking the 'Reactivate this study course (revert |
---|
| 227 | previous transfer)' button. This is a complete rollback of the last |
---|
| 228 | transfer. The current study mode will be irrevocably deleted and |
---|
| 229 | replaced by the previous study course. The second last study course |
---|
| 230 | will become the previous study course. |
---|
[13028] | 231 | |
---|
[13046] | 232 | |
---|
[13040] | 233 | .. _payment_tickets: |
---|
[13028] | 234 | |
---|
[13045] | 235 | Payments |
---|
| 236 | ======== |
---|
[13025] | 237 | |
---|
[13048] | 238 | The `PaymentsManageFormPage` is used by both students and students |
---|
| 239 | officers. The page tabulates existing payment tickets and allows to |
---|
| 240 | add or remove tickets. Officers can remove all payment tickets, |
---|
| 241 | students only those without a response code (`r_code`). Attention: |
---|
| 242 | Students can remove tickets without response code even if they have |
---|
| 243 | been marked paid. |
---|
[13025] | 244 | |
---|
[13048] | 245 | There are three different add form pages to add |
---|
| 246 | `StudentOnlinePayment` instances (= payment tickets). They all |
---|
| 247 | create objects of the same type, only their attributes are set |
---|
| 248 | differently. |
---|
[13040] | 249 | |
---|
[13046] | 250 | |
---|
[13040] | 251 | Current Session Payment Tickets |
---|
| 252 | ------------------------------- |
---|
| 253 | |
---|
[13048] | 254 | Current session payments are the regular payments which have to be |
---|
| 255 | made in each session to proceed to the next registration step. The |
---|
| 256 | add form provides a select box of available payment categories |
---|
| 257 | (`p_category`). After submitting the form, Kofa determines the total |
---|
| 258 | amount and sets attributes like payment item (`p_item`), payment |
---|
| 259 | session (`p_session`) and payment level (`p_level`) automatically. |
---|
| 260 | The Boolean `p_current` attribute is set ``True``. The creation |
---|
| 261 | datetime is stored in the `creation_date` attribute and is also used |
---|
| 262 | to construct the unique payment id (`p_id`). |
---|
[13040] | 263 | |
---|
| 264 | .. note:: |
---|
| 265 | |
---|
[13048] | 266 | Kofa always determines the total amount, including any fees charged |
---|
| 267 | by the school and its service providers. This is the amount which is |
---|
| 268 | authorized by students and finally submitted to one of the payment |
---|
| 269 | gateways. No fees can be added once the payment ticket is created. |
---|
| 270 | Payment tickets do not store any information about charged fees. |
---|
[13040] | 271 | |
---|
[13046] | 272 | |
---|
[13047] | 273 | Payment Ticket Redemption |
---|
| 274 | ------------------------- |
---|
[13041] | 275 | |
---|
[13048] | 276 | Directly after a student payment ticket has been paid - either by |
---|
| 277 | approval by an officer or by receiving a positive response from a |
---|
| 278 | payment gateway - the |
---|
| 279 | :py:meth:`redeemTicket<waeup.kofa.students.payments.StudentOnlinePayment.redeemTicket>` |
---|
| 280 | method is called. Depending on the category of the payment, an |
---|
| 281 | appropriate access or activation code is beeing created for the |
---|
| 282 | owner of the ticket. This code must be entered on certain form pages |
---|
| 283 | to activate the paid service or to access the next stage of the |
---|
| 284 | registration process. In other words, making a payment and redeeming |
---|
| 285 | a payment are two different steps. Successful payments do not |
---|
| 286 | automatically trigger any action in the portal but create a specifc |
---|
| 287 | access code which can be used to trigger access-code-related actions |
---|
| 288 | (see :ref:`accesscodes`). |
---|
[13041] | 289 | |
---|
[13048] | 290 | Until May 2015 also school fee payments had produced access codes, |
---|
| 291 | which enabled students to start the next session. Since software |
---|
| 292 | revision 12889, Kofa bypasses SFE access code creation and starts |
---|
| 293 | the next session automatically. |
---|
[13041] | 294 | |
---|
[13046] | 295 | |
---|
[13040] | 296 | Previous Session Payment Tickets |
---|
| 297 | -------------------------------- |
---|
| 298 | |
---|
[13048] | 299 | Previous session payments are additional payments which do not |
---|
| 300 | induce further actions in Kofa. Their sole purpose is to enable |
---|
| 301 | students to pay for services in previous sessions which they missed |
---|
| 302 | to pay. The add form for previous session payments allows the |
---|
| 303 | student to select the payment category, session and level by |
---|
| 304 | him/herself. |
---|
[13040] | 305 | |
---|
[13046] | 306 | |
---|
[13040] | 307 | Balance Payment Tickets |
---|
| 308 | ----------------------- |
---|
| 309 | |
---|
[13048] | 310 | Balance payments have been introduced to correct previously made |
---|
| 311 | payments. In some cases, students select the wrong payment category, |
---|
| 312 | or other things may have happened which led students pay less than |
---|
| 313 | expected. This can be balanced by paying a differential amount. |
---|
| 314 | Therefore, the add form for balance payments allows to freely choose |
---|
| 315 | the total amount to be paid. It also asks for the category, the |
---|
| 316 | session and the level the payment is meant for. Like previous |
---|
| 317 | session payments, balance payments do not induce further actions in |
---|
| 318 | Kofa. Both can be omitted in customized versions of Kofa if these |
---|
| 319 | features are not needed. |
---|
[13040] | 320 | |
---|
[13046] | 321 | .. _course_registration: |
---|
| 322 | |
---|
[13045] | 323 | Course Registration |
---|
| 324 | =================== |
---|
| 325 | |
---|
[13048] | 326 | Study levels are pre-filled with course tickets. When adding a study |
---|
| 327 | level, |
---|
| 328 | :py:meth:`StudentStudyCourse.addStudentStudyLevel<waeup.kofa.students.studycourse.StudentStudyCourse.addStudentStudyLevel>` |
---|
| 329 | automatically adds course tickets in two steps: |
---|
[13045] | 330 | |
---|
[13048] | 331 | 1. :py:meth:`StudentStudyLevel.addCertCourseTickets<waeup.kofa.students.studylevel.StudentStudyLevel.addCertCourseTickets>` |
---|
| 332 | is called which iterates over the certificate courses of the |
---|
| 333 | certificate container object in the academic section and creates |
---|
| 334 | course tickets if the `level` attribute matches. `title`, `fcode`, |
---|
| 335 | `dcode`, `credits`, `passmark` and `semester` are copied from the |
---|
| 336 | course object which is attached to the certificate course; |
---|
| 337 | `mandatory` is taken from the certificate course itself. Finally, |
---|
| 338 | `automatic` is set to ``True`` and `carry_over` to ``False.`` |
---|
[13045] | 339 | |
---|
[13048] | 340 | 2. The portal can be configured |
---|
| 341 | (`IConfigurationContainer.carry_over`) such that failed courses are |
---|
| 342 | automatically carried over from one session to the next. Failed |
---|
| 343 | course tickets from the previous level, i.e. tickets with a score |
---|
| 344 | below the passmark, are collected and 'copied' into the current |
---|
| 345 | study level container. The attributes `automatic` and `carry_over` |
---|
| 346 | are set to ``True``. |
---|
[13045] | 347 | |
---|
[13048] | 348 | In most cases such an automatically created course list is not |
---|
| 349 | perfect or even ready for submission to the course adviser. The list |
---|
| 350 | must be edited according to the student's needs. Students can select |
---|
| 351 | further courses, which they desire to attend, and can create |
---|
| 352 | additional course tickets, as long as the total number of credits do |
---|
| 353 | not exceed 50 (value customizable). Course tickets can also be |
---|
| 354 | removed. Whereas officers can remove any ticket from the list, |
---|
| 355 | students can remove only optional (non-mandatory) course tickets |
---|
| 356 | (condition customizable). |
---|
[13045] | 357 | |
---|
[13048] | 358 | The edit form page provides a 'Register course list' button which |
---|
[13052] | 359 | submits the course list to the course adviser for validation. If the |
---|
| 360 | course registration deadline |
---|
| 361 | (`ISessionConfiguration.coursereg_deadline`) is set and the |
---|
| 362 | registration period has expired, a late registration fee |
---|
[13053] | 363 | (`ISessionConfiguration.late_registration_fee`) is charged. This |
---|
[13052] | 364 | payment has to be made first, otherwise a warning message appears in |
---|
| 365 | the browser. |
---|
[13045] | 366 | |
---|
[13052] | 367 | Course advisers can't edit the registered/submitted course list, but |
---|
| 368 | they can validate or reject it by pressing the same-named link |
---|
| 369 | buttons. After pressing the 'Reject courses' button, Kofa redirects |
---|
[13054] | 370 | to the `ContactStudentFormPage` which can be used to inform the student |
---|
[13052] | 371 | about the reason of rejection. In contrast to clearance rejection, |
---|
| 372 | the message, which is being sent to the student by email, is neither |
---|
| 373 | stored in the database nor in the logfiles. |
---|
| 374 | |
---|
[13046] | 375 | .. seealso:: |
---|
[13045] | 376 | |
---|
[13046] | 377 | :ref:`Course List Validation Doctests <test_handle_courses>` |
---|
| 378 | |
---|
| 379 | |
---|
| 380 | .. _batch_editing_scores: |
---|
| 381 | |
---|
| 382 | Batch Editing Scores by Lecturers |
---|
| 383 | ================================= |
---|
| 384 | |
---|
[13048] | 385 | Lecturers cannot access student records directly. They don't have |
---|
[13076] | 386 | access to the students section. Instead, lecturers go to their course |
---|
[13048] | 387 | in the academic section and view or export lists of students who |
---|
| 388 | attended the course, either in a previous or in the current session. |
---|
| 389 | They do also see an 'Update scores' link button which opens the |
---|
| 390 | `EditScoresPage` if score editing is enabled for that department |
---|
| 391 | (`IDepartment.score_editing_disabled`) and |
---|
| 392 | `IConfigurationContainer.current_academic_session` has been set on |
---|
| 393 | the portal's configuration page. The `EditScoresPage` lists all |
---|
| 394 | students, who are attending the course in the current academic |
---|
| 395 | session. Score editing is allowed if the student's current session |
---|
| 396 | corresponds with the current academic session and the student is in |
---|
| 397 | state 'courses validated', see method |
---|
| 398 | :py:meth:`CourseTicket.editable_by_lecturer<waeup.kofa.students.studylevel.CourseTicket.editable_by_lecturer>`. |
---|
[13046] | 399 | |
---|
| 400 | .. seealso:: |
---|
| 401 | |
---|
| 402 | :ref:`Batch Editing Scores Doctests <test_batch_editing_scores>` |
---|
| 403 | |
---|
| 404 | |
---|
[13047] | 405 | .. _bed_tickets: |
---|
[13046] | 406 | |
---|
[13047] | 407 | Bed Tickets |
---|
| 408 | =========== |
---|
[13045] | 409 | |
---|
[13047] | 410 | Students can obtain a bed ticket if a series of conditions is met: |
---|
[13046] | 411 | |
---|
[13048] | 412 | - The current date must be inside the booking period (between |
---|
| 413 | `IHostelsContainer.startdate` and `IHostelsContainer.enddate`). |
---|
[13046] | 414 | |
---|
[13048] | 415 | - The student's current session must match the accommodation session |
---|
| 416 | (`IHostelsContainer.accommodation_session`). |
---|
[13040] | 417 | |
---|
[13047] | 418 | - A bed ticket for the same accommodation session does not exist. |
---|
| 419 | |
---|
[13048] | 420 | - The student must be in the correct workflow state |
---|
| 421 | (`IHostelsContainer.accommodation_states`). |
---|
[13047] | 422 | |
---|
| 423 | - A bed type, which fits to the student, can be determined. |
---|
| 424 | |
---|
| 425 | - A bed of that type is available. |
---|
| 426 | |
---|
| 427 | - The HOS activation code is not yet used. |
---|
| 428 | |
---|
| 429 | - The student is the owner of the activation code. |
---|
| 430 | |
---|
[13048] | 431 | The customizable utility method |
---|
| 432 | :py:meth:`getAccommodationDetails<waeup.kofa.students.utils.StudentsUtils.getAccommodationDetails>` |
---|
| 433 | composes a bed type string. Three criteria are checked: Is the |
---|
| 434 | student a new, a returning or a final year student? Is the student |
---|
| 435 | female or male? Has the student to be accommodated in a special |
---|
| 436 | hostel (`IHostel.special_handling`)? The resulting bed type string |
---|
| 437 | contains these information. Example: ``regular_female_fr`` means |
---|
| 438 | that a bed for a new female student in a regular hostel is wanted. |
---|
| 439 | If the student record allows to determine such a bed string, Kofa |
---|
| 440 | starts searching a proper bed space. |
---|
[13047] | 441 | |
---|
[13048] | 442 | Before Kofa searches for a free bed space, which meets the bed type |
---|
| 443 | criteria above, it checks if a bed space has already been allocated |
---|
| 444 | manually to the student. If so, then this bed is used, no matter |
---|
| 445 | whether the bed meets the criteria or not. (Theoretically, a male |
---|
| 446 | student can be accommodated in a hostel which is reserved for female |
---|
| 447 | students.) If no manually allocated bed space is found, Kofa |
---|
| 448 | searches for the right space. If bed booking is subject to a charge, |
---|
| 449 | Kofa also checks, if the student has entered a valid activation code, |
---|
| 450 | before delivering the bed coordinates to the student. |
---|
[13047] | 451 | |
---|
| 452 | |
---|
[13072] | 453 | Relocation |
---|
| 454 | ---------- |
---|
[13040] | 455 | |
---|
[13048] | 456 | Officers with `ManageHostels` permission do see a 'Relocate student' |
---|
[13054] | 457 | link button which calls the `BedTicketRelocationView`. This view |
---|
[13048] | 458 | relocates the student if student parameters or the bed type of the |
---|
| 459 | bed have changed. The `update` method of this view checks first, if |
---|
| 460 | the student has a 'reserved' bed space. Students in reserved beds |
---|
| 461 | are never subject to relocation. It checks secondly, if booking has |
---|
| 462 | been cancelled in the accommodation section but other bed space has |
---|
| 463 | been manually allocated after cancellation. Then this bed is used, |
---|
| 464 | no matter whether the bed meets the bed type criteria or not. If |
---|
| 465 | both checks are negative, Kofa searches for a free bed space, which |
---|
| 466 | meets the student's bed type criteria. Only if it finds a new and |
---|
| 467 | free bed space, it starts the relocation process by releasing the |
---|
| 468 | old bed, booking the new bed and designating the new bed in the bed |
---|
| 469 | ticket. |
---|
[13025] | 470 | |
---|
[13047] | 471 | .. seealso:: |
---|
[13025] | 472 | |
---|
[13047] | 473 | :ref:`Bed Space Booking Doctests <test_handle_accommodation>` |
---|
| 474 | |
---|
| 475 | |
---|
[13026] | 476 | .. _bootstrap: http://getbootstrap.com/ |
---|
| 477 | |
---|
| 478 | .. _zope schema: http://docs.zope.org/zope.schema |
---|
| 479 | |
---|
| 480 | .. _zope formlib: http://bluebream.zope.org/doc/1.0/manual/schema.html#auto-generated-forms-using-the-forms-package |
---|