Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-33719

When overwriting a copy of a file with an alias/shortcut of a file; the file thumbnail is not refreshed in the file manager form element.

    Details

    • Testing Instructions:
      Hide

      Make sure that filemanager window is refreshed after file is overwritten.
      For example, if image is overwritten, the new thumbnail is displayed. When file is overwritten with shortcut, the shortcut link is displayed

      More tests in MDL-39177

      Show
      Make sure that filemanager window is refreshed after file is overwritten. For example, if image is overwritten, the new thumbnail is displayed. When file is overwritten with shortcut, the shortcut link is displayed More tests in MDL-39177
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull Master Branch:
      wip-MDL-33719-master

      Description

      When overwriting a copy of a file with an alias/shortcut of a file; the file icon is not refreshed in the file manager form element. Upon clicking the icon, the dialog that opens contains details of the copy of the file and not the shortcut/alias.

      To recreate:

      Test pre-requisites:

      • A box.net repository is enabled or any other repository that supports shortcuts/aliases.
      1. Log into Moodle as admin, teacher or any role capable of adding a file resource.
      2. Navigate to my private files and add a file, as a shortcut/alias, using file picker.
      3. Navigate to a course page and create a file resource.
      4. Add a file from box.net repository to the file manager form element using the filepicker, selecting to create a copy of the file.
      5. Add the same file to the file manager form element again, from the same repository, selecting the option to create a shortcut/alias of the file.
      6. When prompted select 'overwrite'.
      7. Click on the file icon.

      Expected result:

      • The File icon appears as a shortcut/alias.
      • Upon clicking on the file the details are displayed as a shortcut/alias.

      Actual result:

      • The file icon appears as a file, not a shortcut.
      • The file details are those of the copy of the file and not the shortcut/alias.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            fred Frédéric Massart added a comment -

            This is still an issue in the latest stable. It happens while overwriting an alias with a real file, or a real file with an alias. The problem is not just that the thumbnail is not refreshed, the new file (or link) is not saved, the previous file (or alias) will be kept. 'Deleting' the file (without saving the form) and adding a the new file/link produces the same result. (When I say link, I mean shortcut/alias). See duplicate MDL-33802 for replication steps.

            Show
            fred Frédéric Massart added a comment - This is still an issue in the latest stable. It happens while overwriting an alias with a real file, or a real file with an alias. The problem is not just that the thumbnail is not refreshed, the new file (or link) is not saved, the previous file (or alias) will be kept. 'Deleting' the file (without saving the form) and adding a the new file/link produces the same result. (When I say link, I mean shortcut/alias). See duplicate MDL-33802 for replication steps.
            Hide
            marina Marina Glancy added a comment -

            AFAIK there is just a problem that after 'overwrite' operation the file list is not refreshed in filemanager. There was no need for it in 2.2 but in 2.3 there is much more information about the file than just a name so we need to refresh the list. This was already mentioned in MDL-34194

            Show
            marina Marina Glancy added a comment - AFAIK there is just a problem that after 'overwrite' operation the file list is not refreshed in filemanager. There was no need for it in 2.2 but in 2.3 there is much more information about the file than just a name so we need to refresh the list. This was already mentioned in MDL-34194
            Hide
            salvetore Michael de Raadt added a comment -

            Bumping this issue.

            Show
            salvetore Michael de Raadt added a comment - Bumping this issue.
            Hide
            marina Marina Glancy added a comment -

            I'm working on this issue now.
            Just to update the watchers on progress: Except for a bug that filemanager is not refreshed, there is another bug that reference is not updated when filearea is saved. But when we allow it we need to be sure not to create circular or double references. So there should be one check when user tries to overwrite the file, and another check when user saves draft filearea. Which involves UI change, etc.

            Show
            marina Marina Glancy added a comment - I'm working on this issue now. Just to update the watchers on progress: Except for a bug that filemanager is not refreshed, there is another bug that reference is not updated when filearea is saved. But when we allow it we need to be sure not to create circular or double references. So there should be one check when user tries to overwrite the file, and another check when user saves draft filearea. Which involves UI change, etc.
            Hide
            marina Marina Glancy added a comment -

            TO INTEGRATORS: please don't integrate this issue without MDL-39177

            Show
            marina Marina Glancy added a comment - TO INTEGRATORS: please don't integrate this issue without MDL-39177
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Note to integrators & testers, in other words it means that this issue will be BOTH integrated and tested by MDL-39177, confirmed by Marina.

            Ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Note to integrators & testers, in other words it means that this issue will be BOTH integrated and tested by MDL-39177 , confirmed by Marina. Ciao
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Integrated (23, 24, 25 & master), thanks!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Integrated (23, 24, 25 & master), thanks!
            Hide
            abgreeve Adrian Greeve added a comment -

            I'm assigning Ankit as the tester for this. As Eloy wrote testing MDL-39177 tests this issue. He's put in all the hard work of testing that so he should also get the stats for this issue.

            Show
            abgreeve Adrian Greeve added a comment - I'm assigning Ankit as the tester for this. As Eloy wrote testing MDL-39177 tests this issue. He's put in all the hard work of testing that so he should also get the stats for this issue.
            Hide
            ankit_frenz Ankit Agarwal added a comment -

            Thanks Adrian,
            Passing this as the MDL-39177 is tested now.
            Thanks

            Show
            ankit_frenz Ankit Agarwal added a comment - Thanks Adrian, Passing this as the MDL-39177 is tested now. Thanks
            Hide
            damyon Damyon Wiese added a comment -

            Thanks for your contribution! This issue has been reviewed, integrated, tested and now released to everyone.

            Closing as Fixed!

            Show
            damyon Damyon Wiese added a comment - Thanks for your contribution! This issue has been reviewed, integrated, tested and now released to everyone. Closing as Fixed!

              People

              • Votes:
                2 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  8/Jul/13