Commit edc608b6 authored by Aaron Wells's avatar Aaron Wells

Import collection pages in the right order (Bug 1482010)

Also, displaying the pages in name order during import.

behatnotneeded: Can't test export & re-import of Leap2a files in Behat yet.

Change-Id: Ib387e574356d9d894b9a6f284b09921a5b26d5fc
(cherry picked from commit c10418a1)
parent 10c100dd
......@@ -319,7 +319,9 @@ class PluginExportLeap extends PluginExport {
$collectionlist = join(',', array_keys($this->collections));
$records = get_records_select_array(
'collection_view',
"view IN ($viewlist) AND collection IN ($collectionlist)"
"view IN ($viewlist) AND collection IN ($collectionlist)",
array(),
'displayorder'
);
if ($records) {
foreach ($records as &$r) {
......
......@@ -1108,7 +1108,7 @@ class PluginImportLeap extends PluginImport {
$importid = $this->get('importertransport')->get('importid');
// Get import entry requests for Mahara views
$entryviews = array();
if ($ierviews = get_records_select_array('import_entry_requests', 'importid = ? AND entrytype = ?', array($importid, 'view'))) {
if ($ierviews = get_records_select_array('import_entry_requests', 'importid = ? AND entrytype = ?', array($importid, 'view'), 'entrytitle')) {
foreach ($ierviews as $ierview) {
$view = unserialize($ierview->entrycontent);
$view['id'] = $ierview->id;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment