Full-portfolio export doesn't include all artefacts

Bug #1457867 reported by Wen-Chang Chien(簡文章)
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

Mahara Ver. 15.04

line 243 ~ 256 of /htdocs/export/lib.php

-------------------------------------------------------------------------------------
        // Get the list of artefacts to export
        if ($artefacts == self::EXPORT_ALL_ARTEFACTS) {
            $query = 'SELECT id FROM {artefact} WHERE "owner" = ?';
            $args = array($userid);
            if (sizeof($tmpviews)) {
                $query .= 'UNION
                    SELECT artefact
                    FROM {view_artefact}
                WHERE "view" IN (SELECT id FROM {view} WHERE "owner" = ?)
                    ORDER BY id';
                $args[] = $userid;
                $this->artefactexportmode = $tempartefacts = get_column_sql($query, $args);
            }
        }
-------------------------------------------------------------------------------------

       $tempartefacts is a is misspelled variable.

Correct variable name is $tmpartefacts.

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

Thanks for the bug report! I'll upload your suggested fix into our code review system.

Cheers,
Aaron

summary: - Bug of export all artefacts
+ Full-portfolio export doesn't include all artefacts
tags: added: leap2a
tags: added: no-behat-needed
Revision history for this message
Aaron Wells (u-aaronw) wrote :

Here's how to replicate the specific bug caused by this problem:

0. Clean install of Mahara
1. Log in as admin
2. Upload some files into your Content -> Files area. (Don't use the images in any pages)
3. Go to Portfolio -> Export
4. Select the "All my data" option, and export.
5. Unzip the generated Leap2a file, and look for your uploaded files.

Expected result: You should see a copy of your uploaded files, in the Leap2a's "files" directory
Actual result: The Leap2a archive will not contain a copy of your uploaded files.

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

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

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

Reviewed: https://reviews.mahara.org/4790
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/951ac53f2ce34d9dcc79d17ea6399b17f5f12a47
Submitter: Aaron Wells (<email address hidden>)
Branch: master

commit 951ac53f2ce34d9dcc79d17ea6399b17f5f12a47
Author: Wen-Chang Chien <email address hidden>
Date: Mon May 25 10:31:26 2015 +1200

Variable name typo breaks artefact export

Bug 1457867

Change-Id: Id9e18b0341589026bff1b67357ab56a667ef3b26

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

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

Reviewed: https://reviews.mahara.org/4792
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/805cc3521228f9fb2986d1f7b36d18eb34c768bb
Submitter: Aaron Wells (<email address hidden>)
Branch: 15.04_STABLE

commit 805cc3521228f9fb2986d1f7b36d18eb34c768bb
Author: Wen-Chang Chien <email address hidden>
Date: Mon May 25 10:31:26 2015 +1200

Variable name typo breaks artefact export

Bug 1457867

Change-Id: Id9e18b0341589026bff1b67357ab56a667ef3b26
(cherry picked from commit 951ac53f2ce34d9dcc79d17ea6399b17f5f12a47)

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.