Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 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.

Library functions to facilitate the use of JavaScript in Moodle.

Copyright: 2016 Adrian Greeve <adrian@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 129 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

fragment_requirements_manager:: (3 methods):
  __construct()
  get_amd_footercode()
  get_end_code()


Class: fragment_requirements_manager  - X-Ref

This requirements manager captures the appropriate html for creating a fragment to
be inserted elsewhere.

__construct()   X-Ref
Page fragment constructor.


get_amd_footercode()   X-Ref
Returns js code to load amd module loader, then insert inline script tags
that contain require() calls using RequireJS.

return: string

get_end_code()   X-Ref
Generate any HTML that needs to go at the end of the page.

return: string the HTML code to to at the end of the page.