Project

General

Profile

Bug #8417

Documents/Upload: Inconsistant default to "Rename the uploaded file if it exists" with "Uncompress zip" active

Added by Matthieu Moy almost 3 years ago. Updated almost 3 years ago.

Status:
Needs more info
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
24/08/2016
Due date:
% Done:

0%

Estimated time:
Complexity:
Normal
SCRUM pts - complexity:
?

Description

In the "Upload (Simple)" tab, ticking the "Uncompress zip" checkbox automatically selects "Overwrite the existing file" (check_unzip() in JavaScript) and prevents the user from ticking anything else.

However, when visiting the "Upload (Simple)" after having uploaded a file with "Uncompress zip", the "Uncompress zip" checkbox is selected by default (Chamilo seem to remember it from my last visit). The HTML code is:

<label class=""><input onclick= "javascript: check_unzip();" value= "1" name= "unzip" type= "checkbox" id= "qf_8dcd39" checked= "checked" />Uncompress zip</label>

However, the radio buttons below still have "Rename the uploaded file if it exists" checked. HTML code:

                    <div class="radio"><label class=""><input name= "if_exists" value= "overwrite" type= "radio" id= "qf_abb620" />Overwrite the existing file</label></div></div>
...
                    <div class="radio"><label class=""><input name= "if_exists" value= "rename" type= "radio" id= "qf_a26157" checked= "checked" />Rename the uploaded file if it exists</label></div></div>

Keeping the default leads to the supposedly forbidden combination "Rename the uploaded file if it exists"+"Uncompress zip".

Expected behavior:

If "Uncompress zip" is checked by default, then "Overwrite the existing file" should be selected too.

History

#1

Updated by Julio Montoya almost 3 years ago

  • Status changed from New to Needs more info

Now there's a redirection to reload the settings by default fixed with:

https://github.com/chamilo/chamilo-lms/commit/ebaaef39493c50b81529ed60766a4addef20469a

Also available in: Atom PDF