← Back to team overview

mahara-contributors team mailing list archive

[Bug 1482010] Re: Leap2a collection pages are in the wrong order

 

This is a bug on the export side. The list of pages in the collection is
stored like this in the Leap2A file:

        <link rel="has_part" href="portfolio:view9"/>
        <link rel="has_part" href="portfolio:view8"/>
        <link rel="has_part" href="portfolio:view11"/>
        <link rel="has_part" href="portfolio:view10"/>
        <link rel="has_part" href="portfolio:view7"/>

On import, Mahara simply reads this list back, and adds the pages to the
collection in the order they were in the Leap2A file.

The bug is that the SQL query Mahara uses when retrieving the
collection-view links, has no "order by" clause on it. So the views are
listed in whatever arbitrary order they're returned by the database.

This bug is present at least as far back as Mahara 1.8, and probably
earlier. It's a simple fix on the code side, so I'll backport the fix to
all currently-supported versions. Unfortunately the fix will not work
for already-exported Leap2A files, because they contain no information
about how the pages were originally ordered.

-- 
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/1482010

Title:
  Leap2a collection pages are in the wrong order

Status in Mahara:
  In Progress
Status in Mahara 1.10 series:
  In Progress
Status in Mahara 1.8 series:
  Won't Fix
Status in Mahara 1.9 series:
  In Progress
Status in Mahara 15.04 series:
  In Progress
Status in Mahara 15.10 series:
  In Progress

Bug description:
  If you export a collection to Leap2A and then import it back into
  Mahara, the pages in the collection will not always be in the same
  order as they were before the export.

  To replicate:

  1. Create 5 pages, titled E, D, C, B, and A.
  2. Create a collection called "Test collection"
  3. Put the 5 pages into the collection, in this order: C, D, A, B, E
  4. Export the collection to Leap2A
  5. Import the collection back into Mahara

  Expected result: You will have a new copy of the collection, with the pages in the order C, D, A, B, E
  Actual result: The pages will be in random order

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


References