<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.moodle.org/dev/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Htchs</id>
	<title>MoodleDocs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.moodle.org/dev/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Htchs"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/Special:Contributions/Htchs"/>
	<updated>2026-08-17T02:18:19Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Repository_API&amp;diff=6010</id>
		<title>Repository API</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Repository_API&amp;diff=6010"/>
		<updated>2008-04-29T02:48:21Z</updated>

		<summary type="html">&lt;p&gt;Htchs: /* repository */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the specification for a future feature, currently being worked on for Moodle 2.0.  This spec is STILL UNDER CONSTRUCTION.&lt;br /&gt;
&lt;br /&gt;
See MDL-13766 to track the status of the implementation.&lt;br /&gt;
&lt;br /&gt;
The page is open for everyone so everyone can help correct mistakes and help with the evolution of this document.  However, if you have questions to ask, problems to report or major changes to suggest, please add them to the [[Development_talk:Repository_API|page comments]], or start a discussion in the [http://moodle.org/mod/forum/view.php?id=1807 Repositories forum].  We&#039;ll endeavour to merge all such suggestions into the main spec before we start development.&lt;br /&gt;
&lt;br /&gt;
Note that parts of this document have been now split off into a separate [[File_API]]&lt;br /&gt;
&lt;br /&gt;
==Objectives==&lt;br /&gt;
&lt;br /&gt;
# Allow all Moodle users to easily bring content into Moodle from external repositories&lt;br /&gt;
# Provide a consistent interface to any external repository, for any Moodle module&lt;br /&gt;
&lt;br /&gt;
==Use cases==&lt;br /&gt;
&lt;br /&gt;
===Teacher adding an external file as a new resource===&lt;br /&gt;
&lt;br /&gt;
# Teacher wants to add a new resource to a course &lt;br /&gt;
# Teacher clicks the &amp;quot;Choose a resource&amp;quot; button&lt;br /&gt;
# Teacher is presented with a simple file picker to choose a file (with a menu to switch between multiple configured repositories)&lt;br /&gt;
# Teacher chooses a file in an external repository&lt;br /&gt;
# File is COPIED into Moodle and stored by the resource module&lt;br /&gt;
# File is marked as owned by that user&lt;br /&gt;
# Whenever someone wants to view that file, the resource module controls access  (see [[File API]] )&lt;br /&gt;
&lt;br /&gt;
===Student submitting an assignment===&lt;br /&gt;
# Student needs to submit an assignment and presses the &amp;quot;Choose files&amp;quot; button&lt;br /&gt;
# Student sees a &amp;quot;file picker&amp;quot; where they can see files listed on any of several configured repositories&lt;br /&gt;
# Student chooses MySpace from the list&lt;br /&gt;
# Student is prompted to enter MySpace username/password (if admin allows it, a checkbox could be there to &amp;quot;remember this for next time&amp;quot; but remember security)&lt;br /&gt;
# Student sees their files in MySpace and chooses one or more&lt;br /&gt;
# Files are copied from MySpace to Moodle &lt;br /&gt;
# Assignment module controls the permissions so that only the Student and assignment graders can see the file (other students would not have permission).&lt;br /&gt;
&lt;br /&gt;
===Student attaching an image to a forum===&lt;br /&gt;
# Student needs to attach an image and presses the &amp;quot;Choose files&amp;quot; button in the posting screen&lt;br /&gt;
# Student sees a &amp;quot;file picker&amp;quot; where they can see files listed on any of several configured repositories&lt;br /&gt;
# Student chooses Mahara from the list&lt;br /&gt;
# Student is prompted to enter Mahara username/password&lt;br /&gt;
# Student sees their files in Mahara and chooses one image&lt;br /&gt;
# Image is copied to Moodle &lt;br /&gt;
# Image file is attached to forum post by Forum module (by reference)&lt;br /&gt;
# Forum module controls permissions so that anyone who can read that forum can see that file&lt;br /&gt;
&lt;br /&gt;
===Student attaching the same image in another forum===&lt;br /&gt;
&lt;br /&gt;
# Student needs to submit an assignment and presses the &amp;quot;Choose files&amp;quot; button&lt;br /&gt;
# Student sees a &amp;quot;file picker&amp;quot; where they can see files listed on any of several configured repositories&lt;br /&gt;
# Student chooses &amp;quot;Local files&amp;quot; from the list and sees all the files they&#039;ve uploaded before&lt;br /&gt;
# A COPY of the image file is attached to forum post by Forum module&lt;br /&gt;
# Forum module controls access to this file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please add more use cases in this same format&lt;br /&gt;
&lt;br /&gt;
==General architecture==&lt;br /&gt;
&lt;br /&gt;
Each repository plugin (a standard Moodle plugin stored under /repository/xxx) will subclass the standard API and override methods specific to that repository.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Once a repository has been used the file will usually be copied into Moodle there and then.  However there will also be options to:&lt;br /&gt;
* only return the URL to the file if it&#039;s desired to keep it external (but this does present security and integrity risks), or&lt;br /&gt;
* refresh the local file copy regularly and automatically&lt;br /&gt;
* refresh the file manually if desired&lt;br /&gt;
&lt;br /&gt;
Once in Moodle, it is subject to the [[File API]] for access control like any other file.&lt;br /&gt;
&lt;br /&gt;
==Repository requirements==&lt;br /&gt;
&lt;br /&gt;
From the Moodle point of view, each repository is just a hierarchy of nodes.&lt;br /&gt;
&lt;br /&gt;
The repository MUST provide:&lt;br /&gt;
# A URL to download each node (eg file).&lt;br /&gt;
# A list of the nodes (eg files and directories) under a given node (eg directory).  This allows Moodle to construct a standard browse interface (much like a standard OS file picker).  However some repository plugins may choose to completely override the repository_browse() method and implement their own interface, that&#039;s OK, as long as they end up with a URL for the file.&lt;br /&gt;
&lt;br /&gt;
The repository can OPTIONALLY:&lt;br /&gt;
# Require some authentication credentials &lt;br /&gt;
# Provide more metadata about each node (mime type, size, dates, related files, dublin core stuff, etc)&lt;br /&gt;
# Describe a search facility (so that Moodle can construct a search form)&lt;br /&gt;
# Provide copyright and usage rules (or just information about the rules)&lt;br /&gt;
&lt;br /&gt;
==Repository plugins==&lt;br /&gt;
&lt;br /&gt;
Some plugins I&#039;d like to see developed for the first version are:&lt;br /&gt;
* local - very similar to the current course-based file manager, except user-based&lt;br /&gt;
* moodle - an interface to another Moodle site, accessed over a secure mnet connection&lt;br /&gt;
* jsr170 - an interface that can talk to anything that supports jsr170 (eg [http://www.alfresco.com/ Alfresco])&lt;br /&gt;
* oki - an OKI emulator allowing us to access things with OKI interfaces,like [http://www.fedora.info/ Fedora]&lt;br /&gt;
* briefcase - an interface to [http://briefcase.yahoo.com/ Yahoo Briefcase]&lt;br /&gt;
* myspace - an interface to MySpace files (perhaps via [http://www.programmableweb.com/api/myspace this MySpace API])&lt;br /&gt;
* googledocs - an interface to [http://docs.google.com Google Docs]&lt;br /&gt;
* skydrive - an interface to Microsoft&#039;s [http://skydrive.live.com/ SkyDrive] files&lt;br /&gt;
* facebook - an interface to Facebook files&lt;br /&gt;
* merlot - an interface to the learning materials in [http://www.merlot.org/merlot/materials.htm Merlot.org]&lt;br /&gt;
* flickr - an interface to [http://flickr.com flickr]&lt;br /&gt;
* youtube - an interface to [http://youtube.com YouTube]&lt;br /&gt;
* mahara - an interface to a Mahara installation&lt;br /&gt;
* Dspace - a repository from MIT&lt;br /&gt;
* DOOR - another popular open source repository&lt;br /&gt;
&lt;br /&gt;
==Tables==&lt;br /&gt;
&lt;br /&gt;
=== repository ===&lt;br /&gt;
&lt;br /&gt;
This table contains one entry for every configured external repository instance.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Field&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Type&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Default&#039;&#039;&#039; &lt;br /&gt;
|&#039;&#039;&#039;Info&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;id&#039;&#039;&#039;&lt;br /&gt;
|int(10)&lt;br /&gt;
|&lt;br /&gt;
|autoincrementing &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|repositoryname&lt;br /&gt;
|varchar&lt;br /&gt;
|&lt;br /&gt;
|A custom name for this repository (non-unique)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;repositorytype&#039;&#039;&#039; &lt;br /&gt;
|varchar&lt;br /&gt;
| &lt;br /&gt;
|The name of the plugin being used  (1 special case:  &amp;quot;local&amp;quot; which covers all files uploaded from desktop)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;userid&#039;&#039;&#039; &lt;br /&gt;
|int(10)&lt;br /&gt;
| &lt;br /&gt;
|The person who created this repository instance&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;contextid&#039;&#039;&#039; &lt;br /&gt;
|int(10)&lt;br /&gt;
| &lt;br /&gt;
|The context that this repository is available to ( = system context for site-wide ones)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|username&lt;br /&gt;
|varchar&lt;br /&gt;
| &lt;br /&gt;
|username to log in with, if required&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|password&lt;br /&gt;
|varchar&lt;br /&gt;
| &lt;br /&gt;
|password to log in with, if required&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|option1&lt;br /&gt;
|varchar&lt;br /&gt;
| &lt;br /&gt;
|Other information useful to the plugin&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|option2&lt;br /&gt;
|varchar&lt;br /&gt;
| &lt;br /&gt;
|Other information useful to the plugin&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|option3&lt;br /&gt;
|varchar&lt;br /&gt;
| &lt;br /&gt;
|Other information useful to the plugin&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|option4&lt;br /&gt;
|varchar&lt;br /&gt;
| &lt;br /&gt;
|Other information useful to the plugin&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|option5&lt;br /&gt;
|varchar&lt;br /&gt;
| &lt;br /&gt;
|Other information useful to the plugin&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|timecreated&lt;br /&gt;
|int(10)&lt;br /&gt;
|&lt;br /&gt;
|The time this repository was created&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|timemodified&lt;br /&gt;
|int(10)&lt;br /&gt;
|&lt;br /&gt;
|The last time the repository was modified&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Class methods==&lt;br /&gt;
&lt;br /&gt;
===Repository class===&lt;br /&gt;
&lt;br /&gt;
This class implements the interface to a particular repository, for browsing, selecting and updating files.&lt;br /&gt;
&lt;br /&gt;
====get_file($path)====&lt;br /&gt;
&lt;br /&gt;
====get_listing($parent=&#039;/&#039;, $search=&#039;&#039;&#039;&#039;&#039;&#039;&#039;&#039;)====&lt;br /&gt;
&lt;br /&gt;
====cron()====&lt;br /&gt;
&lt;br /&gt;
====etc====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[File API]]&lt;br /&gt;
* [[Portfolio API]]&lt;/div&gt;</summary>
		<author><name>Htchs</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Roadmap&amp;diff=26211</id>
		<title>Roadmap</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Roadmap&amp;diff=26211"/>
		<updated>2008-01-26T01:57:09Z</updated>

		<summary type="html">&lt;p&gt;Htchs: /* Version 1.9 - very soon */ minor typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This roadmap collects the best information about upcoming features in Moodle.   It is not 100% certain - features may change according to available funding and developers.&lt;br /&gt;
&lt;br /&gt;
== Version 1.9 - very soon ==&lt;br /&gt;
&#039;&#039;1.9 is currently in beta. See [[Release Notes]].&lt;br /&gt;
* [[Development:Grades|Gradebook development]] - Moodle.com and OU&lt;br /&gt;
::The gradebook system will be revamped for performance, switching from our older &amp;quot;pull&amp;quot; model to a &amp;quot;push&amp;quot; model where all modules will now publish grades as necessary into a central table.  Support for (local/state) [[Development:Outcomes|outcomes/goals/competencies]] is included!&lt;br /&gt;
* [[Development:Events|Events API]] - Moodle.com&lt;br /&gt;
::The new Events API provides a way for any code to &amp;quot;hook&amp;quot; into events in a clean, loosely coupled way. A lot of events in Moodle (such as adding a user or a course) now trigger events that developers can hook into.&lt;br /&gt;
* [[Tags]] - part of the [[Student_projects/Social_Networking_features|Google SOC Social Networking]] project by Luiz Cruz will make it&#039;s way into 1.9, allowing users to tag themselves and create interest pages around those tags, bringing information together from a variety of sources.&lt;br /&gt;
* [[Question_Engine_Changes_in_Moodle_1.9|Improved question bank]] - Jamie Pratt funded by [http://www.fun.ac.jp/en/ Future University Hakodate].&lt;br /&gt;
** Allows questions to be shared by the whole site, a course category, a single course, or be kept private to a single module. More control over who can do what to each question.&lt;br /&gt;
** [[Questions linking to files|Also improved management of files linked to from questions.]]&lt;br /&gt;
** See also the original development plan here: [[Development:Plan to Improve Flexibility of Question Category Sharing and Permissions]]&lt;br /&gt;
* Other Quiz/Question improvements:&lt;br /&gt;
** A quiz can now [[Quiz submission email notification|send emails when an attempt is finished]] - a confirmation to the student, a notification to all teachers, or both. Implemented by Graham Miller of [http://www.webenhanced.com.au/ Web Enhanced Solutions].&lt;br /&gt;
** Some slight improvements to quiz layout. See [http://tracker.moodle.org/browse/MDL-10374 MDL-10374] for details. Theme designers please note!&lt;br /&gt;
** [[GIFT format|Gift Import/Export format]] can now handle Essay and Description question types.&lt;br /&gt;
** Third party question types can now implement [[Moodle XML format]] and other import and export formats. Implemented by Howard Miller.&lt;br /&gt;
** [[Multiple Choice question type|Multiple choice questions]] now show the feedback for all the options to students on the review page after the attempt is over.&lt;br /&gt;
* [[Groups]] reverted to 1.7 style and reimplemented groupings - Moodle.com, Catalyst, OU, Enrique Castro&lt;br /&gt;
&lt;br /&gt;
== Version 2.0 - Expected Late 2008 ==&lt;br /&gt;
&lt;br /&gt;
(This list is fluid, depending on available resources)&lt;br /&gt;
&lt;br /&gt;
===Definitely===&lt;br /&gt;
* Moodle 2.0 will require PHP 5.2 as a minimum, allowing us to clean up the code in some areas.  For more info see: [http://gophp5.org/ gophp5.org].&lt;br /&gt;
* [[Development:Portfolio API|Portfolio API]] - Enovation.ie / Moodle.com&lt;br /&gt;
::Interface Moodle activities and repositories to help produce portfolios for internal assessment AND external publication.  The first Portfolio plugin implemented will be [http://www.mahara.org/ Mahara].&lt;br /&gt;
* [[Development:Repository API|Repository API]] - Moodle.com&lt;br /&gt;
::Abstract all file operations to an API that allows plugins for different external repositories.&lt;br /&gt;
* [[Development:Conditional activities|Conditional activities]] - Moodle.com&lt;br /&gt;
::Allowing dependencies and forced paths through the content.&lt;br /&gt;
* [[Community hub]] interfaces - Moodle.com and others&lt;br /&gt;
::Makes it easy for users to find and navigate other systems and external Moodle repositories, leveraging the Moodle Network in various ways.&lt;br /&gt;
* Old DB install/upgrade system removed&lt;br /&gt;
:: The deprecated system for installing or upgrading database entries used in Moodle &amp;lt; 1.7 will be completely removed, while supporting only the new XML based database scheme introduced in 1.7.&lt;br /&gt;
* [[Feedback module]]&lt;br /&gt;
* [[NWiki roadmap|New Wiki]] module (nwiki) - DFWikiteam-UPC&lt;br /&gt;
* Messaging improvements&lt;br /&gt;
* Secure RSS feeds&lt;br /&gt;
&lt;br /&gt;
===Hopefully===&lt;br /&gt;
* [[IMS Learning Design]] - Moodle.com&lt;br /&gt;
::Support for importing/exporting LD, converting Moodle activities and sequences of activities into a standard format for sharing, and importing standard sequences into Moodle courses&lt;br /&gt;
* [[Student Information API]]&lt;br /&gt;
::API for integrating external systems for managing student information&lt;br /&gt;
* [[Development:Voice|Moodle Voice]]&lt;br /&gt;
:: Moodle Voice is a project for embedding VoiceXML support into Moodle Core.&lt;br /&gt;
* [[Learning Design export]]? - Moodle.com and Open University of The Netherlands&lt;br /&gt;
::We plan to have a very simple export for any Moodle course into IMS LD format, as a proof of concept and to help the community start learning about IMS LD.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* [[Release Notes]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer]]&lt;br /&gt;
[[Category:Future]]&lt;br /&gt;
&lt;br /&gt;
[[es:Planificación]]&lt;br /&gt;
[[fr:Planification]]&lt;/div&gt;</summary>
		<author><name>Htchs</name></author>
	</entry>
</feed>