Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

(no description)

File Size: 209 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: groupmode  - X-Ref

Base class to render an activity group mode badge.

__construct(course_format $format,section_info $section,cm_info $mod,)   X-Ref
Constructor.

param: course_format $format the course format
param: section_info $section the section info
param: cm_info $mod the course module ionfo

export_for_template(\renderer_base $output)   X-Ref
Export this data so it can be used as the context for a mustache template.

param: \renderer_base $output typically, the renderer that's calling this function
return: stdClass|null data context for a mustache template

build_static_data(\renderer_base $output)   X-Ref
Build the data for the static badge.

param: \renderer_base $output
return: stdClass

build_editor_data(\renderer_base $output)   X-Ref
Build the data for the interactive dropdown.

param: \renderer_base $output
return: stdClass

get_dropdown_data(\renderer_base $output, choicelist $choice)   X-Ref
Build the data for the interactive dropdown.

param: \renderer_base $output
param: choicelist $choice the choice list
return: stdClass

get_choice_list()   X-Ref
Create a choice list for the dropdown.

return: choicelist the choice list

get_option_data(?string $name, string $action, int $id)   X-Ref
Get the data for the option.

param: string|null $name the name of the option
param: string $action the state action of the option
param: int $id the id of the module
return: array

get_action_icon(string $groupmode, string $groupalt = '')   X-Ref
Get the group mode icon.

param: string $groupmode the group mode
param: string $groupalt the alt text
return: pix_icon