public function get_contents() {
        global $PAGE;
        if (!empty($this->properties->contents)) {
            if (!isset($this->properties->contentsformat)) {
                $this->properties->contentsformat = FORMAT_HTML;
            }
            $context = context_module::instance($PAGE->cm->id);
            $contents = file_rewrite_pluginfile_urls($this->properties->contents, 'pluginfile.php', $context->id, 'mod_lesson',
                                                     'page_contents', $this->properties->id);  // Must do this BEFORE format_text()!
            return format_text($contents, $this->properties->contentsformat,
                               array('context' => $context, 'noclean' => true,
                                     'overflowdiv' => true));  // Page edit is marked with XSS, we want all content here.
        } else {
            return '';
        }
    }
public function get_contents() {
        global $PAGE;
        if (!empty($this->properties->contents)) {
            if (!isset($this->properties->contentsformat)) {
                $this->properties->contentsformat = FORMAT_HTML;
            }
            $context = context_module::instance($PAGE->cm->id);
            $contents = file_rewrite_pluginfile_urls($this->properties->contents, 'pluginfile.php', $context->id, 'mod_lesson',
                                                     'page_contents', $this->properties->id);  // Must do this BEFORE format_text()!
            return format_text($contents, $this->properties->contentsformat,
                               array('context' => $context, 'noclean' => true,
                                     'overflowdiv' => true));  // Page edit is marked with XSS, we want all content here.
        } else {
            return '';
        }
    }
public function get_contents ( ) { global $ PAGE ; if ( ! empty ( $ this -> properties -> contents ) ) { if ( ! isset ( $ this -> properties -> contentsformat ) ) { $ this -> properties -> contentsformat = FORMAT_HTML ; } $ context = context_module :: instance ( $ PAGE -> cm -> id ) ; $ contents = file_rewrite_pluginfile_urls ( $ this -> properties -> contents , 'pluginfile.php' , $ context -> id , 'mod_lesson' , 'page_contents' , $ this -> properties -> id ) ; // Must do this BEFORE format_text()! return format_text ( $ contents , $ this -> properties -> contentsformat , array ( 'context' => $ context , 'noclean' => true , 'overflowdiv' => true ) ) ; // Page edit is marked with XSS, we want all content here. } else { return '' ; } }
Returns the contents field for the page properly formatted and with plugin
file url's converted
@return string
Returns the contents field for the page properly formatted and with plugin file url s converted