mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 04:33:13 +01:00
MDL-27448 Resource intro (legacy summary) field converted consistently by the resource handler
This commit is contained in:
parent
069b5b80c4
commit
904888daee
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user