Commit d947aad3 authored by Nigel McNie's avatar Nigel McNie
Browse files

Order views/artefacts in exports.



This makes diffing the resulting XML file (in the case of LEAP2A export) easier.
Signed-off-by: default avatarNigel McNie <nigel@catalyst.net.nz>
parent 4e6603ce
......@@ -172,7 +172,7 @@ abstract class PluginExport extends Plugin {
// Get the list of views to export
if ($views == self::EXPORT_ALL_VIEWS) {
$tmpviews = get_column('view', 'id', 'owner', $userid);
$tmpviews = get_column_sql('SELECT id FROM {view} WHERE owner = ? ORDER BY id', array($userid));
$this->viewexportmode = $views;
}
else if (is_array($views)) {
......@@ -202,7 +202,7 @@ abstract class PluginExport extends Plugin {
// Get the list of artefacts to export
if ($artefacts == self::EXPORT_ALL_ARTEFACTS) {
$tmpartefacts = get_column('artefact', 'id', 'owner', $userid);
$tmpartefacts = get_column_sql('SELECT id FROM {artefact} WHERE owner = ? ORDER BY id', array($userid));
$this->artefactexportmode = $artefacts;
}
else {
......@@ -211,7 +211,8 @@ abstract class PluginExport extends Plugin {
FROM {view_artefact} va
LEFT JOIN {view} v ON v.id = va.view
WHERE v.owner = ?
$vaextra";
$vaextra
ORDER BY va.artefact";
$tmpartefacts = (array)get_column_sql($sql, array($userid));
// Some artefacts are not inside the view, but still need to be exported with it
......
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