-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.2.9, 4.3.5, 4.4.1
-
MOODLE_402_STABLE, MOODLE_403_STABLE, MOODLE_404_STABLE
Presets with multibyte characters and line breaks in the drop-down list settings do not restore line breaks correctly on export and import.
When you import the exported xml, the contents stored in the DB will change as shown below.
It no longer returns to the original dropdown.
This may be due to changes in the specifications for exporting presets from Moodle 4.1.
I guess there is a problem with character references.
original condition
|
---------------------------
|
id | 1
|
dataid | 1
|
type | menu
|
name | test1
|
description |
|
required | 0
|
param1 | 日本語1\r +
|
| 日本語2\r +
|
| 日本語3
|
param2 |
|
param3 |
|
param4 |
|
param5 |
|
param6 |
|
param7 |
|
param8 |
|
param9 |
|
param10 |
|
|
|
|
Export and import presets
|
|
---------------------------
|
|
id | 3
|
dataid | 2
|
type | menu
|
name | test1
|
description |
|
required | 0
|
param1 | 日本語1日本語2日本語3
|
param2 |
|
param3 |
|
param4 |
|
param5 |
|
param6 |
|
param7 |
|
param8 |
|
param9 |
|
param10 |
|
preset.xml (Text Editor)
<?xml version="1.0"?>
<preset>
<description/>
<settings>
<intro/>
<comments>0</comments>
<requiredentries>0</requiredentries>
<requiredentriestoview>0</requiredentriestoview>
<maxentries>0</maxentries>
<rssarticles>0</rssarticles>
<approval>0</approval>
<manageapproved>1</manageapproved>
<defaultsortdir>0</defaultsortdir>
<defaultsort>0</defaultsort>
</settings>
<field>
<type>multimenu</type>
<name>test1</name>
<required>0</required>
<param1>日本語1
日本語2
日本語3</param1>
</field>
</preset>