mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Merge branch 'MDL-34612-master' of https://github.com/mackensen/moodle
This commit is contained in:
commit
031a28ce7f
1 changed files with 8 additions and 0 deletions
|
@ -73,6 +73,8 @@ class moodle1_mod_forum_handler extends moodle1_mod_handler {
|
||||||
* Converts /MOODLE_BACKUP/COURSE/MODULES/MOD/FORUM data
|
* Converts /MOODLE_BACKUP/COURSE/MODULES/MOD/FORUM data
|
||||||
*/
|
*/
|
||||||
public function process_forum($data) {
|
public function process_forum($data) {
|
||||||
|
global $CFG;
|
||||||
|
|
||||||
// get the course module id and context id
|
// get the course module id and context id
|
||||||
$instanceid = $data['id'];
|
$instanceid = $data['id'];
|
||||||
$cminfo = $this->get_cminfo($instanceid);
|
$cminfo = $this->get_cminfo($instanceid);
|
||||||
|
@ -87,6 +89,12 @@ class moodle1_mod_forum_handler extends moodle1_mod_handler {
|
||||||
$this->fileman->itemid = 0;
|
$this->fileman->itemid = 0;
|
||||||
$data['intro'] = moodle1_converter::migrate_referenced_files($data['intro'], $this->fileman);
|
$data['intro'] = moodle1_converter::migrate_referenced_files($data['intro'], $this->fileman);
|
||||||
|
|
||||||
|
// Convert the introformat if necessary.
|
||||||
|
if ($CFG->texteditors !== 'textarea') {
|
||||||
|
$data['intro'] = text_to_html($data['intro'], false, false, true);
|
||||||
|
$data['introformat'] = FORMAT_HTML;
|
||||||
|
}
|
||||||
|
|
||||||
// start writing forum.xml
|
// start writing forum.xml
|
||||||
$this->open_xml_writer("activities/forum_{$this->moduleid}/forum.xml");
|
$this->open_xml_writer("activities/forum_{$this->moduleid}/forum.xml");
|
||||||
$this->xmlwriter->begin_tag('activity', array('id' => $instanceid, 'moduleid' => $this->moduleid,
|
$this->xmlwriter->begin_tag('activity', array('id' => $instanceid, 'moduleid' => $this->moduleid,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue