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.

Component implementing search for testing purposes.

Copyright: David Monllao {@link http://www.davidmonllao.com}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 147 lines (5 kb)
Included or required: 2 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: mock_search_area  - X-Ref

is_enabled()   X-Ref
To make things easier, base class required config stuff.

return: bool

get_recordset_by_timestamp($modifiedfrom = 0)   X-Ref
No description

convert_record_to_doc_array($record)   X-Ref
A helper function that will turn a record into 'data array', for use with document building.


get_document($record, $options = array()   X-Ref
No description

attach_files($document)   X-Ref
No description

uses_file_indexing()   X-Ref
No description

check_access($id)   X-Ref
No description

get_doc_url(\core_search\document $doc)   X-Ref
No description

get_context_url(\core_search\document $doc)   X-Ref
No description

get_visible_name($lazyload = false)   X-Ref
No description

set_indexing_delay($seconds)   X-Ref
Sets a fake delay to simulate time taken doing the indexing query.

param: float $seconds Delay in seconds for each time indexing query is called