java.lang.Object
org.ametys.plugins.odfpilotage.report.consistency.AbstractConsistencyAnalysis
org.ametys.plugins.odfpilotage.report.consistency.impl.ECTSSumAnalysis
All Implemented Interfaces:
ConsistencyAnalysis, PluginAware, Prioritizable, Configurable, Serviceable

Analysis on ECTS sums at each level of the Program.
  • Constructor Details

  • Method Details

    • analyze

      Description copied from interface: ConsistencyAnalysis
      Analyze the program to find inconsistencies.
      Parameters:
      program - The program to analyze
      Returns:
      A List of lines as I18nizableText
    • _getErrorMessage

      protected Map<String,Object> _getErrorMessage(ProgramItem programItem, Double parentECTS, Double childrenECTS, int level)
      Get the I18nizableText representing the error message to display (with parameters).
      Parameters:
      programItem - The program element which is inconsistency
      parentECTS - Number of ECTS on the parent
      childrenECTS - Number of ECTS on the children
      level - the level of the line to retrieve (hierarchical level begins at 0 for the program)
      Returns:
      The error message
    • _controlECTS

      protected List<Map<String,Object>> _controlECTS(ProgramItem programItem, int level)
      Control the ECTS consistency between the current content and its children.
      Parameters:
      programItem - The ProgramItem to check ECTS consistency
      level - the level of the program item to control (hierarchical level begins at 0 for the program)
      Returns:
      The List of error messages
    • _getChildrenECTSSum

      protected Double _getChildrenECTSSum(ProgramItem programItem)
      Get the sum of the children of the current item. It calculates the coef if it's a CourseList.
      Parameters:
      programItem - The parent ProgramItem.
      Returns:
      The sum of children ECTS
    • _getECTS

      protected Double _getECTS(Content content)
      Get the ECTS of the current Content. The method is different if it's a Program or a Course for example.
      Parameters:
      content - The content
      Returns:
      The value in the ECTS field