Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

(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.

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

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

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

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

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