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

Simplify repository API to sync files

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.6
    • 2.6
    • Files API, Repositories
    • MOODLE_26_STABLE
    • MOODLE_26_STABLE
    • wip-MDL-42016-master
    • Hide
      1. Enable and set up repositories box.net, dropbox, filesystem and equella, add files in each of repositories
      2. Create a course with shortcuts to files in all repositories above, a shortcut to file in teacher's private files, and a shortcut to a file in another module of the same course (accessed via Server files). Usually it's easier to create file or folder resource.
      3. Make sure that you can see the correct file size for all those references. To see the filesize you need to edit the resource and click on the file in filemanager. Note that there is a different function responsible for downloading a file and it was not changed in this issue.
      4. Overwrite the files in all repositories with another one that has different size.
      5. Make sure that you can see the correct file size for all references. Note that local repositories should update immediately, filesystem has 1 minute cache lifetime but box.net, dropbox and equella have 24h cache lifetime. You might want to hack the code of function sync_reference() in those repos.
      6. Backup the course
      7. Delete the course
      8. Restore the course
      9. Make sure all filesizes are correct
      10. Delete the course
      11. Update files in all repositories with files with another size
      12. Restore the course
      13. Make sure all filesizes are correct
      14. Make sure that you can download all files (checking for regressions)
      Show
      Enable and set up repositories box.net, dropbox, filesystem and equella, add files in each of repositories Create a course with shortcuts to files in all repositories above, a shortcut to file in teacher's private files, and a shortcut to a file in another module of the same course (accessed via Server files). Usually it's easier to create file or folder resource. Make sure that you can see the correct file size for all those references. To see the filesize you need to edit the resource and click on the file in filemanager. Note that there is a different function responsible for downloading a file and it was not changed in this issue. Overwrite the files in all repositories with another one that has different size. Make sure that you can see the correct file size for all references. Note that local repositories should update immediately, filesystem has 1 minute cache lifetime but box.net, dropbox and equella have 24h cache lifetime. You might want to hack the code of function sync_reference() in those repos. Backup the course Delete the course Restore the course Make sure all filesizes are correct Delete the course Update files in all repositories with files with another size Restore the course Make sure all filesizes are correct Make sure that you can download all files (checking for regressions)

    Description

      At the moment there are 4 functions with confusing names and arguments responsible for syncronising external files. This can be done easier, without static caches, without unnecessary DB queries.

      Also there is absolutely no need to store reference lifetime in DB.

      Attachments

        Issue Links

          Activity

            People

              marina Marina Glancy
              marina Marina Glancy
              Frédéric Massart Frédéric Massart
              Sam Hemelryk Sam Hemelryk
              Jérôme Mouneyrac Jérôme Mouneyrac
              Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                18/Nov/13