source: main/waeup.kofa/trunk/docs/source/userdocs/students/browser.rst @ 13054

Last change on this file since 13054 was 13054, checked in by Henrik Bettermann, 9 years ago

Describe more precisely views, pages and form pages.

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