Skip to content

Commit

Permalink
MDL-23204 convert text to html in page intro
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Jul 16, 2010
1 parent d4dfc6e commit 2af3ca5
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions mod/page/db/upgradelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,19 @@ function page_20_migrate_candidate($candidate, $fs, $format) {
global $CFG, $DB;
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;
}

$page = new object();
$page->course = $candidate->course;
$page->name = $candidate->name;
$page->intro = $candidate->intro;
$page->introformat = $candidate->introformat;
$page->intro = $intro;
$page->introformat = $introformat;
$page->content = $candidate->alltext;
$page->contentformat = $format;
$page->revision = 1;
Expand Down

0 comments on commit 2af3ca5

Please sign in to comment.