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.

Differences Between: [Versions 310 and 311] [Versions 39 and 311]

This file contains the datetime profile field definition class.

Copyright: 2010 Mark Nelson <markn@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU Public License
File Size: 179 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

profile_define_datetime:: (4 methods):
  define_form_specific()
  define_validate_specific()
  define_after_data()
  define_save_preprocess()


Class: profile_define_datetime  - X-Ref

Define datetime fields.

define_form_specific($form)   X-Ref
Define the setting for a datetime custom field.

param: moodleform $form the user form

define_validate_specific($data, $files)   X-Ref
Validate the data from the profile field form.

param: stdClass $data from the add/edit profile field form
param: array $files
return: array associative array of error messages

define_after_data(&$mform)   X-Ref
Alter form based on submitted or existing data.

param: moodleform $mform

define_save_preprocess($data)   X-Ref
Preprocess data from the profile field form before
it is saved.

param: stdClass $data from the add/edit profile field form
return: stdClass processed data object