"Export users to Leap2A files" fails if indiviual users are specified

Bug #832409 reported by Iñaki Arenaza
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Iñaki Arenaza

Bug Description

In 1.4_STABLE, when we try to export users to Leap2A file (in /admin/users/bulkexport.php), if we list indiviual users instead of leaving the "usernanames to export" list empty, we get a 'Not Found' in the progress bar and no download is offered. We also get errors similar to these:

[Wed Aug 24 00:43:25 2011] [error] [client ::1] [INF] 38 (admin/users/bulkdownload.php:218) Exported 3 users to /usr/src/mahara/uploaddir/export/1/1314139405/mahara-bulk-export-1314139405.zip, referer: http://localhost/mahara-14/admin/users/bulkexport.php
[Wed Aug 24 00:43:25 2011] [error] [client ::1] script '/var/www/mahara-14/admin/users/download.php' not found or unable to stat, referer: http://localhost/mahara-14/admin/users/bulkdownload.php

In master, if we leave the "usernanames to export" list empty, we get a 'Not Found' in the progress bar and no download is offered. If we specify a valid user and enter a new line character, the progress bar doesn't display anything but the download is offered. If we specify a valid user but don't enter a new line character, we get a 'Not Found' in the progress bar and no download is offered. We also get similar errors to the above ones.

The problem is in lib/htmloutput.php, function print_export_footer(), that hardcodes the new document location to 'download.php', while bulkexport.php needs to redirect to 'bulkdownload.php'

Proposed (and tested) fixes will be sent to reviews.mahara.org in a few minutes.

Saludos.
Iñaki.

Tags: patch
Revision history for this message
François Marier (fmarier) wrote :
Changed in mahara:
milestone: none → 1.4.1
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
François Marier (fmarier) wrote :

Changing the milestone back to 1.5.0 since the bug is in a not-very-official part of the code that is not linked to from the UI. (Also it's not a regression.)

Changed in mahara:
milestone: 1.4.1 → 1.5.0
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/611
Committed: http://gitorious.org/mahara/mahara/commit/e666019aad5b4bdacd2374f9b24276197a91b2d4
Submitter: Francois Marier (<email address hidden>)
Branch: master

commit e666019aad5b4bdacd2374f9b24276197a91b2d4
Author: I��aki Arenaza <email address hidden>
Date: Wed Aug 24 00:19:00 2011 +0200

    Don't hardcode new location in print_export_footer()

    Fixes bug #832409

    Change-Id: I8ea6c381f9203d39b518b738c0d2d7d6219cf349
    Signed-off-by: I��aki Arenaza <email address hidden>

Changed in mahara:
status: Triaged → Fix Committed
assignee: nobody → Iñaki Arenaza (iarenaza)
Melissa Draper (melissa)
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.