From 6819a4658bcde9f493bbf2dc8499fbd639e4e801 Mon Sep 17 00:00:00 2001 From: Michiel Boerman Date: Fri, 28 Jun 2019 16:33:39 +0200 Subject: [PATCH] added search indexing class for indexing basic activity information (title + description) see https://docs.moodle.org/dev/Search_API#Easy_case:_Activity_information --- classes/search/activity.php | 46 +++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 classes/search/activity.php diff --git a/classes/search/activity.php b/classes/search/activity.php new file mode 100644 index 00000000..8dff34f1 --- /dev/null +++ b/classes/search/activity.php @@ -0,0 +1,46 @@ +. + +/** + * Search area for mod_hvp activities. + * + * @package mod_hvp + * @copyright 2019 Michiel Boerman + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +namespace mod_hvp\search; + +defined('MOODLE_INTERNAL') || die(); + +/** + * Search area for mod_hvp activities. + * + * @package mod_vp + * @copyright 2019 Michiel Boerman + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +class activity extends \core_search\base_activity { + + /** + * Returns true if this area uses file indexing. + * + * @return bool + */ + public function uses_file_indexing() { + return true; + } +}