Package de.hsh.graja.core.result
Enum Class Grade
- All Implemented Interfaces:
Serializable
,Comparable<Grade>
,Constable
Grading aspects get a grade by a module runner. This enum represents the different grades that
can be awarded.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAn aspect is CORRECT, if there are no errors in it.An aspect is DELAYED, if the module runner cannot award a final grade to the aspect, because that depends on manual or other processes that have take place after the module runner finishes.An aspect is MISSING, if a module runner did not grade an aspect at all.An aspect is a SUBSEQUENT_ERROR, if a successful grading depends on other aspects to be correct.An aspect has a TIMEOUT, if the module runner runs out of time when grading the aspect.An aspect is WRONG, if the submission does not fully adhere to the requirements. -
Method Summary
Modifier and TypeMethodDescriptionstatic String
getDisplayname
(Iterable<Grade> grades) boolean
static boolean
A collection of several aspects is CORRECT only, if all contained aspects are CORRECT.boolean
isFaulty()
A grade is faulty, if it is either WRONG or TIMEOUT or SEUBSEQUENT_ERROR or MISSING.static boolean
A collection of several aspects is faulty, if it contains at least one aspect that is either WRONG or TIMEOUT or SEUBSEQUENT_ERROR or MISSING.static Grade
Returns the enum constant of this class with the specified name.static Grade[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CORRECT
An aspect is CORRECT, if there are no errors in it. A correct solution usually gets full score from an evaluator. -
WRONG
An aspect is WRONG, if the submission does not fully adhere to the requirements. Contrast WRONG with the other non-correct grades. WRONG aspects are incorrect by themselves. If an aspect was not graded as correct because there was a timeout, a delay or a dependency from other aspects, use one of the other faulty grades such as TIMEOUT, DELAYED, or SUBSEQUENT_ERROR. -
SUBSEQUENT_ERROR
An aspect is a SUBSEQUENT_ERROR, if a successful grading depends on other aspects to be correct. -
TIMEOUT
An aspect has a TIMEOUT, if the module runner runs out of time when grading the aspect. -
DELAYED
An aspect is DELAYED, if the module runner cannot award a final grade to the aspect, because that depends on manual or other processes that have take place after the module runner finishes. -
MISSING
An aspect is MISSING, if a module runner did not grade an aspect at all. The reasons is highly module runner dependent. Maybe it is a programming error in the module.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getDisplayName
-
isCorrect
A collection of several aspects is CORRECT only, if all contained aspects are CORRECT. An empty set of grades is correct by definition.- Parameters:
grades
- a collection of Grades- Returns:
- true, if the given collection is CORRECT
-
isFaulty
A collection of several aspects is faulty, if it contains at least one aspect that is either WRONG or TIMEOUT or SEUBSEQUENT_ERROR or MISSING. An empty set of grades is not faulty by definition.- Parameters:
grades
- a collection of Grades- Returns:
- true, if the given collection is faulty
-
getDisplayname
-
isFaulty
public boolean isFaulty()A grade is faulty, if it is either WRONG or TIMEOUT or SEUBSEQUENT_ERROR or MISSING.- Returns:
- true, if this is faulty
-
isCorrect
public boolean isCorrect()- Returns:
- true, if this grade equals CORRECT.
-