Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Search area for course sections (title and summary).

Copyright: 2018 The Open University
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 217 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: section  - X-Ref

Search area for course sections (title and summary).

Note this does not include the activities within the section, as these have their own search
areas.

get_document_recordset($modifiedfrom = 0, \context $context = null)   X-Ref
Returns recordset containing required data for indexing course sections.

param: int $modifiedfrom timestamp
param: \context|null $context Restriction context
return: \moodle_recordset|null Recordset or null if no change possible

get_document($record, $options = array()   X-Ref
Returns the document associated with this section.

param: \stdClass $record
param: array $options
return: \core_search\document

check_access($id)   X-Ref
Whether the user can access the section or not.

param: int $id The course section id.
return: int One of the \core_search\manager:ACCESS_xx constants

get_doc_url(\core_search\document $doc)   X-Ref
Gets a link to the section.

param: \core_search\document $doc
return: \moodle_url

get_context_url(\core_search\document $doc)   X-Ref
Gets a link to the section.

param: \core_search\document $doc
return: \moodle_url

uses_file_indexing()   X-Ref
Returns true to include summary files in the index.

return: bool True

get_search_fileareas()   X-Ref
Return the file area that is used for summary files.

return: array File area name

get_component_name()   X-Ref
Returns the moodle component name, as used in the files table.

return: string Component name

get_doc_icon(\core_search\document $doc)   X-Ref
Returns an icon instance for the document.

param: \core_search\document $doc
return: \core_search\document_icon

get_category_names()   X-Ref
Returns a list of category names associated with the area.

return: array