Ignore:
Timestamp:
25 Apr 2015, 06:13:18 (10 years ago)
Author:
Henrik Bettermann
Message:

More docs.

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

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/batching.py

    r9706 r12883  
    3434
    3535class AccessCodeBatchProcessor(BatchProcessor):
    36     """A batch processor for IAccessCodeBatch objects.
     36    """The Access Code Batch Processor imports containers for access codes.
     37    It does not import their content. There is nothing special about this
     38    processor.
    3739    """
    3840    grok.implements(IBatchProcessor)
     
    8587
    8688class AccessCodeProcessor(BatchProcessor):
    87     """A batch processor for IAccessCode objects.
     89    """The Access Code Processor imports access codes (ac) into their
     90    batches. Localization requires the `representation` of the ac
     91    (object id) as well as  `batch_prefix` and `batch_num` to find
     92    the parent container (the batch).
     93
     94    Access codes follow a workflow. The `checkConversion` method validates
     95    the workflow `state` and `transition` in row. `checkUpdateRequirements`
     96    checks if the transition is allowed. This depends on the context.
    8897    """
    8998    grok.implements(IBatchProcessor)
     
    136145    def addEntry(self, obj, row, site):
    137146        parent = self.getParent(row, site)
    138         obj.batch_serial = row['batch_serial']
    139         obj.random_num = row['random_num']
    140147        parent[row['representation']] = obj
    141148        return
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/batching.py

    r11891 r12883  
    2727
    2828class HostelProcessor(BatchProcessor):
    29     """A batch processor for IHostel objects.
     29    """The Hostel Procesor imports hostels, i.e. the container objects of
     30    beds. It does not import beds. There is nothing special about this
     31    processor.
    3032    """
    3133    grok.implements(IBatchProcessor)
  • main/waeup.kofa/trunk/src/waeup/kofa/students/batching.py

    r12882 r12883  
    296296        errs, inv_errs, conv_dict =  converter.fromStringDict(
    297297            row, self.factory_name, mode=mode)
     298        # We cannot import both state and transition.
     299        if 'transition' in row and 'state' in row:
     300            if row['transition'] not in (IGNORE_MARKER, '') and \
     301                row['state'] not in (IGNORE_MARKER, ''):
     302                errs.append(('workflow','not allowed'))
     303                return errs, inv_errs, conv_dict
    298304        if 'transition' in row:
    299305            if row['transition'] not in IMPORTABLE_TRANSITIONS:
Note: See TracChangeset for help on using the changeset viewer.