From b8091a0bfd9adee705ae2c105e0482d9287ee194 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Fri, 16 Jul 2010 09:32:51 +0000 Subject: [PATCH] MDL-23204 convert text to html in url intro --- mod/url/db/upgradelib.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/mod/url/db/upgradelib.php b/mod/url/db/upgradelib.php index 2a1a0ae4fe9..5b50c08dca6 100644 --- a/mod/url/db/upgradelib.php +++ b/mod/url/db/upgradelib.php @@ -71,11 +71,19 @@ function url_20_migrate() { upgrade_set_timeout(); + if ($CFG->texteditors !== 'textarea') { + $intro = text_to_html($candidate->intro, false, false, true); + $introformat = FORMAT_HTML; + } else { + $intro = $candidate->intro; + $introformat = FORMAT_MOODLE; + } + $url = new object(); $url->course = $candidate->course; $url->name = $candidate->name; - $url->intro = $candidate->intro; - $url->introformat = $candidate->introformat; + $url->intro = $intro; + $url->introformat = $introformat; $url->externalurl = $path; $url->timemodified = time(); -- 2.43.0