Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
tests\gradingform_rubric\generator\criterion Class Reference

Convenience class to create rubric criterion. More...

Public Member Functions

 __construct (string $description, array $levels=[])
 Constructor for this test_criterion object.
 
 add_level (string $definition, int $score)
 Adds levels to the criterion.
 
 get_all_level_values ()
 Get all level values.
 
 get_all_values (int $sortorder)
 Get all values in an array for use when creating a new guide.
 
 get_description ()
 Get the description for this criterion.
 
 get_levels ()
 Get the levels for this criterion.
 

Public Attributes

string $description
 $description A description of the criterion.
 
array $levels = []
 $levels The levels for this criterion.
 
integer $sortorder = 0
 $sortorder sort order of the criterion.
 

Detailed Description

Convenience class to create rubric criterion.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

tests\gradingform_rubric\generator\criterion::__construct ( string $description,
array $levels = [] )

Constructor for this test_criterion object.

Parameters
string$descriptionA description of this criterion.
array$levels

Member Function Documentation

◆ add_level()

tests\gradingform_rubric\generator\criterion::add_level ( string $definition,
int $score )

Adds levels to the criterion.

Parameters
string$definitionThe definition for this level.
int$scoreThe score received if this level is selected.
Return values
self

◆ get_all_level_values()

tests\gradingform_rubric\generator\criterion::get_all_level_values ( )

Get all level values.

Return values
array

◆ get_all_values()

tests\gradingform_rubric\generator\criterion::get_all_values ( int $sortorder)

Get all values in an array for use when creating a new guide.

Parameters
int$sortorder
Return values
array

◆ get_description()

tests\gradingform_rubric\generator\criterion::get_description ( )

Get the description for this criterion.

Return values
string

◆ get_levels()

tests\gradingform_rubric\generator\criterion::get_levels ( )

Get the levels for this criterion.

Return values
array

The documentation for this class was generated from the following file: