Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Moodle MFA plugin lib

Author: Mikhail Golenkov <golenkovm@gmail.com>
Copyright: Catalyst IT
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 154 lines (5 kb)
Included or required: 2 times
Referenced: 1 time
Includes or requires: 0 files

Defines 5 functions


Functions that are not part of a class:

tool_mfa_after_require_login($courseorid = null, $autologinguest = null, $cm = null,$setwantsurltome = null, $preventredirect = null)   X-Ref
Main hook.

e.g. Add permissions logic across a site or course

param: mixed $courseorid
param: mixed $autologinguest
param: mixed $cm
param: mixed $setwantsurltome
param: mixed $preventredirect
return: void

tool_mfa_extend_navigation_user_settings(navigation_node $navigation, stdClass $user, $usercontext, stdClass $course, $coursecontext)   X-Ref
Extends navigation bar and injects MFA Preferences menu to user preferences.

param: navigation_node $navigation
param: stdClass $user
param: context_user $usercontext
param: stdClass $course
param: context_course $coursecontext
return: mix void or null

tool_mfa_after_config()   X-Ref
Triggered as soon as practical on every moodle bootstrap after config has
been loaded. The $USER object is available at this point too.

return: void

tool_mfa_bulk_user_actions()   X-Ref
Any plugin typically an admin tool can add new bulk user actions

return: array

tool_mfa_pluginfile(stdClass $course, stdClass $cm, context $context, string $filearea,array $args, bool $forcedownload, array $options = [])   X-Ref
Serves any files for the guidance page.

param: stdClass $course
param: stdClass $cm
param: context $context
param: string $filearea
param: array $args
param: bool $forcedownload
param: array $options
return: bool