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

Extend repository API to create file references to external repository contents (like Equella)

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.2.1
    • Fix Version/s: DEV backlog
    • Component/s: Repositories
    • Labels:
    • Testing Instructions:
      Hide

      This issue needs a lot of tests.

      Changes overview

      • File APIs changes to support external files
      • Repository APIs changes to serve external files
      • Ability to cache external files
      • Backup/restore external file entries on same site
      • File picker can display iframe inside and pick a file from external repository (equella)

      Boxnet repository plugin

      • Pick a file from box.net using file reference in editor, save it, and edit it again, make sure no broken files
      • Pick a file from box.net without file reference, save it, edit again, make sure no broken files
      • Do the same tasks as above in file manager

      Dropbox repository plugin

      • Pick a file from dropbox repo using file reference in editor, save it, and edit it again, make sure no broken files, check moodledata/cache/filedir, make sure there is a file copy in there
      • Do the same task as above in file manager
      • Run cron in cli, looking the output, make sure dropbox is checking external files belonging to dropbox

      Private files repository plugin

      • Pick a file from private files repo plugin using file reference in editor, save it, and edit it again, make sure no broken files
      • Do the same task as above in file manager

      Server files repository plugin

      • Pick a file from server files repo plugin using file reference in editor, save it, and edit it again, make sure no broken files
      • Do the same task as above in file manager

      File system repository plugin

      • Pick a file from file system repo plugin using file reference in editor, save it, and edit it again, make sure no broken files
      • Replace the file you previous picked in disk, make sure the file in moodle get updated too, NOTE, chrome caches images very well, make sure you clean all browser caches to reflect changes.

      Pick a file reference from private files repo

      • Edit your private files, and pick a file from file system repo plugin using file reference
      • Make sure that file is viewable in private files tree
      • Go to moodle forum, add a new post, pick this file from private area, save it, make sure this file is viewable in forum
      • Replace the file from file system plugin in disk, the references in private file area and forum should get updated too

      Hide or disable repository plugins

      • Hide a repository plugin or instance won't affect external files
      • Disable repository plugin or instances, will ask user to copy all external files to local, or do nothing, in case of doing nothing, all external files will be broken

      Backup

      • Backup a course with file references
      • And the end of backup process, you should be able to see a warning, "There are file references in this course, they can only be restored in this site"

      Restore

      • Restore a backup package contains file references in the same site, files should be restored and worked
      • Restore a backup package contains file references in different sites, at the end of restoring process, you will warned some files cannot be restored because they are references

      Choose external files in file picker

      • Testing pick a file from equella
      • equella should be displayed fully in file picker window
      • Pick a file from equella repo will get you back the renaming && license selection screen just like other repo plugins
      Show
      This issue needs a lot of tests. Changes overview File APIs changes to support external files Repository APIs changes to serve external files Ability to cache external files Backup/restore external file entries on same site File picker can display iframe inside and pick a file from external repository (equella) Boxnet repository plugin Pick a file from box.net using file reference in editor, save it, and edit it again, make sure no broken files Pick a file from box.net without file reference, save it, edit again, make sure no broken files Do the same tasks as above in file manager Dropbox repository plugin Pick a file from dropbox repo using file reference in editor, save it, and edit it again, make sure no broken files, check moodledata/cache/filedir, make sure there is a file copy in there Do the same task as above in file manager Run cron in cli, looking the output, make sure dropbox is checking external files belonging to dropbox Private files repository plugin Pick a file from private files repo plugin using file reference in editor, save it, and edit it again, make sure no broken files Do the same task as above in file manager Server files repository plugin Pick a file from server files repo plugin using file reference in editor, save it, and edit it again, make sure no broken files Do the same task as above in file manager File system repository plugin Pick a file from file system repo plugin using file reference in editor, save it, and edit it again, make sure no broken files Replace the file you previous picked in disk, make sure the file in moodle get updated too, NOTE, chrome caches images very well, make sure you clean all browser caches to reflect changes. Pick a file reference from private files repo Edit your private files, and pick a file from file system repo plugin using file reference Make sure that file is viewable in private files tree Go to moodle forum, add a new post, pick this file from private area, save it, make sure this file is viewable in forum Replace the file from file system plugin in disk, the references in private file area and forum should get updated too Hide or disable repository plugins Hide a repository plugin or instance won't affect external files Disable repository plugin or instances, will ask user to copy all external files to local, or do nothing, in case of doing nothing, all external files will be broken Backup Backup a course with file references And the end of backup process, you should be able to see a warning, "There are file references in this course, they can only be restored in this site" Restore Restore a backup package contains file references in the same site, files should be restored and worked Restore a backup package contains file references in different sites, at the end of restoring process, you will warned some files cannot be restored because they are references Choose external files in file picker Testing pick a file from equella equella should be displayed fully in file picker window Pick a file from equella repo will get you back the renaming && license selection screen just like other repo plugins
    • Affected Branches:
      MOODLE_22_STABLE

      Description

      Our repository API does not currently support anything beyond hierarchies of simple objects.

      Need to support:

      • complex objects
      • versioned objects
      • more metadata

      while maintaining security and updatability of files.

      As proof of concept develop the Equella module.

        Gliffy Diagrams

          Attachments

          1. 2011-11-09 15.23.bmml
            3 kB
          2. 2011-11-09 15.23.bmml
            3 kB
          3. 2011-11-09 15.23.png
            2011-11-09 15.23.png
            18 kB
          4. external-repo-smurf.xml
            84 kB
          5. File picker options.bmml
            3 kB
          6. File picker options.png
            File picker options.png
            28 kB

            Issue Links

              Activity

                People

                • Votes:
                  36 Vote for this issue
                  Watchers:
                  33 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: