Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Public Attributes | List of all members
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. More...
 
 add_level (string $definition, int $score)
 Adds levels to the criterion. More...
 
 get_all_level_values ()
 Get all level values. More...
 
 get_all_values (int $sortorder)
 Get all values in an array for use when creating a new guide. More...
 
 get_description ()
 Get the description for this criterion. More...
 
 get_levels ()
 Get the levels for this criterion. More...
 

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: