Package de.hsh.graja.core.result

The Graja result hierarchy is as follows:
  • At the root we have a Result object that contains one AssignmentResult object.
  • An AssignmentResult is the root of all results for a single assignment.
  • Below an AssignmentResult Graja stores AbstractGradingAspectResults in a successively deeper hierarchy.
  • Any result object in this complete hierarchy stores an achieved score and holds a link to the respective node in the request hierarchy. With this link, the maximum score at that specific result node is accessible.
  • Further with any result object we store comments. The number of comments varies depending on the level in the result hierarchy.
    • At the deepest level (GradingAspectResult) there is a single SequenceComment.
    • At higher levels there are always two comments: a leading SequenceComment and a trailing SequenceComment. When a node result is printed, the leading comment of the node is followed by all comments of subnodes, followed by the trailing comment of the node.
  • Sometimes things get severely wrong and Graja e. g. cannot unpack or compile a submission or it cannot find a specific class in the submission where several aspects should be inspected. In this situation the hierarchy might be pruned at higher levels, since it does not make sense to report every single aspect, when the submission even could not be unpacked. At higher levels of the hierarchy from AssignmentResult upwards all nodes inherit from the abstract super class FailableAbstractResultNode. These nodes can have a marker, that the respective node does not include useful result details.
  • Usually when Graja starts a specific process, eg. compiling, running a JUnit module, etc., Graja first instantiates an empty result Object. The empty result object serves as a comment logger during the process. The interface CommentLogger is implemented by almost all Result classes and can receive messages that need to be delivered to teachers or students. The CommentLogger takes care, that the messages are stored together with a link to the respective achieved score, so a learning management system could display comments and scores side by side.