Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.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