Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 39 and 311] [Versions 39 and 400] [Versions 39 and 401] [Versions 39 and 402] [Versions 39 and 403]

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