%3 ::xowf::test_item::grading::GradingNone ::xowf::test_item::grading::GradingNone grade ::xowf::test_item::grading::Grading ::xowf::test_item::grading::Grading calc_grade grading_dict init print ::xowf::test_item::grading::GradingNone->::xowf::test_item::grading::Grading ::xowf::test_item::grading::GradingRoundNone ::xowf::test_item::grading::GradingRoundNone grade ::xowf::test_item::grading::GradingRoundNone->::xowf::test_item::grading::Grading ::xowf::test_item::grading::GradingRoundPoints ::xowf::test_item::grading::GradingRoundPoints grade ::xowf::test_item::grading::GradingRoundPoints->::xowf::test_item::grading::Grading ::xowf::test_item::grading::GradingRoundPercentage ::xowf::test_item::grading::GradingRoundPercentage grade ::xowf::test_item::grading::GradingRoundPercentage->::xowf::test_item::grading::Grading ::nx::Object ::nx::Object ::xowf::test_item::grading::Grading->::nx::Object

Class ::xowf::test_item::grading::GradingRoundPercentage

::xowf::test_item::grading::GradingRoundPercentage[i] create ... \
           [ -csv (default "$achievedPoints\t$percentage%\t$percentageRounded%\t$grade") ] \
           [ -percentage_boundaries:required percentage_boundaries:required ] \
           [ -precision (default "") ] \
           [ -title (default "") ]

Implements a grading expressed as a rounded percentage
Defined in packages/xowf/tcl/grading-procs.tcl

Class Relations

  • class: ::nx::Class[i]
  • superclass: ::xowf::test_item::grading::Grading[i]
::nx::Class create ::xowf::test_item::grading::GradingRoundPercentage \
     -superclass ::xowf::test_item::grading::Grading

Methods (to be applied on instances)

  • grade (scripted, public)

     <instance of xowf::test_item::grading::GradingRoundPercentage[i]> grade \
        -achieved_points achieved_points 

    Return a numeric grade for an exam submission based on rounded percentage. On invalid data, return 0.

    Switches:
    -achieved_points (required)

    Testcases:
    No testcase defined.
    set achieved_points [:grading_dict $achieved_points]
    if {[dict exists $achieved_points achievedPoints]} {
      dict with achieved_points {
        return [:calc_grade -percentage $percentageRounded]
      }
    }