← Back to team overview

mahara-contributors team mailing list archive

[Bug 1640837] A change has been merged

 

Reviewed:  https://reviews.mahara.org/7251
Committed: https://git.mahara.org/mahara/mahara/commit/5493669372b59321aa9ff76e6b79755261b11f42
Submitter: Robert Lyon (robertl@xxxxxxxxxxxxxxx)
Branch:    master

commit 5493669372b59321aa9ff76e6b79755261b11f42
Author: Robert Lyon <robertl@xxxxxxxxxxxxxxx>
Date:   Mon Nov 14 16:20:37 2016 +1300

Bug 1640837: Proper import of blogposts

If we didn't wrap the blogpost description in a <div></div> it failed
to fully make the content. This is fine for our made leap2a but fails
for ones made via 3rd party systems, like moodle.

The problem was how we extracted the info from the DOM $xml

Test with the leap2a files in the bug report

behatnotneeded

Change-Id: Iedb88a05b332a38305e9304f358d3e424b1973f4
Signed-off-by: Robert Lyon <robertl@xxxxxxxxxxxxxxx>

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1640837

Title:
  Leap2A package content not fully imported

Status in Mahara:
  Fix Committed

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://tracker.moodle.org/browse/MDL-56888 for details of the problem
  and what workaround was done in Moodle.

  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://www.w3.org/1999/xhtml";>
      <div>by Eric Cartman</div>
      <div>
        <h1>This sucks</h1>
        <img src="portfolio:storedfile863" alt="cat" width="150" height="106" class="img-responsive atto_image_button_text-bottom" rel="enclosure"/>
      </div>
    </div>
  </content>

  If there is an extra wrapper added, the content is correctly imported:

  <content type="xhtml">
    <div xmlns="http://www.w3.org/1999/xhtml";>
      <div>
        <div>by Eric Cartman</div>
        <div>
          <h1>This sucks</h1>
          <img src="portfolio:storedfile863" alt="cat" width="150" height="106" class="img-responsive atto_image_button_text-bottom" rel="enclosure"/>
        </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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1640837/+subscriptions


References