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.

(no description)

File Size: 163 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

report_demo:: (4 methods):
  get_report()
  strnpos()
  parse_url()
  complete_urls()


Class: report_demo  - X-Ref

Returns the entire document marked-up to highlight problems.

get_report()   X-Ref
The get_report method - we iterate through every test item and
add additional attributes to build the report UI.

return: string A fully-formed HTML document.

strnpos($haystack, $needle, $occurance, int $pos = 0)   X-Ref
Finds the final postion of a needle in the haystack.

param: mixed $haystack
param: mixed $needle
param: mixed $occurance
param: int $pos
return: false|int

parse_url(string $url)   X-Ref
A helper function for completeURLs. Parses a URL into an the scheme, host, and path

param: string $url The URL to parse
return: array An array that includes the scheme, host, and path of the URL

complete_urls(string $html, string $url)   X-Ref
Turns all relative links to absolute links so that the page can be rendered correctly.

param: string $html A complete HTML document
param: string $url The absolute URL to the document
return: string A HTML document with all the relative links converted to absolute links