<?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=Ak001</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=Ak001"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/Special:Contributions/Ak001"/>
	<updated>2026-11-18T07:42:16Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=NWiki_roadmap&amp;diff=6636</id>
		<title>NWiki roadmap</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=NWiki_roadmap&amp;diff=6636"/>
		<updated>2008-04-18T21:44:59Z</updated>

		<summary type="html">&lt;p&gt;Ak001: /* NWiki roadmap */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is to talk about the (likely) entrance of NWiki into 1.9 core. &lt;br /&gt;
&lt;br /&gt;
= NWiki roadmap=&lt;br /&gt;
Right now DFwikiteam is focussed in the following issues: &lt;br /&gt;
== XHTML Strict ==&lt;br /&gt;
*NWiki complies with XHTML transitional. April 2007&lt;br /&gt;
*NWiki complies with &#039;&#039;&#039;XHTML Strict&#039;&#039;&#039; mid May &#039;07 &lt;br /&gt;
** this affects main engine &lt;br /&gt;
** blocks not finished yet (some javascript to look up to)&lt;br /&gt;
&lt;br /&gt;
==Logs and stats==&lt;br /&gt;
We need to ckeck out stats and logs with nwiki.&lt;br /&gt;
&lt;br /&gt;
== Code Tunning : new wiki api==&lt;br /&gt;
There&#039;s a big issue in the code, the $WS variable that acts like a big set of global variables. &lt;br /&gt;
*We are getting $WS smaller day by day&lt;br /&gt;
*We are witting a new internal API to create an internal layer of services for developers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Done!!!&#039;&#039;&#039; Two main layers for developers have been written and working inside of the Nwiki distributions since May 2007.  &lt;br /&gt;
[http://morfeo.upc.es/crom/file.php/4/wikiAPIdoc/index.htmlThe PHPDoc documentation is available here].&lt;br /&gt;
&lt;br /&gt;
=== PHPUnit testing===&lt;br /&gt;
* a set of PHPUnit tests have been developed to ensure the quality of the thing.&lt;br /&gt;
* test case descriptions have been written to help developers and maintainers&lt;br /&gt;
[http://morfeo.upc.es/crom/mod/wiki/view.php?id=22&amp;amp;page=Wiki+Unit+Tests+Documentation&amp;amp;gid=0&amp;amp;uid=0 NWiki PHPUnit documentation]&lt;br /&gt;
&lt;br /&gt;
== shall we trim nwiki ?==&lt;br /&gt;
NWiki is Huge ! As many have said we implement a lot of features that maybe are not necessary for everybody. &lt;br /&gt;
We could have a reduced set of nwiki into the oficial distribution and a 3rd party and a extended version as 3rd part plug in.&lt;br /&gt;
Things that could be taken outside:&lt;br /&gt;
===Maybe we keep them===&lt;br /&gt;
* wiki course format&lt;br /&gt;
* discussion pages ?&lt;br /&gt;
* grading in wikis ?&lt;br /&gt;
* ranking and votes?&lt;br /&gt;
&lt;br /&gt;
===Most likely===&lt;br /&gt;
* integration with tiddlywiki ? [[Tiddlywiki integration]]&lt;br /&gt;
&lt;br /&gt;
=== New upcoming toys ===&lt;br /&gt;
In June 2007 will come new features that need to be sorted in or out of the basic distribution&lt;br /&gt;
* [[Wikibook]] [http://moodle.org/mod/forum/discuss.php?d=72909 wikibook in the forum]&lt;br /&gt;
* PDF Generation&lt;br /&gt;
* Timeline-like wiki history browser&lt;br /&gt;
* Import / export from openoffice writer and (eventually) msword&lt;br /&gt;
&lt;br /&gt;
== Migration issues ==&lt;br /&gt;
So far the data migration works fine. No bugs reported without attending.&lt;br /&gt;
== rethink wiki permisions and roles ==&lt;br /&gt;
* a user can discuss the page while he cannot edit the page&lt;br /&gt;
* the teacher cat FIX a markup for a wiki in the wiki options form.&lt;br /&gt;
&lt;br /&gt;
==Tracked issues==&lt;br /&gt;
There are several bugs and improvements listed in Moodle&#039;s [http://tracker.moodle.org/secure/IssueNavigator.jspa?assigneeSelect=specificuser&amp;amp;assignee=dfwikiteam tracker].&lt;br /&gt;
==More?==&lt;br /&gt;
Let&#039;s rememeber to complete the PDF export thing (HTML Editor wiki pages are not exported)&lt;br /&gt;
Expected mid june&lt;br /&gt;
&lt;br /&gt;
==Even More features Implemented==&lt;br /&gt;
&lt;br /&gt;
=== Wiki Templates ===&lt;br /&gt;
&lt;br /&gt;
* Add templates so that some content can be made available to all groups when they start using a wiki &lt;br /&gt;
 Implemented, in release June 2007&lt;br /&gt;
=== mailto ===&lt;br /&gt;
* a mailto link for dfwiki &lt;br /&gt;
 has already ben developed must be included in next release [http://moodle.org/mod/forum/discuss.php?d=38991 mailto dfwiki forum thread]&lt;br /&gt;
&lt;br /&gt;
==And finally==&lt;br /&gt;
Dynamical online import from mediawiki utilty... :-D&lt;br /&gt;
&lt;br /&gt;
= Old DFwiki requests =&lt;br /&gt;
Use this page for requests of bugfixes and new features on the [http://morfeo.upc.es/crom/course/view.php?id=4 NWiki] &lt;br /&gt;
The [http://morfeo.upc.es/crom/course/view.php?id=4 DFwikiteam] will keep a sharp eye on the list.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
*We need to implement some [[Special pages]] like mediawiki&#039;s [[Recent changes]].&lt;br /&gt;
*Section edit.&lt;br /&gt;
*borrow some interface ideas from OUWiki&lt;br /&gt;
&lt;br /&gt;
== block wikipage ==&lt;br /&gt;
&lt;br /&gt;
Would be useful to have a block with the content of a wikipage.&lt;br /&gt;
&lt;br /&gt;
If you select &#039;social&#039; course format you have the option of inserting a social activities block... I don&#039;t get that option for the DFWiki, but I think I should so I can add other Moodle activities... &lt;br /&gt;
&lt;br /&gt;
otherwise, when I go to admin/site I can choose to display a topic section where I can put activities and this may be an alternative solution.&lt;br /&gt;
&lt;br /&gt;
Note: In theme [http://moodle.org/mod/forum/discuss.php?d=42325 Including wiki page in other Moodle resources] was announced filter, which can include wiki-page into any filterable place. In summ with existing html block it sounds like solution for this suggestion! --[[User:Ne Nashev|Ne Nashev]] 07:52, 26 March 2006 (WST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Including wiki page in other Moodle resources ==&lt;br /&gt;
I suggest add to standard filters (like Autoformat, Markdown) tag which allow include content (not a link) of wiki page (without editing). This will allow to use wiki as general place for storage texts and use them in resources, lessons and so on.&lt;br /&gt;
&lt;br /&gt;
Note: In theme [http://moodle.org/mod/forum/discuss.php?d=42325 Including wiki page in other Moodle resources] was announced this filter&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
The words &amp;quot;Change to one of the following editors&amp;quot; tells the new user to change to an editor other than the default editor.  As this works now, the choice cannot be changed once selected.&lt;br /&gt;
&lt;br /&gt;
In order to avoid this confusion, the teacher should be able to make the default editor the only choice.&lt;br /&gt;
&lt;br /&gt;
In the meantime, the option &amp;quot;Change to one of the following editors&amp;quot; could be moved down below the buttons: save, preview, cancel.&lt;br /&gt;
&lt;br /&gt;
That way new users will be more likely to use the default editor and not lock themselves into one of the other options.&lt;br /&gt;
[http://moodle.org/mod/forum/discuss.php?d=39191 forum tread]&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Moodle wide metawiki==&lt;br /&gt;
&lt;br /&gt;
We need a metawiki index to easily link between wikis.&lt;br /&gt;
The idea is to have admin tool to manage the wiki-names to be able to &lt;br /&gt;
refer easily from one wiki to another like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; [wiki-name:wikipagename|label to link]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Special wiki pages ==&lt;br /&gt;
&lt;br /&gt;
=== Wiki reference. ===&lt;br /&gt;
To implement biblio references... a link like &lt;br /&gt;
&amp;lt;nowiki&amp;gt;[ref:refname]&amp;lt;/nowiki&amp;gt; Will lead us to a editing page with a  form (maybe a [[database module]] form) to enter the biblio reference ( title, author, isbn, link , pages ... and so on )...&lt;br /&gt;
Once we got that any page with a reference to a biblio ref will get printed at its bottom the complete reference and a link to it. &lt;br /&gt;
&lt;br /&gt;
This feature proposal comes within the [[wikibook]] line of work&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== weird course interaction stuff ==&lt;br /&gt;
If you select &#039;social&#039; course format you have the option of inserting a social activities block... I don&#039;t get that option if I select DFWiki, but I think I should so I can add other Moodle activities... (using Moodle 1.6)&lt;br /&gt;
&lt;br /&gt;
Otherwise, when I go to admin/site I can choose to display 1 topic section where I can put activities and this may be an alternative solution.&lt;br /&gt;
&lt;br /&gt;
Also if I modify a course that had a different format, such as topics ,to be DFWiki the course crashes and you cannot get back to original course format because of the error it throws up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[[wiki]]&lt;br /&gt;
*[[Dfwiki]]&lt;br /&gt;
*[http://morfeo.upc.es/crom/course/view.php?id=4 DFWikilabs]&lt;br /&gt;
*[[Wiki requirements]]&lt;/div&gt;</summary>
		<author><name>Ak001</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=NWiki_roadmap&amp;diff=6635</id>
		<title>NWiki roadmap</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=NWiki_roadmap&amp;diff=6635"/>
		<updated>2008-04-18T21:44:41Z</updated>

		<summary type="html">&lt;p&gt;Ak001: /* NWiki roadmap */  Spelling correction&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is to talk about the (likely) entrance of NWiki into 1.9 core. &lt;br /&gt;
&lt;br /&gt;
= NWiki roadmap=&lt;br /&gt;
Right Now DFwikiteam is focussed in the following issues: &lt;br /&gt;
== XHTML Strict ==&lt;br /&gt;
*NWiki complies with XHTML transitional. April 2007&lt;br /&gt;
*NWiki complies with &#039;&#039;&#039;XHTML Strict&#039;&#039;&#039; mid May &#039;07 &lt;br /&gt;
** this affects main engine &lt;br /&gt;
** blocks not finished yet (some javascript to look up to)&lt;br /&gt;
&lt;br /&gt;
==Logs and stats==&lt;br /&gt;
We need to ckeck out stats and logs with nwiki.&lt;br /&gt;
&lt;br /&gt;
== Code Tunning : new wiki api==&lt;br /&gt;
There&#039;s a big issue in the code, the $WS variable that acts like a big set of global variables. &lt;br /&gt;
*We are getting $WS smaller day by day&lt;br /&gt;
*We are witting a new internal API to create an internal layer of services for developers.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Done!!!&#039;&#039;&#039; Two main layers for developers have been written and working inside of the Nwiki distributions since May 2007.  &lt;br /&gt;
[http://morfeo.upc.es/crom/file.php/4/wikiAPIdoc/index.htmlThe PHPDoc documentation is available here].&lt;br /&gt;
&lt;br /&gt;
=== PHPUnit testing===&lt;br /&gt;
* a set of PHPUnit tests have been developed to ensure the quality of the thing.&lt;br /&gt;
* test case descriptions have been written to help developers and maintainers&lt;br /&gt;
[http://morfeo.upc.es/crom/mod/wiki/view.php?id=22&amp;amp;page=Wiki+Unit+Tests+Documentation&amp;amp;gid=0&amp;amp;uid=0 NWiki PHPUnit documentation]&lt;br /&gt;
&lt;br /&gt;
== shall we trim nwiki ?==&lt;br /&gt;
NWiki is Huge ! As many have said we implement a lot of features that maybe are not necessary for everybody. &lt;br /&gt;
We could have a reduced set of nwiki into the oficial distribution and a 3rd party and a extended version as 3rd part plug in.&lt;br /&gt;
Things that could be taken outside:&lt;br /&gt;
===Maybe we keep them===&lt;br /&gt;
* wiki course format&lt;br /&gt;
* discussion pages ?&lt;br /&gt;
* grading in wikis ?&lt;br /&gt;
* ranking and votes?&lt;br /&gt;
&lt;br /&gt;
===Most likely===&lt;br /&gt;
* integration with tiddlywiki ? [[Tiddlywiki integration]]&lt;br /&gt;
&lt;br /&gt;
=== New upcoming toys ===&lt;br /&gt;
In June 2007 will come new features that need to be sorted in or out of the basic distribution&lt;br /&gt;
* [[Wikibook]] [http://moodle.org/mod/forum/discuss.php?d=72909 wikibook in the forum]&lt;br /&gt;
* PDF Generation&lt;br /&gt;
* Timeline-like wiki history browser&lt;br /&gt;
* Import / export from openoffice writer and (eventually) msword&lt;br /&gt;
&lt;br /&gt;
== Migration issues ==&lt;br /&gt;
So far the data migration works fine. No bugs reported without attending.&lt;br /&gt;
== rethink wiki permisions and roles ==&lt;br /&gt;
* a user can discuss the page while he cannot edit the page&lt;br /&gt;
* the teacher cat FIX a markup for a wiki in the wiki options form.&lt;br /&gt;
&lt;br /&gt;
==Tracked issues==&lt;br /&gt;
There are several bugs and improvements listed in Moodle&#039;s [http://tracker.moodle.org/secure/IssueNavigator.jspa?assigneeSelect=specificuser&amp;amp;assignee=dfwikiteam tracker].&lt;br /&gt;
==More?==&lt;br /&gt;
Let&#039;s rememeber to complete the PDF export thing (HTML Editor wiki pages are not exported)&lt;br /&gt;
Expected mid june&lt;br /&gt;
&lt;br /&gt;
==Even More features Implemented==&lt;br /&gt;
&lt;br /&gt;
=== Wiki Templates ===&lt;br /&gt;
&lt;br /&gt;
* Add templates so that some content can be made available to all groups when they start using a wiki &lt;br /&gt;
 Implemented, in release June 2007&lt;br /&gt;
=== mailto ===&lt;br /&gt;
* a mailto link for dfwiki &lt;br /&gt;
 has already ben developed must be included in next release [http://moodle.org/mod/forum/discuss.php?d=38991 mailto dfwiki forum thread]&lt;br /&gt;
&lt;br /&gt;
==And finally==&lt;br /&gt;
Dynamical online import from mediawiki utilty... :-D&lt;br /&gt;
&lt;br /&gt;
= Old DFwiki requests =&lt;br /&gt;
Use this page for requests of bugfixes and new features on the [http://morfeo.upc.es/crom/course/view.php?id=4 NWiki] &lt;br /&gt;
The [http://morfeo.upc.es/crom/course/view.php?id=4 DFwikiteam] will keep a sharp eye on the list.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
*We need to implement some [[Special pages]] like mediawiki&#039;s [[Recent changes]].&lt;br /&gt;
*Section edit.&lt;br /&gt;
*borrow some interface ideas from OUWiki&lt;br /&gt;
&lt;br /&gt;
== block wikipage ==&lt;br /&gt;
&lt;br /&gt;
Would be useful to have a block with the content of a wikipage.&lt;br /&gt;
&lt;br /&gt;
If you select &#039;social&#039; course format you have the option of inserting a social activities block... I don&#039;t get that option for the DFWiki, but I think I should so I can add other Moodle activities... &lt;br /&gt;
&lt;br /&gt;
otherwise, when I go to admin/site I can choose to display a topic section where I can put activities and this may be an alternative solution.&lt;br /&gt;
&lt;br /&gt;
Note: In theme [http://moodle.org/mod/forum/discuss.php?d=42325 Including wiki page in other Moodle resources] was announced filter, which can include wiki-page into any filterable place. In summ with existing html block it sounds like solution for this suggestion! --[[User:Ne Nashev|Ne Nashev]] 07:52, 26 March 2006 (WST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Including wiki page in other Moodle resources ==&lt;br /&gt;
I suggest add to standard filters (like Autoformat, Markdown) tag which allow include content (not a link) of wiki page (without editing). This will allow to use wiki as general place for storage texts and use them in resources, lessons and so on.&lt;br /&gt;
&lt;br /&gt;
Note: In theme [http://moodle.org/mod/forum/discuss.php?d=42325 Including wiki page in other Moodle resources] was announced this filter&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
The words &amp;quot;Change to one of the following editors&amp;quot; tells the new user to change to an editor other than the default editor.  As this works now, the choice cannot be changed once selected.&lt;br /&gt;
&lt;br /&gt;
In order to avoid this confusion, the teacher should be able to make the default editor the only choice.&lt;br /&gt;
&lt;br /&gt;
In the meantime, the option &amp;quot;Change to one of the following editors&amp;quot; could be moved down below the buttons: save, preview, cancel.&lt;br /&gt;
&lt;br /&gt;
That way new users will be more likely to use the default editor and not lock themselves into one of the other options.&lt;br /&gt;
[http://moodle.org/mod/forum/discuss.php?d=39191 forum tread]&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Moodle wide metawiki==&lt;br /&gt;
&lt;br /&gt;
We need a metawiki index to easily link between wikis.&lt;br /&gt;
The idea is to have admin tool to manage the wiki-names to be able to &lt;br /&gt;
refer easily from one wiki to another like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt; [wiki-name:wikipagename|label to link]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Special wiki pages ==&lt;br /&gt;
&lt;br /&gt;
=== Wiki reference. ===&lt;br /&gt;
To implement biblio references... a link like &lt;br /&gt;
&amp;lt;nowiki&amp;gt;[ref:refname]&amp;lt;/nowiki&amp;gt; Will lead us to a editing page with a  form (maybe a [[database module]] form) to enter the biblio reference ( title, author, isbn, link , pages ... and so on )...&lt;br /&gt;
Once we got that any page with a reference to a biblio ref will get printed at its bottom the complete reference and a link to it. &lt;br /&gt;
&lt;br /&gt;
This feature proposal comes within the [[wikibook]] line of work&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== weird course interaction stuff ==&lt;br /&gt;
If you select &#039;social&#039; course format you have the option of inserting a social activities block... I don&#039;t get that option if I select DFWiki, but I think I should so I can add other Moodle activities... (using Moodle 1.6)&lt;br /&gt;
&lt;br /&gt;
Otherwise, when I go to admin/site I can choose to display 1 topic section where I can put activities and this may be an alternative solution.&lt;br /&gt;
&lt;br /&gt;
Also if I modify a course that had a different format, such as topics ,to be DFWiki the course crashes and you cannot get back to original course format because of the error it throws up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[[wiki]]&lt;br /&gt;
*[[Dfwiki]]&lt;br /&gt;
*[http://morfeo.upc.es/crom/course/view.php?id=4 DFWikilabs]&lt;br /&gt;
*[[Wiki requirements]]&lt;/div&gt;</summary>
		<author><name>Ak001</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Repository_API&amp;diff=5959</id>
		<title>Repository API</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Repository_API&amp;diff=5959"/>
		<updated>2007-12-14T13:56:21Z</updated>

		<summary type="html">&lt;p&gt;Ak001: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Repository [[Wikipedia:API|Application Programming Interface]] (API) is a group of functions that work with Java. The development aim is to make Moodle flexible enough to link to any repository of these functions so that Moodle users can use them to find files for use in Moodle, as well as storing their own documents there.&lt;br /&gt;
&lt;br /&gt;
To do this we will implement a layer in Moodle that takes care of the details, so that as far as Moodle modules are concerned there is just a single coherent &amp;quot;File system&amp;quot;.  &lt;br /&gt;
&lt;br /&gt;
==Major Tasks==&lt;br /&gt;
&lt;br /&gt;
===Create Repository API===&lt;br /&gt;
&lt;br /&gt;
API is basically a class library of functions that expose the Java Service Request ([[Wikipedia:JSR|JSR]])-170 functionality.  For example, there will be simple functions like get_file(), search_files(), insert_file() etc (not actual names) as well as more detailed functions for handling versions, metadata etc.&lt;br /&gt;
&lt;br /&gt;
Plugins will extend this class, overriding certain functions with local implementations of that functionality.  Plugins will also publish information about what functionality they support.   For example, some repositories may be read-only, so everything to do with writing needs to be disabled in the interface.&lt;br /&gt;
&lt;br /&gt;
===Create File-based Repository Plugin===&lt;br /&gt;
&lt;br /&gt;
This simple plugin will implement as much as needed to replicate the functionality that we have now (with the exception that data is not course-based any longer).&lt;br /&gt;
&lt;br /&gt;
===Create JSR-170 Repository Plugin===&lt;br /&gt;
&lt;br /&gt;
This simple plugin really just &amp;quot;passes through&amp;quot; commands between Moodle and an external JSR-170 compliant repository (eg [http://jackrabbit.apache.org/ Jackrabbit] or [http://www.alfresco.com/ Alfresco]).&lt;br /&gt;
&lt;br /&gt;
===Convert Moodle code to use the API===&lt;br /&gt;
&lt;br /&gt;
Basically, wherever Moodle reads/writes files the code needs to be converted to use the repository API instead.   Some of the hardest work will be in the area of Roles and Permissions.&lt;br /&gt;
&lt;br /&gt;
===Build Admin interface===&lt;br /&gt;
&lt;br /&gt;
The admin interface allows the admin to add new repositories and set them up for use in Moodle.  The admin may also decide which people can see certain repositories based on Role.&lt;br /&gt;
&lt;br /&gt;
===Build new user interfaces===&lt;br /&gt;
&lt;br /&gt;
Wherever people deal with files (resources, forum attachments etc) they need a &amp;quot;file picker&amp;quot; to let them select and interact with the repository.   This file picker needs to then pass back information to the context where it was called (eg pass the path of a file back to the resource-adding page).&lt;br /&gt;
&lt;br /&gt;
If there is only one repository configured, then the interface just shows actions possible with that repository.   If there is more than one repository then the user sees a menu in the picker to switch their &amp;quot;current&amp;quot; repository.&lt;br /&gt;
&lt;br /&gt;
==Outstanding issues==&lt;br /&gt;
&lt;br /&gt;
===Access controls===&lt;br /&gt;
&lt;br /&gt;
How is it controlled who can see what in the repository? At the moment there is some basic access controls. There are site files, which anyone can see, and course files, which only people enrolled in a course can see, and user files, which belong to a particular user. Then in those various categories, there are files that all roles can see, and ones (e.g. backup files) that only teachers can see.&lt;br /&gt;
&lt;br /&gt;
So what I am saying, is that how do Moodle Roles and capabilities correspond to access restrictions enforced by the repository. Suppose there is a file in the repository that only a teacher can access. How can we stop the teach adding that image to a page of Moodle content, which will just leave the student seeing a broken image icon because they don&#039;t have access to that image?&lt;br /&gt;
&lt;br /&gt;
Is it possible to use the same model that the [[Question_contexts | 1.9 question bank]] does, where a resource is ascribed to a context level? [[User:Matt Gibson|Matt Gibson]] 06:43, 3 October 2007 (CDT)&lt;/div&gt;</summary>
		<author><name>Ak001</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Mnet_Web_services_API&amp;diff=3524</id>
		<title>Mnet Web services API</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Mnet_Web_services_API&amp;diff=3524"/>
		<updated>2007-11-12T02:41:34Z</updated>

		<summary type="html">&lt;p&gt;Ak001: /* A word on Encryption */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Web Services API provides Moodle with a web service interface to allow exchange of data and information with other systems.&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
# Manage user data - send and retrieve the information,&lt;br /&gt;
# Manage course enrolments - add/remove teachers and students,&lt;br /&gt;
# Course management - create new courses based on templates,&lt;br /&gt;
# Gradebook info - extract grades information from Moodle.&lt;br /&gt;
&lt;br /&gt;
==XML-RPC background==&lt;br /&gt;
The XML-RPC service allows other servers to contact your Moodle server and request that it call a function. The Moodle server might do something, like create a user, or it might fetch some data and serve it back to your host.&lt;br /&gt;
&lt;br /&gt;
To communicate like this with another Moodle host, you&#039;d normally use the Moodle Network [https://docs.moodle.org/en/Moodle_Network] features, but it&#039;s also possible for other kinds of program to contact your Moodle, using plain-old-XML-RPC, bypassing Moodle Network&#039;s encryption or signed-message features.&lt;br /&gt;
&lt;br /&gt;
Plaintext networking is only likely to be useful if you have another application which:&lt;br /&gt;
* is not a Moodle&lt;br /&gt;
* is completely under your control (for security reasons)&lt;br /&gt;
&lt;br /&gt;
==A word on Encryption==&lt;br /&gt;
There&#039;s really no voodoo going on in the Moodle encryption and signing process. We&#039;ve tried to stick to the W3C&#039;s XML-ENC and XML-DSIG standards, and because our implementation of them is fairly simple and naive, getting your application to mimic that behaviour is not (as we say) rocket science. The Mahara implementation of XML-ENC/XML-DSIG uses some PHP5 features that make things even easier, so that might be a useful starting point for adventurous hackers.&lt;br /&gt;
&lt;br /&gt;
==But if I&#039;m not using Encryption?==&lt;br /&gt;
Then you need to tell Moodle to privilege the machine on which your application is running, and allow it to use the XML-RPC service without having to sign or encrypt its messages. You can do this at /admin/mnet/trustedhosts.php, which you can browse to in the admin panel at&lt;br /&gt;
Networking:XML-RPC hosts&lt;br /&gt;
&lt;br /&gt;
I recommend that you enter something like this (assuming your application&#039;s IP address is 192.168.0.7):&lt;br /&gt;
192.168.0.7/32&lt;br /&gt;
&lt;br /&gt;
That&#039;s all you need. Moodle knows your server is friendly, and will XML-RPC with it, without requiring it to encrypt or sign anything.&lt;br /&gt;
&lt;br /&gt;
==What can Moodle&#039;s XML-RPC do?==&lt;br /&gt;
By default, we&#039;ve strictly limited the functions that can be remotely called. These fall into four categories:&lt;br /&gt;
* special &#039;system&#039; functions&lt;br /&gt;
* methods of an authorisation object&lt;br /&gt;
* methods of an enrolment object&lt;br /&gt;
* functions in a module&lt;br /&gt;
&lt;br /&gt;
==But what if I have a death wish or something?==&lt;br /&gt;
Don&#039;t worry - we&#039;ve thought of you too. If you want to do something that&#039;s not in that list, there is a special &#039;shoot-yourself-in-the-foot&#039; switch that you can enable by tweaking a field in your database. This switch - if enabled - would allow the remote application to do ANYTHING to your Moodle that has a corresponding function anywhere in the code, so I&#039;m not telling you where it is.&lt;br /&gt;
&lt;br /&gt;
==Tell us!==&lt;br /&gt;
Oh alright then. In your config table, the row with the &#039;name&#039; mnet_dispatcher_mode, should have a &#039;value&#039; of &#039;promiscuous&#039;. Please don&#039;t do that. There are other ways to enable whatever it is you want to enable, so please exhaust those first, however, if you do enable this and your site does got pwned please tell me so I can laugh and high five my co-workers.&lt;br /&gt;
&lt;br /&gt;
==So - back to those four categories of function we were talking about==&lt;br /&gt;
The system functions return information about the services and methods that your API is making available to remote servers. These functions are:&lt;br /&gt;
* system/listMethods&lt;br /&gt;
* system/methodSignature&lt;br /&gt;
* system/methodHelp&lt;br /&gt;
* system/listServices&lt;br /&gt;
Missing from this list is a non-standard method, that we implemented to help with key-exchange and key-rotation:&lt;br /&gt;
* system/keyswap&lt;br /&gt;
This method returns the public key that your Moodle and Mahara peers will use for message encryption and signing. It is always possible to call this method from any host without signing or encryption, otherwise Moodles would never be able to exchange keys, and for that reason, it might be really useful to use as a test function. If you get a result back from this function, you have a foot in the door to setting up plaintext XML-RPC between your application and Moodle.&lt;br /&gt;
&lt;br /&gt;
==Methods of auth and enrol objects==&lt;br /&gt;
Let&#039;s say you have an enrolment class called &#039;enrol_plugin_bribeme&#039; with the method &amp;quot;buy_me_beer&amp;quot; and you want to be able to call it via XML-RPC. First, your class&#039; constructor must not require arguments. The despatcher should be able to just ask for your enrolment object and get it... end of story.&lt;br /&gt;
&lt;br /&gt;
Second - enrol_plugin_bribeme must have a method called mnet_publishes which returns information about the &amp;quot;buy_me_beer&amp;quot; method. The method should return an array of associative arrays with the following structure:&lt;br /&gt;
  $yummy_beer = array();&lt;br /&gt;
  $yummy_beer[&#039;name&#039;]        = &#039;yummy_beer&#039;; // Name (&#039;Yummy Beer!&#039;) goes in lang file&lt;br /&gt;
  $yummy_beer[&#039;apiversion&#039;]  = 1;&lt;br /&gt;
  $yummy_beer[&#039;methods&#039;]     = array(&#039;buy_me_beer&#039;);&lt;br /&gt;
  return array($yummy_beer);&lt;br /&gt;
&lt;br /&gt;
The $yummy_beer[&#039;methods&#039;] array can contain any number of method names. The $yummy_beer[&#039;name&#039;] element is the name of this service, and this will appear in the admin interface to allow the service to be enabled and disabled for different hosts. You enter an identifier here, and the actual name goes in the appropriate lang file - in this case lang/en_utf8/enrol_bribeme.php. Note that the _name and _description suffixes are required:&lt;br /&gt;
&lt;br /&gt;
 $string[&#039;yummy_beer_name&#039;]                = &#039;Yummy Beer&#039;;&lt;br /&gt;
 $string[&#039;yummy_beer_description&#039;]         = &#039;A service to bribe your sysadmin with promises of gourmet beer.&#039;;&lt;br /&gt;
&lt;br /&gt;
When you&#039;re writing your method, it&#039;s good practice to add a docblock with @param and @return values, because Moodle will read that information and provide it on to remote servers who call the introspection methods (e.g. system.methodSignature). This information is updated every time you hit /admin/index.php, so if you update the docblock for your function, you need to visit that page to have Moodle&#039;s introspection recognise your edits.&lt;br /&gt;
&lt;br /&gt;
So - once you&#039;ve implemented your method, you&#039;re ready to call it from your application. Your XML-RPC client needs to pass a function name to Moodle&#039;s XML-RPC server, that allows the server to identify the file and function to execute. The name you pass is a concatenation of the path to the file, and the name of your function, e.g.&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;auth/bribeme/auth.php/buymebeer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Functions in Modules==&lt;br /&gt;
The mechanics of XML-RPC are such that there are few functions that it would be useful to call directly from a remote server; you&#039;ll almost always need some kind of wrapper function to establish a security context or identify the server that&#039;s making the request. Partly for this reason, and partly so that it would be really obvious which functions are available to remote servers (i.e. really difficult for someone to call some arbitrary function in Moodle), we mandated that all XML-RPC-callable functions should be implemented in a special file called rpclib.php, so if you want to call a function in mod/forum/lib.php, you&#039;ll need to create a file called mod/forum/rpclib.php, and implement a wrapper function in that file that calls the function in mod/forum/lib.php.&lt;br /&gt;
&lt;br /&gt;
For rpclib.php files, it is still also necessary to create an mnet_publishes function, but it must be named with a prefix of the module name, e.g. forum_mnet_publishes. This function must return an array in the same format as the one detailed above for auth and enrol plugins. Let&#039;s look at that in a little more detail by reviewing the method from the auth_plugin_mnet class.&lt;br /&gt;
&lt;br /&gt;
For the benefit of administrators, your functions must be grouped into &amp;quot;Services&amp;quot;. Some of the services that we&#039;ve already implemented include sso_idp; the &#039;Single-Sign-On Identity Provider&#039; service, and sso_sp; the &#039;Single-Sign-On Service Provider&#039; service. You can see that the mnet_publishes method for that plugin returns an array with two elements. These elements provide information on the sso_idp and sso_sp services.&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Provides the allowed RPC services from this class as an array.&lt;br /&gt;
     * @return array  Allowed RPC services.&lt;br /&gt;
     */&lt;br /&gt;
    function mnet_publishes() {&lt;br /&gt;
        &lt;br /&gt;
        $sso_idp = array();&lt;br /&gt;
        $sso_idp[&#039;name&#039;]        = &#039;sso_idp&#039;; // Name &amp;amp; Description go in lang file&lt;br /&gt;
        $sso_idp[&#039;apiversion&#039;]  = 1;&lt;br /&gt;
        $sso_idp[&#039;methods&#039;]     = array(&#039;user_authorise&#039;,&#039;keepalive_server&#039;, &#039;kill_children&#039;,&lt;br /&gt;
                                        &#039;refresh_log&#039;, &#039;fetch_user_image&#039;, &#039;fetch_theme_info&#039;,&lt;br /&gt;
                                        &#039;update_enrolments&#039;);&lt;br /&gt;
        &lt;br /&gt;
        $sso_sp = array();&lt;br /&gt;
        $sso_sp[&#039;name&#039;]         = &#039;sso_sp&#039;; // Name &amp;amp; Description go in lang file&lt;br /&gt;
        $sso_sp[&#039;apiversion&#039;]   = 1;&lt;br /&gt;
        $sso_sp[&#039;methods&#039;]      = array(&#039;keepalive_client&#039;,&#039;kill_child&#039;);&lt;br /&gt;
        &lt;br /&gt;
        return array($sso_idp, $sso_sp);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
Remember that if you&#039;re writing such a function for a module, the function name must be prefixed with your module name, e.g. modulename_mnet_publishes.&lt;br /&gt;
&lt;br /&gt;
The name that you give your service is entirely up to you, but you need to create a language file in (for example) lang/en_utf8/mod_forum.php to store your service name and description, for example:&lt;br /&gt;
&lt;br /&gt;
  $string[&#039;sso_idp_name&#039;]                = &#039;SSO  (Identity Provider)&#039;;&lt;br /&gt;
  $string[&#039;sso_idp_description&#039;]         = &#039;A description of the SSO IDP service that allows an admin to know if he needs it or not.&#039;;&lt;br /&gt;
&lt;br /&gt;
Note that your service name (in this example &#039;sso_idp&#039;) is suffixed with _name and _description.&lt;br /&gt;
&lt;br /&gt;
Turning back to the mnet_publishes function, your associative array has an &#039;apiversion&#039; key, that allows you to provide more than one version of your API. This is really provided for future use, and isn&#039;t implemented in the code yet. We anticipate that eventually APIs will have to change, and this should allow newer Moodles to still be able to communicate with older Moodles. While this is unavoidable, it&#039;s something that we want to put of for as long as possible.&lt;br /&gt;
&lt;br /&gt;
Finally, you provide a list of method or function names that constitute the service. When an admin enables this service for a host, he&#039;s really permitting the host to remotely call the methods or functions that you list here.&lt;br /&gt;
&lt;br /&gt;
Calling a function remotely will require your XML-RPC client to pass something like this to the Moodle XML-RPC server as the function name:&lt;br /&gt;
 &amp;quot;mod/forum/rpclib.php/somefunction&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Other Implementations==&lt;br /&gt;
XML-RPC won&#039;t work for everyone. If you&#039;re planning a REST or SOAP service, please consider putting your work into mnet/soap or mnet/rest, so that it&#039;s alongside mnet/xmlrpc. The work we&#039;ve done in the mnet directory might be useful to you as well, so rather than re-invent the wheel, have a look at our code to see if it meets any of your needs.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&lt;br /&gt;
* Using Moodle [http://moodle.org/mod/forum/view.php?f=965 Web Services forum]  &lt;br /&gt;
&lt;br /&gt;
[[Category:Web services API]]&lt;br /&gt;
[[Category:Administrator]]&lt;/div&gt;</summary>
		<author><name>Ak001</name></author>
	</entry>
</feed>