See Release Notes
Long Term Support Release
Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401]
Helper class to fetch information about component grade items.
Copyright: | Andrew Nicols <andrew@nicols.co.uk> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 226 lines (8 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
component_gradeitems:: (2 methods):
get_component_classname()
get_itemname_mapping_for_component()
does:: (8 methods):
is_valid_itemname()
defines_advancedgrading_itemnames_for_component()
get_advancedgrading_itemnames_for_component()
is_advancedgrading_itemname()
get_field_name_for_itemnumber()
get_field_name_for_itemname()
get_itemname_from_itemnumber()
get_itemnumber_from_itemname()
does:: (8 methods):
is_valid_itemname()
defines_advancedgrading_itemnames_for_component()
get_advancedgrading_itemnames_for_component()
is_advancedgrading_itemname()
get_field_name_for_itemnumber()
get_field_name_for_itemname()
get_itemname_from_itemnumber()
get_itemnumber_from_itemname()
Class: component_gradeitems - X-Ref
Helper class to fetch information about component grade items.get_component_classname(string $component) X-Ref |
Get the gradeitems classname for the specific component. param: string $component The component to fetch the classname for return: string The composed classname |
get_itemname_mapping_for_component(string $component) X-Ref |
Get the grade itemnumber mapping for a component. param: string $component The component that the grade item belongs to return: array |
is_valid_itemname(string $component, string $itemname) X-Ref |
Whether the named grading item exists. param: string $component param: string $itemname return: bool |
defines_advancedgrading_itemnames_for_component(string $component) X-Ref |
Check whether the component class defines the advanced grading items. param: string $component The component to check return: bool |
get_advancedgrading_itemnames_for_component(string $component) X-Ref |
Get the list of advanced grading item names for the named component. param: string $component return: array |
is_advancedgrading_itemname(string $component, string $itemname) X-Ref |
Whether the named grading item name supports advanced grading. param: string $component param: string $itemname return: bool |
get_field_name_for_itemnumber(string $component, int $itemnumber, string $fieldname) X-Ref |
Get the suffixed field name for an activity field mapped from its itemnumber. For legacy reasons, the first itemnumber has no suffix on field names. param: string $component The component that the grade item belongs to param: int $itemnumber The grade itemnumber param: string $fieldname The name of the field to be rewritten return: string The translated field name |
get_field_name_for_itemname(string $component, string $itemname, string $fieldname) X-Ref |
Get the suffixed field name for an activity field mapped from its itemnumber. For legacy reasons, the first itemnumber has no suffix on field names. param: string $component The component that the grade item belongs to param: string $itemname The grade itemname param: string $fieldname The name of the field to be rewritten return: string The translated field name |
get_itemname_from_itemnumber(string $component, int $itemnumber) X-Ref |
Get the itemname for an itemnumber. For legacy compatability when the itemnumber is 0, the itemname will always be empty. param: string $component The component that the grade item belongs to param: int $itemnumber The grade itemnumber return: int The grade itemnumber of the itemname |
get_itemnumber_from_itemname(string $component, string $itemname) X-Ref |
Get the itemnumber for a item name. For legacy compatability when the itemname is empty, the itemnumber will always be 0. param: string $component The component that the grade item belongs to param: string $itemname The grade itemname return: int The grade itemname of the itemnumber |
is_valid_itemname(string $component, string $itemname) X-Ref |
Whether the named grading item exists. param: string $component param: string $itemname return: bool |
defines_advancedgrading_itemnames_for_component(string $component) X-Ref |
Check whether the component class defines the advanced grading items. param: string $component The component to check return: bool |
get_advancedgrading_itemnames_for_component(string $component) X-Ref |
Get the list of advanced grading item names for the named component. param: string $component return: array |
is_advancedgrading_itemname(string $component, string $itemname) X-Ref |
Whether the named grading item name supports advanced grading. param: string $component param: string $itemname return: bool |
get_field_name_for_itemnumber(string $component, int $itemnumber, string $fieldname) X-Ref |
Get the suffixed field name for an activity field mapped from its itemnumber. For legacy reasons, the first itemnumber has no suffix on field names. param: string $component The component that the grade item belongs to param: int $itemnumber The grade itemnumber param: string $fieldname The name of the field to be rewritten return: string The translated field name |
get_field_name_for_itemname(string $component, string $itemname, string $fieldname) X-Ref |
Get the suffixed field name for an activity field mapped from its itemnumber. For legacy reasons, the first itemnumber has no suffix on field names. param: string $component The component that the grade item belongs to param: string $itemname The grade itemname param: string $fieldname The name of the field to be rewritten return: string The translated field name |
get_itemname_from_itemnumber(string $component, int $itemnumber) X-Ref |
Get the itemname for an itemnumber. For legacy compatability when the itemnumber is 0, the itemname will always be empty. param: string $component The component that the grade item belongs to param: int $itemnumber The grade itemnumber return: int The grade itemnumber of the itemname |
get_itemnumber_from_itemname(string $component, string $itemname) X-Ref |
Get the itemnumber for a item name. For legacy compatability when the itemname is empty, the itemnumber will always be 0. param: string $component The component that the grade item belongs to param: string $itemname The grade itemname return: int The grade itemname of the itemnumber |