|
|
(129 intermediate revisions by 22 users not shown) |
Line 1: |
Line 1: |
| This page describes the specification for a future feature, currently being worked on for Moodle 2.0. This spec is STILL UNDER CONSTRUCTION.
| | {{Template:Migrated|newDocId=/docs/apis/plugintypes/repository}} |
| | | #REDIRECT [[Repository plugins]] |
| ==Overview==
| |
| | |
| The Repository API is a core set of interfaces that all Moodle code will/should use so that we can easily read files from all kinds of external document repository systems.
| |
| | |
| It's important to remember that a repository is generally treated as READ-ONLY. Management of the files is done through the native interface provided by the repository. Publishing of files to a repository is handled by the [[Portfolio API|Portfolio API]].
| |
| | |
| A typical user story:
| |
| | |
| # User wants to add a new resource to a course
| |
| # User clicks the "Choose a resource" button
| |
| # User is able to choose from a list of configured repositories (this step will be skipped if there's only one).
| |
| # User is presented with a simple file picker to choose a document
| |
| # User chooses a document
| |
| # Document is COPIED into Moodle and included in the course.
| |
| | |
| When selecting the document, the user may have options to
| |
| * only return the URL to the file if it's desired to keep it external (but this does present security and integrity risks), or
| |
| * refresh the local file copy regularly and automatically
| |
| | |
| ==Architecture==
| |
| | |
| All file-handling areas in Moodle (eg adding a new resource, adding attachments to a forum post, uploading assignments) will be rewritten to talk to the standard API class API methods in a standard way.
| |
| | |
| Each repository plugin (a standard Moodle plugin stored under /repository/xxx) will subclass the standard API and override methods specific to that repository.
| |
| | |
| As is usual in Moodle, there will be admin settings to disable/enable certain repository plugins as standard, as well as user settings so that users can add their own personal repositories to the standard list (eg [http://briefcase.yahoo.com Yahoo Briefcase] or [http://docs.google.com Google Docs]) and to select their default repository.
| |
| | |
| Note that the current default file manager in Moodle will also be rewritten as a repository plugin.
| |
| | |
| | |
| ==Repository requirements==
| |
| | |
| From the Moodle point of view, each repository is just a hierarchy of nodes.
| |
| | |
| The repository MUST provide:
| |
| # A list of the nodes (eg files and directories) under a given node (eg directory) | |
| # A URL to download each node (eg file).
| |
| | |
| The repository can OPTIONALLY:
| |
| # Require some authentication credentials
| |
| # Provide more metadata about each node (mime type, size, dates, related files, dublin core stuff, etc)
| |
| # Describe a search facility (so that Moodle can construct a search form)
| |
| # Provide copyright and usage rules (or just information about the rules)
| |
| | |
| | |
| ==Repository plugins==
| |
| | |
| Some plugins I'd like to see developed for the first version are:
| |
| * files - very similar to the current course-based file manager
| |
| * moodle - an interface to another Moodle site, accessed over a secure mnet connection
| |
| * jsr170 - an interface that can talk to anything that supports js170 (eg [http://www.alfresco.com/ Alfresco])
| |
| * oki - an OKI emulator allowing us to access things with OKI interfaces,like [http://www.fedora.info/ Fedora]
| |
| * briefcase - an interface to [http://briefcase.yahoo.com/ Yahoo Briefcase]
| |
| * myspace - an interface to MySpace files (perhaps via [http://www.programmableweb.com/api/myspace this MySpace API])
| |
| * googledocs - an interface to [http://dpcs.google.com Google Docs]
| |
| * skydrive - an interface to Microsoft's [http://skydrive.live.com/ SkyDrive] files
| |
| * facebook - an interface to Facebook files
| |
| * merlot - an interface to the learning materials in [http://www.merlot.org/merlot/materials.htm Merlot.org]
| |
| * flickr - an interface to [http://flickr.com flickr]
| |
| * youtube - an interface to [http://youtube.com YouTube]
| |
| * mahara - an interface to a Mahara installation
| |
| | |
| | |
| ==Class methods==
| |
| | |
| Under construction
| |
| | |
| | |
| ==Areas in Moodle that need re-writing==
| |
| | |
| | |
| ==Examples of use==
| |