mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Merge branch 'MDL-59459_Increase_file_indexing_coverage' of https://github.com/mattporritt/moodle
This commit is contained in:
commit
743c937dae
33 changed files with 765 additions and 68 deletions
|
@ -124,4 +124,41 @@ class mycourse extends \core_search\base {
|
|||
public function get_context_url(\core_search\document $doc) {
|
||||
return new \moodle_url('/course/view.php', array('id' => $doc->get('courseid')));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if this area uses file indexing.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function uses_file_indexing() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the context info required to index files for
|
||||
* this search area.
|
||||
*
|
||||
* Should be overridden by each search area.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_search_fileareas() {
|
||||
$fileareas = array(
|
||||
'overviewfiles',
|
||||
'summary'// Fileareas.
|
||||
);
|
||||
|
||||
return $fileareas;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the moodle component name.
|
||||
*
|
||||
* It might be the plugin name (whole frankenstyle name) or the core subsystem name.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_component_name() {
|
||||
return 'course';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue