From 08e4bc556cbd2bbb4f09b781a1974f5964d28ee7 Mon Sep 17 00:00:00 2001 From: cescobedo Date: Fri, 18 Mar 2022 07:55:42 +0100 Subject: [PATCH] MDL-74258 mod_h5pactivity: Add global search to h5pactivity --- mod/h5pactivity/classes/search/activity.php | 44 +++++++++++++++++++++ mod/h5pactivity/lang/en/h5pactivity.php | 1 + 2 files changed, 45 insertions(+) create mode 100644 mod/h5pactivity/classes/search/activity.php diff --git a/mod/h5pactivity/classes/search/activity.php b/mod/h5pactivity/classes/search/activity.php new file mode 100644 index 00000000000..36c806e4e91 --- /dev/null +++ b/mod/h5pactivity/classes/search/activity.php @@ -0,0 +1,44 @@ +. + +/** + * Search area for mod_h5pactivity activities. + * + * @package mod_h5pactivity + * @copyright 2022 Carlos Escobedo + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +namespace mod_h5pactivity\search; + +/** + * Search area for mod_h5pactivity activities. + * + * @package mod_h5pactivity + * @copyright 2022 Carlos Escobedo + * @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; + } +} diff --git a/mod/h5pactivity/lang/en/h5pactivity.php b/mod/h5pactivity/lang/en/h5pactivity.php index 822b338ee96..8030751e243 100644 --- a/mod/h5pactivity/lang/en/h5pactivity.php +++ b/mod/h5pactivity/lang/en/h5pactivity.php @@ -129,6 +129,7 @@ $string['review_none'] = 'Participants cannot review their own attempts'; $string['review_on_completion'] = 'Participants can review their own attempts'; $string['score'] = 'Score'; $string['score_out_of'] = '{$a->rawscore} out of {$a->maxscore}'; +$string['search:activity'] = 'H5P - activity information'; $string['startdate'] = 'Start date'; $string['statement_received'] = 'xAPI statement received'; $string['totalscore'] = 'Total score';