Package de.hsh.graja.transform
Class GradingSchemeCommentHelper
- java.lang.Object
-
- de.hsh.graja.transform.GradingSchemeCommentHelper
-
public class GradingSchemeCommentHelper extends Object
This class creates a grid of the following form
+---------------------------+---------------------------+ | Title | Result | +-+-------------------------+-------------------------+-+ | | Description | | | +---------------------------------------------------+ | | | Feedback (currently not used) | | | +---------------------------------------------------+ | | | Calculation rule | | leftbar| +-------------------------+-------------------------+ |rightbar + | | Title Subaspect | Result Subaspect | | + +----+ +-+-----------------------+-----------------------+-+ +----+ | | | Description, Feedback, Calculation rule | | | | | | further subaspects | | | | | | | | | | +-+-----------------------+-----------------------+-+ | | | Title Subaspect | Result Subaspect | | | +-+-----------------------+-----------------------+-+ | | | | ... | | | | | | | | | | | | | | | +-+-+-----------------------------------------------+-+-+
Every title/result row (or subtitle/subresult) defines a node of the grading scheme tree. A node is represented by the class
GradingSchemeCommentHelper.GshNode
.In the result or subresult cells icons can be rendered that allow folding and expanding the tree interactively.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GradingSchemeCommentHelper.GshNode
-
Field Summary
Fields Modifier and Type Field Description static FontWeightAndStyle
CONTENT_FWAS_INNER_NODES
static FontWeightAndStyle
CONTENT_FWAS_LEAVES
-
Constructor Summary
Constructors Constructor Description GradingSchemeCommentHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Sequence
createBasicNullificationExplanation(String title, String descriptionHtml, String internalDescriptionHtml, FontWeightAndStyle fwas)
static Content
createCompositeNullificationComment(boolean isSubmissionResult, String composeOp, List<Content> operands, FontWeightAndStyle fwas)
static GradingSchemeCommentHelper.GshNode
createInnerNode(String title, int level, String function, Number weight, Content nullifyExplanation, Number scoreAchievedAfterWeightingAndNullification, Number scoreAchievedAfterWeighting, Number rawScoreAchieved, Number scoreMax, String descriptionHtml, String internalDescriptionHtml, boolean useJavascript, List<GradingSchemeCommentHelper.GshNode> children)
static GradingSchemeCommentHelper.GshNode
createLeaf(String title, Number weight, Content nullifyExplanation, Number scoreAchievedAfterWeightingAndNullification, Number scoreAchievedAfterWeighting, Number rawScoreAchieved, Number scoreMax, String grade, Boolean gradeIsCorrect, Boolean gradeIsFaulty, String descriptionHtml, String internalDescriptionHtml, boolean useJavascript, Anchor href)
static FontWeightAndStyle
getContentFontWeightAndStyle(boolean isLeaf)
static Content
transformGradingSchemeIntoSequenceComment(GradingSchemeCommentHelper.GshNode theComments, boolean useJavascript)
-
-
-
Field Detail
-
CONTENT_FWAS_LEAVES
public static final FontWeightAndStyle CONTENT_FWAS_LEAVES
-
CONTENT_FWAS_INNER_NODES
public static final FontWeightAndStyle CONTENT_FWAS_INNER_NODES
-
-
Method Detail
-
getContentFontWeightAndStyle
public static FontWeightAndStyle getContentFontWeightAndStyle(boolean isLeaf)
-
createInnerNode
public static GradingSchemeCommentHelper.GshNode createInnerNode(String title, int level, String function, Number weight, Content nullifyExplanation, Number scoreAchievedAfterWeightingAndNullification, Number scoreAchievedAfterWeighting, Number rawScoreAchieved, Number scoreMax, String descriptionHtml, String internalDescriptionHtml, boolean useJavascript, List<GradingSchemeCommentHelper.GshNode> children)
-
createLeaf
public static GradingSchemeCommentHelper.GshNode createLeaf(String title, Number weight, Content nullifyExplanation, Number scoreAchievedAfterWeightingAndNullification, Number scoreAchievedAfterWeighting, Number rawScoreAchieved, Number scoreMax, String grade, Boolean gradeIsCorrect, Boolean gradeIsFaulty, String descriptionHtml, String internalDescriptionHtml, boolean useJavascript, Anchor href)
-
createBasicNullificationExplanation
public static Sequence createBasicNullificationExplanation(String title, String descriptionHtml, String internalDescriptionHtml, FontWeightAndStyle fwas)
-
createCompositeNullificationComment
public static Content createCompositeNullificationComment(boolean isSubmissionResult, String composeOp, List<Content> operands, FontWeightAndStyle fwas)
-
transformGradingSchemeIntoSequenceComment
public static Content transformGradingSchemeIntoSequenceComment(GradingSchemeCommentHelper.GshNode theComments, boolean useJavascript)
-
-