Class SeminarEvaluationHelperService

java.lang.Object
ch.tocco.nice2.optional.seminarqualification.impl.SeminarEvaluationHelperService

@Component public class SeminarEvaluationHelperService extends Object
helper service to extract common logic from OldSeminarQualificationEventCopyExtension and SeminarQualificationEventCopyExtension this should probably be merged back into the extension once the old once can be removed
  • Constructor Details

  • Method Details

    • getEvaluationsFromPreviousEvents

      public Stream<Tuple2<Entity,Entity>> getEvaluationsFromPreviousEvents(Entity copiedEvent)
      find all Evaluations from other Events in the Seminar and find the Evaluation they have been copied from. this happens by traversing the entire Event module tree, as well as the tree of each Evaluation we find in the Events. this might very well find the same Evaluation twice, but they are then simply discarded when building the cache map. situations this will not work in: - the same Evaluation_node connected to the same event multiple times -- this is an incorrect setup and would lead to problems with input and calculation of grades, can be ignored - Evaluations have been moved to different Events by hand -- this means the setup no longer corresponds to its template, so logic depending on it can no longer be expected to work - Evaluations on the template change after starting -- same situation as above
      Parameters:
      copiedEvent - the newly copied event
      Returns:
      a map using primary keys of original evaluation as keys, and their copied evaluations as values