|
[
Permalink
| « Hide
]
Tim Hunt added a comment - 19/Mar/08 12:23 AM
Is it OK to commit the attached patches to 1.9 and HEAD? I've tested, and the JavaScript works in IE and Firefox.
going to test it with more browsers later today...
The trouble is that the button does not work if you use Back in browser.
Alternative solution could be to ignore abort from browser and always complete the export before starting a new one from the second click. funny, the button is disabled after Back only in FF
IE6/7/8, Konqueror, Opera - all work fine I think we do that, at least here at the OU, because we use session locking, so only one request can be active on a session at one time. However, the problem with that is that you end up seeing the results of the second export, which is blank, because you are only exporting grades that have changed since the previous export, which was half a second ago.
I don't think it is a major problem if the button stays disabled when you click back. If clicking the button changes the state of Moodle, the it is probably good that you have to reload the first page to re-enable the button, because that will repeat any checks that are done before the button is shown. For example, my new code would be useful in backup and restore. You know the way that if you: 1. try a backup and get an error message You then get an error about there not being a backup with that id. You actually have to click back about 4 times, then go through all the forms again. Well, the functionality I have just implemented would be perfect for that situation. I doubt you disable abort of PHP scripts, at present only a few areas of Moodle do that - upgrade code and proposed send_temp_file()
1/ my +0.9 for this, going to ask MD tomorrow for confirmation
we should imho document the disabled button when going back in FF somewhere 2/ my +1 to implement the same option in formslib - modedit would be the first user 3/ we could sprinkle some ignore abort directives, not everybody has it in php.ini like OU - candidates are grade xml export and modedit form |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||