Moodle
  1. Moodle
  2. MDL-32079

Folder revision number not updated on file upload / caching of files

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.1
    • Fix Version/s: 2.1.6, 2.2.3
    • Component/s: Resource
    • Labels:
    • Testing Instructions:
      Hide

      1/ create folder instance with some files
      2/ find revision number in file links (in place of itemid in pluginfile.php link)
      3/ hit edit and submit for saving
      4/ verify the revision was incremeneted

      Show
      1/ create folder instance with some files 2/ find revision number in file links (in place of itemid in pluginfile.php link) 3/ hit edit and submit for saving 4/ verify the revision was incremeneted
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w12_MDL-32079_m23_folderrev
    • Rank:
      38775

      Description

      When updating a Folder's files through the 'Edit' option (not within settings, but within the Folder resource: mod/folder/edit.php), uploading/changing files does not increase the folder's revision number.
      This becomes an issue when a file with the same name is uploaded and overwritten, since the browser will use a cached version of the file. Since the file link contains the revision number, this problem would be fixed by updating the revision number whenever the folder's files are updated.

        Issue Links

          Activity

          Hide
          Petr Škoda added a comment -

          thanks a lot for the report

          Show
          Petr Škoda added a comment - thanks a lot for the report
          Hide
          Sam Hemelryk added a comment -

          Thanks Petr - this has been integrated now

          Show
          Sam Hemelryk added a comment - Thanks Petr - this has been integrated now
          Hide
          R Y added a comment -

          This patch seems to fix the problem (tested for version 2.2.1). Thanks.

          Show
          R Y added a comment - This patch seems to fix the problem (tested for version 2.2.1). Thanks.
          Hide
          Adrian Greeve added a comment -

          Tested branches 2.1, 2.2 and master. I found the entry in the database and checked to make sure that the revision number incremented after the submit was made.
          Works as specified.
          Thanks.

          Show
          Adrian Greeve added a comment - Tested branches 2.1, 2.2 and master. I found the entry in the database and checked to make sure that the revision number incremented after the submit was made. Works as specified. Thanks.
          Hide
          Sam Hemelryk added a comment -

          Congratulations are in order, you've made it, or at least your code has!
          It's now part of Moodle and both the git and cvs repositories have been updated.

          This issue is being marked as fixed and closed.

          Thank you.

          Show
          Sam Hemelryk added a comment - Congratulations are in order, you've made it, or at least your code has! It's now part of Moodle and both the git and cvs repositories have been updated. This issue is being marked as fixed and closed. Thank you.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: