Moodle
  1. Moodle
  2. MDL-34185

File system repository linking does not work in 2.3

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3.2
    • Component/s: Repositories
    • Labels:
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Rank:
      42521

      Description

      steps to reproduce this error.
      create a repository.
      create a file in the repository named 'a.txt' with contents 'a'
      select a course
      add an activity or resource to the course.
      select file resource, click add, name = a, description = a
      content add, select file a.txt in repository
      select 'Create an alias/shortcut to the file'
      select this file.
      save and display
      ensure file a.txt shows file contents 'a'

      now, edit the file a.txt to have contents 'b'
      in moodle, the file resource a still shows 'a', NOT 'b'

      this is a serious error. the way that moodle handles repositories has caused me countless hours of work as i have hundreds of references to a few files. updating files is a total nightmare.
      i have upgraded to 2.3 (where this issues was meant to be fixed) only to find that the over-engineered backwards way of handling a link still does not work.
      all i need is to link to a file in the repository, then if i update that file, the new file gets linked to in the moodle browser.
      if i wanted a new version of the file, i would give the file a different name.

      Question.
      why does my moodle LMS that has about 200mb of content have a moodle data folder that is 16GB? because each instance of a file is re-copied to the system. with content pdfs linked to each of the 2000+ questions as help, it just adds up.

        Issue Links

          Activity

          Hide
          Helen Foster added a comment -

          Hi Peter,

          In your steps to reproduce, you state "create a repository". Please could you clarify which repository type you are referring to.

          Show
          Helen Foster added a comment - Hi Peter, In your steps to reproduce, you state "create a repository". Please could you clarify which repository type you are referring to.
          Hide
          Peter Gee added a comment -

          hi helen, thanks for looking to this.
          on the server
          cd /var/www/data/moodledata/repository/
          mkdir temp

          on the moodle website:
          site administration: plugins:repositories:manage repositories: file system (make sure this is enabled)
          site administration: plugins:repositories: file system: ' create a repository instance'

          select 'temp' from the select option group. enter a name for the folder.
          save.

          Show
          Peter Gee added a comment - hi helen, thanks for looking to this. on the server cd /var/www/data/moodledata/repository/ mkdir temp on the moodle website: site administration: plugins:repositories:manage repositories: file system (make sure this is enabled) site administration: plugins:repositories: file system: ' create a repository instance' select 'temp' from the select option group. enter a name for the folder. save.
          Hide
          Mary Cooch added a comment -

          Hello Peter. I just changed the title of your issue to reflect that it is the file system repository you are talking about.

          Show
          Mary Cooch added a comment - Hello Peter. I just changed the title of your issue to reflect that it is the file system repository you are talking about.
          Hide
          Mary Cooch added a comment -

          I was just playing with this myself and I cannot get it to work either. But it might be me!
          I followed the same steps as Peter. I found that, if I add a file as an alias to my course it does not change when I change the original file. However - if I add the file AGAIN as an alias elsewhere my course I do get the revised version. But the first time I added it , it still does not reflect the changes. I even tried running cron but that didn't help. Can't think of anything else to try.

          Show
          Mary Cooch added a comment - I was just playing with this myself and I cannot get it to work either. But it might be me! I followed the same steps as Peter. I found that, if I add a file as an alias to my course it does not change when I change the original file. However - if I add the file AGAIN as an alias elsewhere my course I do get the revised version. But the first time I added it , it still does not reflect the changes. I even tried running cron but that didn't help. Can't think of anything else to try.
          Hide
          Marty Gilbert added a comment -

          This doesn't work for me, either, but I'm using Dropbox, not File System, as my repo.

          Same exact steps to reproduce:
          1. Add a file resource to a course from Dropbox; make sure 'alias/shortcut' is referenced.
          2. Open the file; the file opens fine.
          3. Edit the file in your Dropbox repository. Change the content and save the document.
          4. Click the file resource created in steps 1 & 2 - the changed content is not shown.
          5. Open the file directly from the Dropbox website - changed (new) content IS shown.

          I thought it might be a browser cache issue, so I cleared cache, tried different browsers, and tried different computers; all show the original (not modified) content.

          The alias/shortcut thing is exciting, but it has to work, first!

          Show
          Marty Gilbert added a comment - This doesn't work for me, either, but I'm using Dropbox, not File System, as my repo. Same exact steps to reproduce: 1. Add a file resource to a course from Dropbox; make sure 'alias/shortcut' is referenced. 2. Open the file; the file opens fine. 3. Edit the file in your Dropbox repository. Change the content and save the document. 4. Click the file resource created in steps 1 & 2 - the changed content is not shown. 5. Open the file directly from the Dropbox website - changed (new) content IS shown. I thought it might be a browser cache issue, so I cleared cache, tried different browsers, and tried different computers; all show the original (not modified) content. The alias/shortcut thing is exciting, but it has to work, first!
          Hide
          Martin Dougiamas added a comment -

          See MDL-34290 for some related bug fixing about Dropbox.

          Show
          Martin Dougiamas added a comment - See MDL-34290 for some related bug fixing about Dropbox.
          Hide
          Frédéric Massart added a comment -

          Hi Peter, Mary,

          I have tried to reproduce this bug on Moodle 2.3.1+ (20120809) and Moodle 2.4dev (20120809) but it appears to work all fine. I tried both with a File resource and a Folder resource. Could you please try again on your side and tell me if this works for you. If it does not, could you precise the version of Moodle you were using?

          Also, if you are working with a .txt file, please try to refresh the browser page to reload the file content. (shortcut CTRL + F5)

          Thank you!

          Show
          Frédéric Massart added a comment - Hi Peter, Mary, I have tried to reproduce this bug on Moodle 2.3.1+ (20120809) and Moodle 2.4dev (20120809) but it appears to work all fine. I tried both with a File resource and a Folder resource. Could you please try again on your side and tell me if this works for you. If it does not, could you precise the version of Moodle you were using? Also, if you are working with a .txt file, please try to refresh the browser page to reload the file content. (shortcut CTRL + F5) Thank you!
          Hide
          Martin Dougiamas added a comment -

          I saw this working great on Fred's site for a Filesystem repo, exactly as it should with no lag.

          Show
          Martin Dougiamas added a comment - I saw this working great on Fred's site for a Filesystem repo, exactly as it should with no lag.
          Hide
          Mary Cooch added a comment -

          I have checked this on my Moodle 2.3.1+ (Build: 20120816) and on Moodle 2.4dev (Build: 20120816) (which I got via GIT ) and they both work fine - I will check on my original, online and older version of Moodle 2.3 to see if it was maybe just needing browser refresh but in the meantime I agree this is not a problem.

          Show
          Mary Cooch added a comment - I have checked this on my Moodle 2.3.1+ (Build: 20120816) and on Moodle 2.4dev (Build: 20120816) (which I got via GIT ) and they both work fine - I will check on my original, online and older version of Moodle 2.3 to see if it was maybe just needing browser refresh but in the meantime I agree this is not a problem.
          Hide
          Marina Glancy added a comment -

          There were some problems with synchronisation that are fixed in MDL-34290. Also within this task I changed the sync lifetime for filesystem down to 60 seconds. So all changes to the original files must be updated in moodle within 1 minute. Please retest the issue after MDL-34290 is integrated

          Show
          Marina Glancy added a comment - There were some problems with synchronisation that are fixed in MDL-34290 . Also within this task I changed the sync lifetime for filesystem down to 60 seconds. So all changes to the original files must be updated in moodle within 1 minute. Please retest the issue after MDL-34290 is integrated
          Hide
          Peter Gee added a comment -

          hi marina thanks for looking into this. i have been busy on another project and have only had time to look at this now.

          i have upgraded my moodle installation to Moodle 2.3.2 (Build: 20120910)
          my gitk confirms that the changes introduced in MDL 34290 have been integrated.

          i can confirm that the option 'Create an alias/shortcut to the file' works as expected.
          i did need to refresh the browser for it to work but that is fine.

          thanks again for fixing this and as far as i am concerned the issue can be closed.

          Show
          Peter Gee added a comment - hi marina thanks for looking into this. i have been busy on another project and have only had time to look at this now. i have upgraded my moodle installation to Moodle 2.3.2 (Build: 20120910) my gitk confirms that the changes introduced in MDL 34290 have been integrated. i can confirm that the option 'Create an alias/shortcut to the file' works as expected. i did need to refresh the browser for it to work but that is fine. thanks again for fixing this and as far as i am concerned the issue can be closed.
          Hide
          Helen Foster added a comment -

          Thanks Peter for your feedback. Closing as suggested.

          Show
          Helen Foster added a comment - Thanks Peter for your feedback. Closing as suggested.

            People

            • Votes:
              3 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: