Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.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