• Publicity: Public Only All

grading-procs.tcl

Test Item grading procs - support for different kind of grading types and schemes.

This file defines the following Objects and Classes: ::xowf::test_item::grading::Grading[i], ::xowf::test_item::grading::GradingRoundPoints[i], ::xowf::test_item::grading::GradingRoundPercentage[i], ::xowf::test_item::grading::GradingRoundNone[i], ::xowf::test_item::grading::GradingNone[i]

Location:
packages/xowf/tcl/grading-procs.tcl
Author:
Gustaf Neumann

Procedures in this file

Detailed information

Class ::xowf::test_item::grading::Grading (public)

 ::nx::Class ::xowf::test_item::grading::Grading[i]

Superclass representing a generic grading

Partial Call Graph (max 5 caller/called nodes):
%3 _ _ (public) xo::show_stack xo::show_stack Class ::xowf::test_item::grading::Grading Class ::xowf::test_item::grading::Grading Class ::xowf::test_item::grading::Grading->_ Class ::xowf::test_item::grading::Grading->xo::show_stack

Testcases:
No testcase defined.

Class ::xowf::test_item::grading::GradingNone (public)

 ::nx::Class ::xowf::test_item::grading::GradingNone[i]

Grading scheme, which omits grading at all.

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

Class ::xowf::test_item::grading::GradingRoundNone (public)

 ::nx::Class ::xowf::test_item::grading::GradingRoundNone[i]

Implements a grading with no special rounding.

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

Class ::xowf::test_item::grading::GradingRoundPercentage (public)

 ::nx::Class ::xowf::test_item::grading::GradingRoundPercentage[i]

Implements a grading expressed as a rounded percentage

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

Class ::xowf::test_item::grading::GradingRoundPoints (public)

 ::nx::Class ::xowf::test_item::grading::GradingRoundPoints[i]

Implements a grading expressed as a rounded number of points

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

xowf::test_item::grading::Grading method grading_dict (public)

 <instance of xowf::test_item::grading::Grading[i]> grading_dict \
    achieved_points

Important dict members of "achieved_points": - achievedPoints: points that the student has achieved in her exam - achievablePoints: points that the student could have achieved so far - totalPoints: points that the student can achieve when finishing the exam achieved_points: {achievedPoints 4.0 achievablePoints 4 totalPoints 4} percentage_mapping: {50.0 60.0 70.0 80.0} While "achievedPoints" and "achievablePoints" are calculated by iterating over the submitted values, "totalPoints" contains the sum of points of all questions of the exam, no matter if these were answered or not.

Parameters:
achieved_points

Partial Call Graph (max 5 caller/called nodes):
%3 xo::show_stack xo::show_stack xowf::test_item::grading::Grading instproc grading_dict xowf::test_item::grading::Grading instproc grading_dict xowf::test_item::grading::Grading instproc grading_dict->xo::show_stack

Testcases:
No testcase defined.

xowf::test_item::grading::Grading method print (public)

 <instance of xowf::test_item::grading::Grading[i]> print \
    -achieved_points achieved_points 

Return a dict containing the members "panel" and "csv" depending on the type of rounding options

Switches:
-achieved_points
(required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::grading::Grading instproc print xowf::test_item::grading::Grading instproc print test_create_test_items->xowf::test_item::grading::Grading instproc print _ _ (public) xowf::test_item::grading::Grading instproc print->_

Testcases:
create_test_items

xowf::test_item::grading::GradingNone method grade (public)

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

No grading scheme defined, return grading 0.

Switches:
-achieved_points
(required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowf::test_item::grading::GradingNone instproc grade xowf::test_item::grading::GradingNone instproc grade test_create_test_items->xowf::test_item::grading::GradingNone instproc grade

Testcases:
create_test_items

xowf::test_item::grading::GradingRoundNone method grade (public)

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

Return a numeric grade for an exam submission based with no special rounding (2 digits). On invalid data, return 0.

Switches:
-achieved_points
(required)

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

xowf::test_item::grading::GradingRoundPercentage method grade (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)

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

xowf::test_item::grading::GradingRoundPoints method grade (public)

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

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

Switches:
-achieved_points
(required)

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

xowf::test_item::grading::load_grading_schemes (public)

 xowf::test_item::grading::load_grading_schemes -package_id package_id \
    -parent_id parent_id

Load the actual grading scheme objects defined for the package_id and parent_id. It might be the case that this function is called multiple times by a single request (when e.g. multiple exams are on a single page). So we are caching the result to avoid repeated computations of the same result.

Switches:
-package_id
(required)
-parent_id
(required)

Partial Call Graph (max 5 caller/called nodes):
%3 Class ::xowf::test_item::Answer_manager Class ::xowf::test_item::Answer_manager (public) xowf::test_item::grading::load_grading_schemes xowf::test_item::grading::load_grading_schemes Class ::xowf::test_item::Answer_manager->xowf::test_item::grading::load_grading_schemes xowf::test_item::Answer_manager instproc grading_scheme xowf::test_item::Answer_manager instproc grading_scheme (public) xowf::test_item::Answer_manager instproc grading_scheme->xowf::test_item::grading::load_grading_schemes xowf::test_item::grading::grading_scheme_wf_item_id xowf::test_item::grading::grading_scheme_wf_item_id (private) xowf::test_item::grading::load_grading_schemes->xowf::test_item::grading::grading_scheme_wf_item_id

Testcases:
No testcase defined.
[ show source ]