mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Merge branch 'MDL-29256-resource-format_22_STABLE' of git://github.com/mudrd8mz/moodle into MOODLE_22_STABLE
This commit is contained in:
commit
edb03ff65b
1 changed files with 11 additions and 4 deletions
|
@ -53,12 +53,19 @@ class moodle1_mod_page_handler extends moodle1_resource_successor_handler {
|
|||
$page['intro'] = $data['intro'];
|
||||
$page['introformat'] = $data['introformat'];
|
||||
$page['content'] = $data['alltext'];
|
||||
|
||||
if ($data['type'] === 'html') {
|
||||
// legacy Resource of the type Web page
|
||||
$page['contentformat'] = FORMAT_HTML;
|
||||
|
||||
} else {
|
||||
// legacy Resource of the type Plain text page
|
||||
$page['contentformat'] = (int)$data['reference'];
|
||||
|
||||
// this is unexpected but just in case (the same step applied during upgrade)
|
||||
if ($page['contentformat'] < 0 or $page['contentformat'] > 4) {
|
||||
$page['contentformat'] = FORMAT_MOODLE;
|
||||
}
|
||||
}
|
||||
|
||||
$page['legacyfiles'] = RESOURCELIB_LEGACYFILES_ACTIVE;
|
||||
$page['legacyfileslast'] = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue