3 * Global Search Engine for Moodle
7 * @subpackage document_wrappers
8 * @author Valery Fremaux [valery.fremaux@club-internet.fr] > 1.8
10 * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
12 * this is a format handler for getting text out of a proprietary binary format
13 * so it can be indexed by Lucene search engine
17 * @param object $resource
20 function get_text_for_indexing_txt(&$resource){
23 // SECURITY : do not allow non admin execute anything on system !!
24 if (!isadmin($USER->id
)) return;
26 // just try to get text empirically from ppt binary flow
27 $text = implode('', file("{$CFG->dataroot}/{$resource->course}/{$resource->reference}"));
28 if (!empty($CFG->block_search_limit_index_body
)){
29 $text = shorten($text, $CFG->block_search_limit_index_body
);