From: David Mudrak Date: Mon, 4 Jan 2010 18:32:33 +0000 (+0000) Subject: MDL-19937 workshop migration - keep format of the Introduction field X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=83012c0c893d7e1d3a622bcdd78612e141afcc52;p=moodle.git MDL-19937 workshop migration - keep format of the Introduction field --- diff --git a/mod/workshop/db/upgradelib.php b/mod/workshop/db/upgradelib.php index f2be04449d..c248640d0c 100644 --- a/mod/workshop/db/upgradelib.php +++ b/mod/workshop/db/upgradelib.php @@ -161,7 +161,7 @@ function workshop_upgrade_copy_instances() { $new->course = $old->course; $new->name = $old->name; $new->intro = $old->description; - $new->introformat = FORMAT_HTML; + $new->introformat = $old->format; $new->nattachments = $old->nattachments; $new->maxbytes = $old->maxbytes; $new->grade = $old->grade; @@ -176,20 +176,20 @@ function workshop_upgrade_copy_instances() { $new->usepeerassessment = 1; $new->useselfassessment = $old->includeself; switch ($old->gradingstrategy) { - case 0: - $new->strategy = 'comments'; // 'notgraded' + case 0: // 'notgraded' - renamed + $new->strategy = 'comments'; break; - case 1: - $new->strategy = 'accumulative'; // 'accumulative' + case 1: // 'accumulative' + $new->strategy = 'accumulative'; break; - case 2: - $new->strategy = 'numerrors'; // 'errorbanded' + case 2: // 'errorbanded' - renamed + $new->strategy = 'numerrors'; break; - case 3: - $new->strategy = 'rubric'; // 'criterion' + case 3: // 'criterion' - will be migrated into 'rubric' + $new->strategy = 'rubric'; break; - case 4: - $new->strategy = 'rubric'; // 'rubric' + case 4: // 'rubric' + $new->strategy = 'rubric'; break; } $newid = $DB->insert_record('workshop', $new, true, true);