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.

Block displaying information about current logged-in user. This block can be used as anti cheating measure, you can easily check the logged-in user matches the person operating the computer.

Author: Olav Jordan <olav.jordan@remote-learner.ca>
Copyright: 2010 Remote-Learner.net
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 147 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

block_myprofile:: (10 methods):
  init()
  get_content()
  has_config()
  instance_allow_multiple()
  instance_allow_config()
  specialization()
  applicable_formats()
  after_install()
  before_delete()
  get_config_for_external()


Class: block_myprofile  - X-Ref

Displays the current user's profile information.

init()   X-Ref
block initializations


get_content()   X-Ref
block contents

return: object

has_config()   X-Ref
allow the block to have a configuration page

return: boolean

instance_allow_multiple()   X-Ref
allow more than one instance of the block on a page

return: boolean

instance_allow_config()   X-Ref
allow instances to have their own configuration

return: boolean

specialization()   X-Ref
instance specialisations (must have instance allow config true)


applicable_formats()   X-Ref
locations where block can be displayed

return: array

after_install()   X-Ref
post install configurations


before_delete()   X-Ref
post delete configurations


get_config_for_external()   X-Ref
Return the plugin config settings for external functions.

return: stdClass the configs for both the block instance and plugin