Contains the default activity availability information.
Copyright: | 2023 Ferran Recio <ferran@moodle.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 252 lines (9 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
visibility:: (11 methods):
__construct()
export_for_template()
show_visibility()
get_icon()
build_editor_data()
get_dropdown_data()
get_choice_list()
get_selected_choice_value()
create_choice_list()
get_option_data()
build_static_data()
Class: visibility - X-Ref
Base class to render a course module availability inside a course format.__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 |
show_visibility() X-Ref |
Check if the visibility is displayed. return: bool |
get_icon(string $selected) X-Ref |
Get the icon for the section visibility. param: string $selected the visibility selected value return: pix_icon |
build_editor_data(\renderer_base $output) X-Ref |
Build the data for the editor. param: \renderer_base $output typically, the renderer that's calling this function return: stdClass|null data context for a mustache template |
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 |
Get the availability choice list. return: choicelist |
get_selected_choice_value() X-Ref |
Get the selected choice value depending on the course, section and stealth settings. return: string |
create_choice_list() X-Ref |
Create a choice list for the dropdown. return: choicelist the choice list |
get_option_data(string $name, string $action) X-Ref |
Get the data for the option. param: string $name the name of the option param: string $action the state action of the option return: array |
build_static_data(\renderer_base $output) X-Ref |
Build the static badges data. param: \renderer_base $output typically, the renderer that's calling this function return: stdClass|null data context for a mustache template |