Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Grade item, fieldname mapping.

Copyright: Ilya Tregubov <ilya.a.tregubov@gmail.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 48 lines (2 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

fieldname_mapping:: (1 method):
  get_field_name_for_itemnumber()


Interface: fieldname_mapping  - X-Ref

Grade item, fieldname mapping.

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