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.

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: 1 time
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