Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
core\activity_dates Class Reference

Class for fetching the important dates of an activity module for a given module instance and a user. More...

Inheritance diagram for core\activity_dates:
mod_assign\dates mod_chat\dates mod_choice\dates mod_data\dates mod_feedback\dates mod_forum\dates mod_lesson\dates mod_quiz\dates mod_scorm\dates mod_workshop\dates

Public Member Functions

 __construct (cm_info $cm, int $userid)
 activity_dates constructor.
 

Static Public Member Functions

static get_dates_for_module (cm_info $cm, int $userid)
 Returns a list of important dates in the given module for the user.
 

Protected Member Functions

 get_dates ()
 Returns a list of important dates for this module.
 

Protected Attributes

cm_info $cm
 The course module information object.
 
int $userid
 The user id.
 

Detailed Description

Class for fetching the important dates of an activity module for a given module instance and a user.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

core\activity_dates::__construct ( cm_info $cm,
int $userid )

activity_dates constructor.

Parameters
cm_info$cmcourse module
int$useriduser id

Member Function Documentation

◆ get_dates()

core\activity_dates::get_dates ( )
abstractprotected

Returns a list of important dates for this module.

Return values
array[]Each element of the array is an array with keys: label - The label for the date timestamp - The date

Reimplemented in mod_assign\dates, mod_chat\dates, mod_choice\dates, mod_data\dates, mod_feedback\dates, mod_forum\dates, mod_lesson\dates, mod_quiz\dates, mod_scorm\dates, and mod_workshop\dates.

◆ get_dates_for_module()

static core\activity_dates::get_dates_for_module ( cm_info $cm,
int $userid )
static

Returns a list of important dates in the given module for the user.

Parameters
cm_info$cmThe course module information.
int$useridThe user ID.
Return values
array|array[]

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