Skip to content

Commit

Permalink
MDL-23204 convert text to html in imscp intro
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Jul 16, 2010
1 parent 1b1bd47 commit b498d58
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions mod/imscp/db/upgradelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,19 @@ function imscp_20_migrate() {
foreach ($candidates as $candidate) {
upgrade_set_timeout(60);

if ($CFG->texteditors !== 'textarea') {
$intro = text_to_html($candidate->intro, false, false, true);
$introformat = FORMAT_HTML;
} else {
$intro = $candidate->intro;
$introformat = FORMAT_MOODLE;
}

$imscp = new object();
$imscp->course = $candidate->course;
$imscp->name = $candidate->name;
$imscp->intro = $candidate->intro;
$imscp->introformat = $candidate->introformat;
$imscp->intro = $intro;
$imscp->introformat = $introformat;
$imscp->revision = 1;
$imscp->keepold = 1;
$imscp->timemodified = time();
Expand Down

0 comments on commit b498d58

Please sign in to comment.