Leap2A package content not fully imported
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
Medium
|
Robert Lyon |
Bug Description
This has been discovered while testing the new feature in Moodle 3.2 that allows you to export Workshop module submissions. See https:/
Summary:
It seems that Mahara expects an extra wrapping element around the content of the <content> item in leap2a.xml file.
From the following leap2a package, only the first line "by Eric Cartman" is imported. The rest is not:
<content type="xhtml">
<div xmlns="http://
<div>by Eric Cartman</div>
<div>
<h1>This sucks</h1>
<img src="portfolio:
</div>
</div>
</content>
If there is an extra wrapper added, the content is correctly imported:
<content type="xhtml">
<div xmlns="http://
<div>
<div>by Eric Cartman</div>
<div>
<h1>This sucks</h1>
<img src="portfolio:
</div>
</div>
</div>
</content>
Interestingly, when previewing the content during the import (by clicking the title), it the content is displayed in the expandable area, even if it is not imported.
I have not found any related info in the Leap2A spec and I assume this is a bug (or at least undocumented feature). This may or may not be related to #1229563
Tested with: Mahara 16.10.1testing (2016090208, git rev da3c2342b7) and Moodle 3.2-beta, both running on PostgreSQL 9.3.12 on Gentoo Linux.
Changed in mahara: | |
status: | Confirmed → In Progress |
milestone: | none → 17.04.0 |
assignee: | nobody → Robert Lyon (robertl-9) |
Changed in mahara: | |
status: | In Progress → Fix Committed |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
Hi David
As you say the importing the info from the Leap2A file works fine - it inserts the information into the import_ entry_request table correctly, both the unpatched and patched files.
What goes wrong is saving that import entry into a blogpost artefact.
I'm wondering if this problem is due to the embedding of an inline image, via the lib/embedded.php file and that the process is removing some of the information.
I'll try to look into it more once I get some time.