Issue Details (XML | Word | Printable)

Key: MDL-16520
Type: Sub-task Sub-task
Status: Open Open
Priority: Minor Minor
Assignee: Penny Leach
Reporter: Martin Dougiamas
Votes: 0
Watchers: 1
Operations

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

Failed portfolio exports result in an ugly error message that users should never see

Created: 16/Sep/08 11:12 AM   Updated: 01/Mar/09 08:05 PM
Return to search
Component/s: Portfolio API
Affects Version/s: 2.0
Fix Version/s: 2.0

File Attachments: None
Image Attachments:

1. add_warning.png
(12 kB)

2. The error message that users should never see.jpg
(65 kB)

Participants: Dan Poltawski, Martin Dougiamas and Penny Leach
Security Level: None
QA Assignee: Martin Dougiamas
Affected Branches: MOODLE_20_STABLE
Fixed Branches: MOODLE_20_STABLE


 Description  « Hide
1) Start an export from a forum post to Box.net
2) Change your mind when authenticating
3) Go back to the forum discussion
4) Observe the carnage (error message contains CONTROLS and also prevents forum display)

I think it should still show the forum discussion, and perhaps have a little alerting "!" icon or something next to the "Add to portfolio" link to show that it's in progress and some , clicking on it would go to a separate screen that tells you what is going on and lets you cancel/complete etc.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Martin Dougiamas added a comment - 16/Sep/08 11:13 AM
Added a screenshot

Penny Leach added a comment - 16/Sep/08 06:41 PM
i committed a fix to HEAD for this. currently there are 4 types of displays for the portfolio button and I could use a bit of help on the wording for some of them.

1. full form (includes dropdown of plugins) + button
2. dropdown of plugins + icon
3. icon by itself
4. text link

2 and 3 are fine, as I just put a ! on the existing portfolio icon (ignoring the fact that both of these will need to change probably)

1 and 4 share the same text, which is currently 'Add to portfolio - needs attention' which I'm not happy with.

I played with making it always be the icon by itself but in some places you really do want the button and the link.

At any rate, the code to handle this is done and the display is in lib/portfoliolib (already_exporting method on button class) and the wording is in language strings so very trivial to change later if someone has brilliant ideas about wording.

Martin I'm assigning you QA on this, please close the bug if you're happy with the reimplementation.


Penny Leach added a comment - 16/Sep/08 06:42 PM
Hmm, I guess I could still display the button or link as they are with a ! or the icon ... I'll keep playing with it.

Penny Leach added a comment - 16/Sep/08 08:29 PM
ready for QA.

Dan Poltawski added a comment - 17/Sep/08 04:40 AM
Just a note that at the moment you can:
  • Run a forum portfolio export and give up in the middle
  • Hop along to a glossary
  • Run porfolio export and see the 'in progress' warning but also a big friendly 'Add to Portfolio' button like add_warning screenshot

This will then allow you to cancel or continue the existing portfolio export - however if I cancel it, it will return me to the forum rather than the glossary which I was just trying to export (and cancel all existing session).


Penny Leach added a comment - 17/Sep/08 04:46 AM


To clarify, I think the best solution is to take away the offer to add anything anywhere when there's an active session, and go back to having JUST the "!" link which takes you to the helpful page (although then it's still going to bounce you back to forum, not glossary) but at least it follows more logically.

Penny Leach added a comment - 17/Sep/08 04:48 AM
code-wise there are two things here.

1. portfolio_button->print_already_exporting (handles the drawing of the ! stuff)

2. porttfolio_exporter->cancel_request

the second one is the problem. it doesn't know whether you've cancelled a portfolio export in-line (logically return to forum in dan's case), or if you've reawakened one from somewhere else (glossary in dan's case) and you should go back there.

the only thing I can really think of doing is make 1. add an extra parameter to 2. to bounce somewhere else ratehr than the return url of the original export.

(running out of time )


Martin Dougiamas added a comment - 17/Sep/08 06:33 PM
Following our longish talk just now, I think it would be a lot simpler if we just don't worry about showing all already.php at all. We should just destroy the incomplete export (with a little message that we did so) and plough on with the new export.

Exports are such small things (user-wise) all this complication in the interface doesn't seem worth it. Keep it simple.

Might have to have something polite happen just in case they go back to another open window and try to submit a form on the now-destroyed export session (such as a notice like "this export has timed out, start again").

Perhaps just comment out relevant code in case I'm completely wrong.

Thanks Penny! (hug)


Penny Leach added a comment - 01/Mar/09 08:05 PM
I just made it so that when an exception happens the incomplete export is automatically killed when the 'export failed' screen is shown, which really helps (and I can't see why it wasn't like that already, but I put a comment about it in lib/portfolio/exceptions.php)