Issue Details (XML | Word | Printable)

Key: MDL-16414
Type: Improvement Improvement
Status: Reopened Reopened
Priority: Minor Minor
Assignee: Penny Leach
Reporter: Jerome Mouneyrac
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Portfolio: Download a file

Created: 09/Sep/08 05:48 PM   Updated: 16/Sep/08 10:28 PM
Return to search
Component/s: Portfolio API
Affects Version/s: 2.0
Fix Version/s: 2.0

File Attachments: None
Image Attachments:

1. Screenshot-CF101: Assignment: image - Mozilla Firefox.png
(93 kB)

2. Screenshot-Exporting to portfolio - Mozilla Firefox-1.png
(72 kB)

3. Screenshot-Exporting to portfolio - Mozilla Firefox.png
(92 kB)
Environment: LAMP

Participants: Jerome Mouneyrac, Martin Dougiamas and Penny Leach
Security Level: None
QA Assignee: Martin Dougiamas
Resolved date: 11/Sep/08
Affected Branches: MOODLE_20_STABLE
Fixed Branches: MOODLE_20_STABLE


 Description  « Hide
I think "File Download" plugin should behave differently from other plugin. There is too many steps in order to download a file. I think we should directly download the file when you press the button called "next"/"Add to portfolio". This button could be renamed by javascript into "Download" when "File Download" option is selected.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Jerome Mouneyrac made changes - 09/Sep/08 05:48 PM
Field Original Value New Value
Attachment Screenshot-Exporting to portfolio - Mozilla Firefox.png [ 15103 ]
Jerome Mouneyrac made changes - 09/Sep/08 05:48 PM
Penny Leach added a comment - 10/Sep/08 08:19 PM
Questions:

Do you think it's worthwhile printing the summary of previous exports? That stage gets skipped if it's a first off.

I can skip the config step if there's no config (although I can't guarantee there won't be based on what the calling code needs to know (options) and if there are multiple available export formats)


Penny Leach added a comment - 10/Sep/08 08:23 PM
That was a total brain -> keyboard fail.

The first question still stands.

You were talking about the final screen though, I guess. I will look at that.


mjollnir_ committed 1 file to 'Moodle CVS' - 10/Sep/08 09:07 PM
MDL-16414 - make the download plugin just redirect to the file url
MODIFY portfolio/type/download/Attic/lib.php   Rev. 1.10    (+13 -5 lines)
mjollnir_ committed 1 file to 'Moodle CVS' - 10/Sep/08 09:51 PM
MDL-16414 - backing out earlier patch to try and fix this
MODIFY portfolio/type/download/Attic/lib.php   Rev. 1.11    (+5 -7 lines)
Penny Leach added a comment - 10/Sep/08 09:53 PM
i had a play with this today and it's actually more complicated.

if you just redirect to the file url (causing the download to start on the 'next' button click) you get stuck on that screen with no way to get out of it.

you get the next and cancel buttons, which don't make sense anymore, pressing next again will generate an error because the transfer has completed after the file has been sent, and the cancel button will do the same since it can't get the returnurl anymore either, as the transfer is completed.


Penny Leach added a comment - 10/Sep/08 09:55 PM
Jerome, I'm tempted to close this 'wontfix' as I think the work that needs to go into it is much greater than the potential gain. Please give your comments tomorrow.

Jerome Mouneyrac added a comment - 11/Sep/08 05:31 PM
No worries Penny, I close it as "won't fix".
Anyway first I though it was strange from an user point of view to have the download functionality into "Add to Portfolio". It's not the first place I would look in order to download, even if I understand why it's here (like any portfolio, we export the file). I would rather put a link everywhere, next to "Add to portfolio". Thanks for the time spent to look for a better solution

Jerome Mouneyrac made changes - 11/Sep/08 05:31 PM
Resolution Won't Fix [ 2 ]
Status Open [ 1 ] Resolved [ 5 ]
Penny Leach added a comment - 11/Sep/08 05:35 PM
Actually it was really developed as a proof of concept plugin. I'm not really even sure it makes sense to keep in core, I might move it to contrib before 2.0... although it does start to make more sense as more export formats evolve (eg moodle backup)

Martin Dougiamas added a comment - 16/Sep/08 02:18 PM
Can I reopen this? ... I think this could be improved still.

1. The last page says "Portfolio export complete!" when it isn't complete yet .
2. The download link is tiny and hidden under the "Return to where you were"

Could this this page instead just start the download and then immediately redirect back to where we came from? (Using JS)

Without JS, could it have nice big centered button with "Click here to download your file" and a link beneath it with "Return to Forum: News Forum" (and even better, rewrite the navigation to show the original navigation for the forum plus " -> Portfolio -> Download". And the header could be "Downloading..."


Martin Dougiamas made changes - 16/Sep/08 02:18 PM
Status Resolved [ 5 ] Reopened [ 4 ]
Fix Version/s 2.0 [ 10122 ]
QA Assignee dougiamas
Resolution Won't Fix [ 2 ]
mjollnir_ committed 3 files to 'Moodle CVS' - 16/Sep/08 10:23 PM
MDL-16414 - make the handling of the download portfolio plugin nicer
MODIFY portfolio/type/download/Attic/lib.php   Rev. 1.13    (+9 -1 lines)
ADD portfolio/type/download/Attic/file.php   Rev. 1.1    (+0 -0 lines)
MODIFY lang/en_utf8/portfolio_download.php   Rev. 1.3    (+1 -0 lines)
Penny Leach added a comment - 16/Sep/08 10:28 PM
ok i think this is much better now.

one last thing that could be improved - currently if you export the same content multiple times it creates a new stage to tell you about it - the confirm stage. at least, if there's no export config it creates a new stage. if there is export config (not in the case of download plugin) you don't notice the difference as you always get that screen.

I could make portfolio plugins able to override this and say "don't care about previous exports - skip the confirm stage unless you have other stuff to tell me about (eg actual config options)

That would make the download plugin even faster. Thoughts?


Mitsuhiro Yoshida committed 6 files to 'Lang CVS' - 17/Sep/08 12:49 AM
MDL-16520 - Translated new strings for portfolio.
MDL-16483 - Translated new strings for simple test.
MDL-16519 - Translated a new string for box.net porfolio.
MDL-16414 - Translated a new string for download portfolio.
MDL-15402 - Translated a new string for repository.
MODIFY ja_utf8/portfolio_download.php   Rev. 1.3    (+2 -1 lines)
MODIFY ja_utf8/portfolio.php   Rev. 1.24    (+4 -2 lines)
MODIFY ja_utf8/simpletest.php   Rev. 1.9    (+6 -2 lines)
MODIFY ja_utf8/README   Rev. 1.815    (+1 -1 lines)
MODIFY ja_utf8/repository.php   Rev. 1.26    (+2 -1 lines)
MODIFY ja_utf8/portfolio_boxnet.php   Rev. 1.9    (+2 -1 lines)
martignoni committed 1 file to 'Lang CVS' - 05/Oct/08 04:04 PM
MDL-16414 string added
MODIFY fr_utf8/portfolio_download.php   Rev. 1.3    (+3 -2 lines)