Changeset 12882 for main


Ignore:
Timestamp:
24 Apr 2015, 10:07:26 (10 years ago)
Author:
Henrik Bettermann
Message:

More docs.

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

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/docs/source/userdocs/datacenter/import_processors.rst

    r12872 r12882  
    8383.. autoclass:: waeup.kofa.students.batching.StudentStudyLevelProcessor()
    8484  :noindex:
     85
     86.. note::
     87
     88  The student data processors described so far are mainly intended for restoring data. If the portal is operated correctly and without interruption and students follow the workflow from their first to the final study year, there is no need to use the above batch processors to maintain the data. The processors are not part of the student registration management. The following processors can or sometimes even must be integrated into the regular management of student data. Scores have to be imported, new payment tickets have to created, the verdicts have to be set or workflow transitions have to be triggered.
     89
     90Course Ticket Processor
     91-----------------------
     92
     93.. autoclass:: waeup.kofa.students.batching.CourseTicketProcessor()
     94  :noindex:
     95
     96Student Online Payment Processor
     97--------------------------------
     98
     99.. autoclass:: waeup.kofa.students.batching.StudentOnlinePaymentProcessor()
     100  :noindex:
     101
     102Verdict Processor
     103-----------------
     104
     105.. autoclass:: waeup.kofa.students.batching.StudentVerdictProcessor()
     106  :noindex:
  • main/waeup.kofa/trunk/src/waeup/kofa/students/batching.py

    r12873 r12882  
    607607
    608608class CourseTicketProcessor(StudentProcessorBase):
    609     """A batch processor for ICourseTicket objects.
     609    """The Course Ticket Processor imports course tickets, the subobjects
     610    of student study levels (= course lists).
     611
     612    An imported course ticket contains a copy of the original course data.
     613    During import only a few attributes can be set/overwritten.
     614
     615    Like all other student data importers, this processor also requires
     616    either `student_id`, `reg_number` or `matric_number` to find the student.
     617    Then  it needs `level` and `code` to localize the course ticket.
     618
     619    `checkConversion` first searches the courses catalog for the imported
     620    `code` and ensures that a course with such a code really exists
     621    in the academic section. It furthermore checks if `level_session` in
     622    the row corresponds with the session of the parent student
     623    study level object. It fails if one of the conditions is not met.
     624
     625    In create mode `fcode`, `dcode`, `title`, `credits`, `passmark` and
     626    `semester` are taken from the course found in the academic section.
     627    These attributes can nevermore be changed, neither via the user interface
     628    nor by import.
    610629    """
    611630    grok.implements(IBatchProcessor)
     
    710729
    711730class StudentOnlinePaymentProcessor(StudentProcessorBase):
    712     """A batch processor for IStudentOnlinePayment objects.
     731    """The Course Ticket Processor imports student payment tickets. The
     732    tickets are located in the ``payments`` subfolder of the student
     733    container. The only additional locator is `p_id`, the object id.
     734
     735    The `checkConversion` method checks the format of the payment identifier.
     736    In create mode it does also ensures that same p_id does not exist
     737    elsewhere. It must be portal-wide unique.
     738
     739    When adding a payment ticket, the `addEntry` method checks if the same
     740    payment has already been made. It compares `p_category` and `p_session`
     741    in the row with the corresponding attributes  of existing payment
     742    tickets in state ``paid``. If they match, a `DuplicationError` is raised.
    713743    """
    714744    grok.implements(IBatchProcessor)
     
    782812        p_id = row['p_id'].strip('#')
    783813        # Requirement added on 19/02/2015: same payment must not exist.
    784         #if not None in (obj.p_category, obj.p_session):
    785814        if self.samePaymentMade(student, obj.p_category, obj.p_session):
    786815            raise DuplicationError('Same payment has already been made.')
     
    846875
    847876class StudentVerdictProcessor(StudentStudyCourseProcessor):
    848     """A special batch processor for verdicts.
    849 
    850     Import verdicts and perform workflow transitions.
     877    """The Student Verdict Processor inherits from the Student Study
     878    Course Processor. It's a pure updater. Import step 2 raises a warning
     879    message if a datacenter manager tries to select another mode.
     880    But it does more than only overwriting study course attributes.
     881
     882    The Student Verdict Processor is the only processor which cannot be
     883    used for restoring data. Purpose is to announce a verdict at the end of
     884    each academic session. The processor does not only import a verdict,
     885    it also conditions the student data so that the student can pay for the
     886    next session and proceed to the next study level.
     887
     888    The `checkUpdateRequirements` method ensures that the imported data
     889    really correspond to the actual state of the student.
     890    `current_level` and `current_session` in the row must be on par
     891    with the attributes of the study course object. Thus, the processor
     892    does not use these values to overwrite the attributes of the study course
     893    but to control that the verdict is really meant for the current session of
     894    the student. The verdict is only imported if a corresponding study level
     895    object exists and the student is in the right registration state,
     896    either ``courses validated`` or ``courses registered``. Course registration
     897    can be bypassed by setting `bypass_validation` to ``True``.
     898
     899    The `updateEntry` method does not only update the current verdict of
     900    the student study course, it also updates the matching student study
     901    level object. It saves the current verdict as `level_verdict` and sets
     902    the `validated_by` and `validation_date` attributes, whereas `validated_by`
     903    is taken from the row of the import file and `validation_date` is set to the
     904    actual UTC datetime. Finally, the student is moved to state ``returning``.
    851905    """
    852906
     
    893947            obj, vals_to_set, site, filename)
    894948        parent = self.getParent(row, site)
    895         # Set current_vedict in corresponding studylevel
     949        # Set current_verdict in corresponding studylevel
    896950        level_string = str(obj.current_level)
    897951        obj[level_string].level_verdict = row['current_verdict']
  • main/waeup.kofa/trunk/src/waeup/kofa/students/studylevel.py

    r12873 r12882  
    257257
    258258    A course ticket contains a copy of the original course and
    259     certificate course data. If the courses and/or the referrin certificate
     259    certificate course data. If the courses and/or the referring certificate
    260260    courses are removed, the corresponding tickets remain unchanged.
    261     So we do not need any event
    262     triggered actions on course tickets.
     261    So we do not need any event triggered actions on course tickets.
    263262    """
    264263    grok.implements(ICourseTicket, IStudentNavigation)
Note: See TracChangeset for help on using the changeset viewer.