Leap2a: Collections being exported as individual pages

Bug #1474628 reported by Aaron Wells
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Aaron Wells
15.04
Fix Released
High
Aaron Wells
15.10
Fix Released
High
Aaron Wells

Bug Description

As reported here: https://bugs.launchpad.net/mahara/+bug/1464477/comments/2

The patch https://reviews.mahara.org/3624, in Mahara 15.04, caused a regression where Leap2a fails to export collections. Instead, the collections are exported as individual pages.

Revision history for this message
Aaron Wells (u-aaronw) wrote :

To replicate:

1. Create a collection called "Test Collection"
2. Put three pages into the collection, called "Page 1", "Page 2", and "Page 3"
3. Export the collection to leap2a (either using "export my whole portfolio" or "export just some pages & collections")
4. Import the generated leap2a file into your account

Expected result: You will now have two copies of "Test Collection"

Actual result: You have one copy of "Test Collection", and two copies of all the pages. (The imported copies of the pages are sitting loose, instead of being in a collection)

tags: added: export leap2a regression
Revision history for this message
Aaron Wells (u-aaronw) wrote :

Patch for "master" branch: https://reviews.mahara.org/4960

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/4960
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/7b0d6aa82a5e92bc5349d991d8af4a9a70700b76
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 7b0d6aa82a5e92bc5349d991d8af4a9a70700b76
Author: Aaron Wells <email address hidden>
Date: Wed Jul 15 15:21:19 2015 +1200

Incorrect check for the presence of collections in export (Bug 1474628)

It appears this code is meant to check for whether $views is set to
self::EXPORT_ALL_VIEWS (a constant that equals -1).

But even if you're exporting all your views, you still want to group
them together into collections.

Change-Id: Ic4f8c94ae3b2da1916806baddd6897dc6bb3ef2a

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "15.04_STABLE" branch: https://reviews.mahara.org/4974

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/4974
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/f13dfd701f5e153bac14d07044281eb32ccbe073
Submitter: Robert Lyon (<email address hidden>)
Branch: 15.04_STABLE

commit f13dfd701f5e153bac14d07044281eb32ccbe073
Author: Aaron Wells <email address hidden>
Date: Wed Jul 15 15:21:19 2015 +1200

Incorrect check for the presence of collections in export (Bug 1474628)

It appears this code is meant to check for whether $views is set to
self::EXPORT_ALL_VIEWS (a constant that equals -1).

But even if you're exporting all your views, you still want to group
them together into collections.

Change-Id: Ic4f8c94ae3b2da1916806baddd6897dc6bb3ef2a
(cherry picked from commit 7b0d6aa82a5e92bc5349d991d8af4a9a70700b76)

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Thanks to Kwantlen Polytechnic University for funding this bug fix!

Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.