MDL-27448 Resource intro (legacy summary) field converted consistently by the resource handler

This commit is contained in:
David Mudrak 2011-06-04 11:31:57 +02:00
parent 069b5b80c4
commit 904888daee
3 changed files with 6 additions and 14 deletions

View File

@ -59,14 +59,6 @@ class moodle1_mod_imscp_handler extends moodle1_mod_handler {
$moduleid = $this->currentcminfo['id'];
$contextid = $this->converter->get_contextid(CONTEXT_MODULE, $moduleid);
if ($CFG->texteditors !== 'textarea') {
$data['intro'] = text_to_html($data['intro'], false, false, true);
$data['introformat'] = FORMAT_HTML;
} else {
$data['intro'] = $data['intro'];
$data['introformat'] = FORMAT_MOODLE;
}
$data['revision'] = 1;
$data['keepold'] = 1;

View File

@ -57,12 +57,6 @@ class moodle1_mod_page_handler extends moodle1_mod_handler {
$moduleid = $cminfo['id'];
$contextid = $this->converter->get_contextid(CONTEXT_MODULE, $moduleid);
//we now only support html intros
if ($data['type'] == 'text') {
$data['intro'] = text_to_html($data['intro'], false, false, true);
$data['introformat'] = FORMAT_HTML;
}
$data['contentformat'] = (int)$data['reference'];
if ($data['contentformat'] < 0 || $data['contentformat'] > 4) {
$data['contentformat'] = FORMAT_MOODLE;

View File

@ -81,6 +81,12 @@ class moodle1_mod_resource_handler extends moodle1_mod_handler {
global $CFG;
require_once("$CFG->libdir/resourcelib.php");
// replay the upgrade step 2009042001
if ($CFG->texteditors !== 'textarea') {
$data['intro'] = text_to_html($data['intro'], false, false, true);
$data['introformat'] = FORMAT_HTML;
}
//if this is a file or URL resource we need to deal with the options
//before possibly branching out to the URL successor
if ($data['type'] == 'file') {