Skip to content

Commit

Permalink
MDL-23204 convert text to html in folder intro
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Jul 16, 2010
1 parent d021c19 commit d6ae4a4
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions mod/folder/db/upgradelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,19 @@ function folder_20_migrate() {
$directory = '/'.trim($candidate->reference, '/').'/';
$directory = str_replace('//', '/', $directory);

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

$folder = new object();
$folder->course = $candidate->course;
$folder->name = $candidate->name;
$folder->intro = $candidate->intro;
$folder->introformat = $candidate->introformat;
$folder->intro = $intro;
$folder->introformat = $introformat;
$folder->revision = 1;
$folder->timemodified = time();

Expand Down

0 comments on commit d6ae4a4

Please sign in to comment.