Search moodle.org's
Developer Documentation

See Release Notes

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

Contains the base class for fetching the important dates in an activity module for a given module instance and a user.

Copyright: Shamim Rezaie <shamim@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 101 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

activity_dates:: (3 methods):
  __construct()
  get_dates_for_module()
  get_dates_classname()


Class: activity_dates  - X-Ref

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

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

param: cm_info $cm course module
param: int $userid user id

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

param: cm_info $cm The course module information.
param: int $userid The user ID.
return: array|array[]

get_dates_classname(string $modname)   X-Ref
Fetches the module's dates class implementation if it's available.

param: string $modname The activity module name. Usually from cm_info::modname.
return: string|null