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

Simplify repository API to sync files

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.6
    • Component/s: Files API, Repositories
    • Labels:
    • Testing Instructions:
      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)
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull Master Branch:
      wip-MDL-42016-master

      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

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  18/Nov/13