Grading

@Serializable
data class Grading(val style: String, val points: Map<String, Map<String, Int>>)(source)

Grade requirements in ascending progression order. Map iteration order is significant. The O1 style uses A/B/C categories. Higher categories fill lower-category requirements. The TOTAL style sums points across categories. Unknown styles are preserved so newer manifests remain readable by older consumers.

Constructors

Link copied to clipboard
constructor(style: String, points: Map<String, Map<String, Int>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Returns the grade reached with earned points per category and what the next grade requires. Returns null for invalid rules, unknown styles, and missing O1 earned categories. Total-style deficits above Int.MAX_VALUE are capped at that value.

Link copied to clipboard
fun validate()

Validates known grading styles. Unknown styles remain readable.