learn-content-engine - v0.42.0
    Preparing search index...

    Function gradeFor

    • The verdict of a run that reached percent under evaluation.

      • pass_percent is inclusive: a run at the mark passes.
      • grades: the row with the highest min_percent the run reaches, in any row order. min_percent is a lower bound, so a run between two reachable points of a national scale (86.25 % on a 60-point scale) earns the upper grade, as the grading presets intend.
      • Pass the unrounded percent: the presets' thresholds assume it, and rounding first moves every boundary by up to half a point.
      • A declaration the validator refuses yields what it still determines: pass_fail without pass_percent has no passed, grades without a table has no grade.

      Throws a RangeError for a percent outside 0 to 100 or not a finite number: that is a consumer's scoring bug, and a verdict on it would hide it.

      Parameters

      • evaluation: ContentSetEvaluation
      • percent: number

      Returns EvaluationOutcome