Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.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