Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250706) (a6b17d8f6bd)
mod_subsection\manager Class Reference

Public Member Functions

 __construct (cm_info $cm, stdClass $instance)
 Class constructor.
 
 get_context ()
 Return the current context.
 
 get_coursemodule ()
 Return the current cm_info.
 
 get_delegated_section_info ()
 Get the delegated section info.
 
 get_instance ()
 Return the current instance.
 
 get_renderer (?moodle_page $page=null)
 Return the current module renderer.
 
 set_module_viewed (stdClass $course)
 Trigger module viewed event and set the module viewed for completion.
 

Static Public Member Functions

static create_from_coursemodule ($cm)
 Create a manager instance from a course_modules record.
 
static create_from_data_record ($record)
 Create a manager instance from a subsection_record entry.
 
static create_from_id (int $courseid, int $id)
 Create a manager instance from a record id.
 
static create_from_instance (stdClass $instance)
 Create a manager instance from an instance record.
 

Public Attributes

string $path
 plugin path.
 
const MODULE = 'subsection'
 Module name.
 
const PLUGINNAME = 'mod_subsection'
 The plugin name.
 

Constructor & Destructor Documentation

◆ __construct()

mod_subsection\manager::__construct ( cm_info $cm,
stdClass $instance )

Class constructor.

Parameters
cm_info$cmcourse module info object
stdClass$instanceactivity instance object.

Member Function Documentation

◆ create_from_coursemodule()

static mod_subsection\manager::create_from_coursemodule ( $cm)
static

Create a manager instance from a course_modules record.

Parameters
stdClass | cm_info$cman activity record
Return values
manager

◆ create_from_data_record()

static mod_subsection\manager::create_from_data_record ( $record)
static

Create a manager instance from a subsection_record entry.

Parameters
stdClass$recordthe subsection_record record
Return values
manager

◆ create_from_id()

static mod_subsection\manager::create_from_id ( int $courseid,
int $id )
static

Create a manager instance from a record id.

Parameters
int$courseidthe course id
int$idan activity id
Return values
manager

◆ create_from_instance()

static mod_subsection\manager::create_from_instance ( stdClass $instance)
static

Create a manager instance from an instance record.

Parameters
stdClass$instancean activity record
Return values
manager

◆ get_context()

mod_subsection\manager::get_context ( )

Return the current context.

Return values
context_module

◆ get_coursemodule()

mod_subsection\manager::get_coursemodule ( )

Return the current cm_info.

Return values
cm_infothe course module

◆ get_delegated_section_info()

mod_subsection\manager::get_delegated_section_info ( )

Get the delegated section info.

Return values
section_info|nullthe delegated section info

◆ get_instance()

mod_subsection\manager::get_instance ( )

Return the current instance.

Return values
stdClassthe instance record

◆ get_renderer()

mod_subsection\manager::get_renderer ( ?moodle_page $page = null)

Return the current module renderer.

Parameters
moodle_page | null$pagethe current page
Return values
mod_subsection_rendererthe module renderer

◆ set_module_viewed()

mod_subsection\manager::set_module_viewed ( stdClass $course)

Trigger module viewed event and set the module viewed for completion.

Parameters
stdClass$coursecourse object

The documentation for this class was generated from the following file: