|
Hi
I am a member of Moodle UFBA (Universidade Federal da Bahia - Brazil) team. I solved this for version 1.8 but I think this can fix the problem for other versions too. The solution is simple... when trying to upload a file, an AJAX script makes a request to the server to check if the file exists or not. If true, a javascript confirm box asks the user if he wants to overwrite the file or not. I don't know what exactly I must do to show this fix... by the time, the fix is shown below: This javascript is added at files/index.php, just above the form printing: <script type="text/javascript"> At the form tag, we add: onsubmit=\"return file_exists(document.forms[0].userfile.value)\"> This is the PHP script called by the AJAX request to check if the file exists. Meaninfully, it is called file_exists.php and must be located at the folder files/ : <?php I will check the way I must pass through to make this available (of course, if approved) And it persists in 1.9.3 + - and currently, we are not even sure that overwriting a file is even possible - our current experiments are showing us that if we upload a file, make changes to the original, upload the newly changed file with same name - it will say it uploaded successfully but will not actually update the file - at least in the same browser!
1) I downloaded a DOC file - from a course 2) I made changes to the file - BUT - if I go to open in in another browser, (Seamonkey instead of Firefox) - the newer version downloads. very strange. For performance reasons course files are cached in browser - you need to use a different name or clear browser cache. This problem will be solved in 2.0.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
I think this is quite an important annoyance but I have no good idea of what to do about it. Of course if we already had the new Moodle DMS with is version control ...