<?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=Geoffr</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=Geoffr"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/Special:Contributions/Geoffr"/>
	<updated>2026-06-17T04:11:59Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=XMLDB_reserved_words&amp;diff=45978</id>
		<title>XMLDB reserved words</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=XMLDB_reserved_words&amp;diff=45978"/>
		<updated>2014-07-25T18:51:44Z</updated>

		<summary type="html">&lt;p&gt;Geoffr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[XMLDB Documentation|XMLDB Documentation]] &amp;gt; XMLDB reserved words&lt;br /&gt;
----&lt;br /&gt;
For each RDBMS some words are forbidden to be used as identifiers and they are called &#039;&#039;&#039;&amp;quot;reserved words&amp;quot;&#039;&#039;&#039;. Here you will find one big list that is automatically generated by the list of reserved words present in the &#039;&#039;&#039;XMLDB classes&#039;&#039;&#039; (it includes the reserved words for MySQL, PostgreSQL, Oracle and MSSQL).&lt;br /&gt;
&lt;br /&gt;
It&#039;s a must to avoid completely the use of these reserved words in your DB structures (tables, columns...). At the end of this page, you&#039;ll find [[#Some useful links|some useful links]] about reserved words.&lt;br /&gt;
&lt;br /&gt;
== The list ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;access, accessible, add, all, alter, analyse, analyze, and, any, array, as, asc, asensitive, asymmetric, audit, authorization, autoincrement, avg, backup, before, begin, between, bigint, binary, blob, both, break, browse, bulk, by, call, cascade, case, cast, change, char, character, check, checkpoint, close, cluster, clustered, coalesce, collate, column, comment, commit, committed, compress, compute, condition, confirm, connect, connection, constraint, contains, containstable, continue, controlrow, convert, count, create, cross, current, current_date, current_role, current_time, current_timestamp, current_user, cursor, database, databases, date, day_hour, day_microsecond, day_minute, day_second, dbcc, deallocate, dec, decimal, declare, default, deferrable, delayed, delete, deny, desc, describe, deterministic, disk, distinct, distinctrow, distributed, div, do, double, drop, dual, dummy, dump, each, else, elseif, enclosed, end, errlvl, errorexit, escape, escaped, except, exclusive, exec, execute, exists, exit, explain, external, false, fetch, file, fillfactor, float, float4, float8, floppy, for, force, foreign, freetext, freetexttable, freeze, from, full, fulltext, function, goto, grant, group, having, high_priority, holdlock, hour_microsecond, hour_minute, hour_second, identified, identity, identity_insert, identitycol, if, ignore, ilike, immediate, in, increment, index, infile, initial, initially, inner, inout, insensitive, insert, int, int1, int2, int3, int4, int8, integer, intersect, interval, into, is, isnull, isolation, iterate, join, key, keys, kill, leading, leave, left, level, like, limit, linear, lineno, lines, load, localtime, localtimestamp, lock, long, longblob, longtext, loop, low_priority, master_heartbeat_period, master_ssl_verify_server_cert, match, max, maxextents, mediumblob, mediumint, mediumtext, middleint, min, minus, minute_microsecond, minute_second, mirrorexit, mlslabel, mod, mode, modifies, modify, national, natural, new, no_write_to_binlog, noaudit, nocheck, nocompress, nonclustered, not, notnull, nowait, null, nullif, number, numeric, of, off, offline, offset, offsets, old, on, once, online, only, open, opendatasource, openquery, openrowset, openxml, optimize, option, optionally, or, order, out, outer, outfile, over, overlaps, overwrite, pctfree, percent, perm, permanent, pipe, pivot, placing, plan, precision, prepare, primary, print, prior, privileges, proc, procedure, processexit, public, purge, raid0, raiserror, range, raw, read, read_only, read_write, reads, readtext, real, reconfigure, references, regexp, release, rename, repeat, repeatable, replace, replication, require, resource, restore, restrict, return, returning, revoke, right, rlike, rollback, row, rowcount, rowguidcol, rowid, rownum, rows, rule, save, schema, schemas, second_microsecond, select, sensitive, separator, serializable, session, session_user, set, setuser, share, show, shutdown, similar, size, smallint, some, soname, spatial, specific, sql, sql_big_result, sql_calc_found_rows, sql_small_result, sqlexception, sqlstate, sqlwarning, ssl, start, starting, statistics, straight_join, successful, sum, symmetric, synonym, sysdate, system_user, table, tape, temp, temporary, terminated, textsize, then, tinyblob, tinyint, tinytext, to, top, trailing, tran, transaction, trigger, true, truncate, tsequal, uid, uncommitted, undo, union, unique, unlock, unsigned, update, updatetext, upgrade, usage, use, user, using, utc_date, utc_time, utc_timestamp, validate, values, varbinary, varchar, varchar2, varcharacter, varying, verbose, view, waitfor, when, whenever, where, while, with, work, write, writetext, x509, xor, year_month, zerofill&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Some useful links ==&lt;br /&gt;
&lt;br /&gt;
* One Universal Checker: http://www.petefreitag.com/tools/sql_reserved_words_checker/&lt;br /&gt;
* MySQL: http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html&lt;br /&gt;
* PostgreSQL: http://www.postgresql.org/docs/current/static/sql-keywords-appendix.html&lt;br /&gt;
* SQL*Server: http://msdn2.microsoft.com/en-us/library/ms189822.aspx&lt;br /&gt;
* Oracle: http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/ap_keywd.htm&lt;br /&gt;
* Good site with all the &#039;&#039;&#039;real reserved words&#039;&#039;&#039; for some DB (with version info): http://search.cpan.org/src/CHANSEN/ (under the SQL-ReservedWords-xx dirs).&lt;br /&gt;
* Escaping reserved words: http://www.ispirer.com/doc/sqlways/Output/SQLWays-1-035.html&lt;br /&gt;
* [[XMLDB Problems#Reserved Words in Moodle DB|Current reserved words used by Moodle]].&lt;br /&gt;
&lt;br /&gt;
[[Category:XMLDB]]&lt;/div&gt;</summary>
		<author><name>Geoffr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=XMLDB_reserved_words&amp;diff=45977</id>
		<title>XMLDB reserved words</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=XMLDB_reserved_words&amp;diff=45977"/>
		<updated>2014-07-25T18:49:06Z</updated>

		<summary type="html">&lt;p&gt;Geoffr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[XMLDB Documentation|XMLDB Documentation]] &amp;gt; XMLDB reserved words&lt;br /&gt;
----&lt;br /&gt;
For each RDBMS some words are forbidden to be used as identifiers and they are called &#039;&#039;&#039;&amp;quot;reserved words&amp;quot;&#039;&#039;&#039;. Here you will find one big list that is automatically generated by the list of reserved words present in the &#039;&#039;&#039;XMLDB classes&#039;&#039;&#039; (it includes the reserved words for MySQL, PostgreSQL, Oracle and MSSQL).&lt;br /&gt;
&lt;br /&gt;
It&#039;s a must to avoid completely the use of these reserved words in your DB structures (tables, columns...). At the end of this page, you&#039;ll find [[#Some useful links|some useful links]] about reserved words.&lt;br /&gt;
&lt;br /&gt;
== The list ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;access, accessible, add, all, alter, analyse, analyze, and, any, array, as, asc, asensitive, asymmetric, audit, authorization, autoincrement, avg, backup, before, begin, between, bigint, binary, blob, both, break, browse, bulk, by, call, cascade, case, cast, change, char, character, check, checkpoint, close, cluster, clustered, coalesce, collate, column, comment, commit, committed, compress, compute, condition, confirm, connect, connection, constraint, contains, containstable, continue, controlrow, convert, count, create, cross, current, current_date, current_role, current_time, current_timestamp, current_user, cursor, database, databases, date, day_hour, day_microsecond, day_minute, day_second, dbcc, deallocate, dec, decimal, declare, default, deferrable, delayed, delete, deny, desc, describe, deterministic, disk, distinct, distinctrow, distributed, div, do, double, drop, dual, dummy, dump, each, else, elseif, enclosed, end, errlvl, errorexit, escape, escaped, except, exclusive, exec, execute, exists, exit, explain, external, false, fetch, file, fillfactor, float, float4, float8, floppy, for, force, foreign, freetext, freetexttable, freeze, from, full, fulltext, function, goto, grant, group, having, high_priority, holdlock, hour_microsecond, hour_minute, hour_second, identified, identity, identity_insert, identitycol, if, ignore, ilike, immediate, in, increment, index, infile, initial, initially, inner, inout, insensitive, insert, int, int1, int2, int3, int4, int8, integer, intersect, interval, into, is, isnull, isolation, iterate, join, key, keys, kill, leading, leave, left, level, like, limit, linear, lineno, lines, load, localtime, localtimestamp, lock, long, longblob, longtext, loop, low_priority, master_heartbeat_period, master_ssl_verify_server_cert, match, max, maxextents, mediumblob, mediumint, mediumtext, middleint, min, minus, minute_microsecond, minute_second, mirrorexit, mlslabel, mod, mode, modifies, modify, national, natural, new, no_write_to_binlog, noaudit, nocheck, nocompress, nonclustered, not, notnull, nowait, null, nullif, number, numeric, of, off, offline, offset, offsets, old, on, once, online, only, open, opendatasource, openquery, openrowset, openxml, optimize, option, optionally, or, order, out, outer, outfile, over, overlaps, overwrite, pctfree, percent, perm, permanent, pipe, pivot, placing, plan, precision, prepare, primary, print, prior, privileges, proc, procedure, processexit, public, purge, raid0, raiserror, range, raw, read, read_only, read_write, reads, readtext, real, reconfigure, references, regexp, release, rename, repeat, repeatable, replace, replication, require, resource, restore, restrict, return, returning, revoke, right, rlike, rollback, row, rowcount, rowguidcol, rowid, rownum, rows, rule, save, schema, schemas, second_microsecond, select, sensitive, separator, serializable, session, session_user, set, setuser, share, show, shutdown, similar, size, smallint, some, soname, spatial, specific, sql, sql_big_result, sql_calc_found_rows, sql_small_result, sqlexception, sqlstate, sqlwarning, ssl, start, starting, statistics, straight_join, successful, sum, symmetric, synonym, sysdate, system_user, table, tape, temp, temporary, terminated, textsize, then, tinyblob, tinyint, tinytext, to, top, trailing, tran, transaction, trigger, true, truncate, tsequal, uid, uncommitted, undo, union, unique, unlock, unsigned, update, updatetext, upgrade, usage, use, user, using, utc_date, utc_time, utc_timestamp, validate, values, varbinary, varchar, varchar2, varcharacter, varying, verbose, view, waitfor, when, whenever, where, while, with, work, write, writetext, x509, xor, year_month, zerofill&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Some useful links ==&lt;br /&gt;
&lt;br /&gt;
* One Universal Checker: http://www.petefreitag.com/tools/sql_reserved_words_checker/&lt;br /&gt;
* MySQL: http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html&lt;br /&gt;
* PostgreSQL: http://www.postgresql.org/docs/current/static/sql-keywords-appendix.html&lt;br /&gt;
* SQL*Server: http://msdn2.microsoft.com/en-us/library/ms189822.aspx&lt;br /&gt;
* Oracle: http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/ap_keywd.htm&lt;br /&gt;
* Good site with all the &#039;&#039;&#039;real reserved words&#039;&#039;&#039; for some DB (with version info): http://search.cpan.org/src/CHANSEN/ (under the SQL-ReservedWords-xx dirs).&lt;br /&gt;
* Escaping reserved words: http://www.ispirer.com/doc/sqlways/Output/SQLWays-1-034.html&lt;br /&gt;
* [[XMLDB Problems#Reserved Words in Moodle DB|Current reserved words used by Moodle]].&lt;br /&gt;
&lt;br /&gt;
[[Category:XMLDB]]&lt;/div&gt;</summary>
		<author><name>Geoffr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Performance_2.x&amp;diff=19186</id>
		<title>Performance 2.x</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Performance_2.x&amp;diff=19186"/>
		<updated>2011-05-15T15:03:51Z</updated>

		<summary type="html">&lt;p&gt;Geoffr: /* Navigation clenaup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox Project&lt;br /&gt;
|name = Performance 2.x&lt;br /&gt;
|state = Planning&lt;br /&gt;
|tracker = MDL-23754&lt;br /&gt;
|discussion = N/A&lt;br /&gt;
|assignee = unassigned&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This page lists potential performance improvements that could be implemented in Moodle 2.1 or later. In general we must lower the number of queries on each page, we have to decrease the memory use and we should load less javascript code. There is not much point in detailed benchmarking of current code because the causes of slowness are already known, once we fix following issues the result could be very different.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==PAGE level caching and improvements==&lt;br /&gt;
&lt;br /&gt;
The goal is to centralise all DB access caching on the current page and simplify page setup steps. The PAGE object should hold current course, activity, course_module, user&#039;s groups and enrolment status.&lt;br /&gt;
&lt;br /&gt;
There would be several new methods such as:&lt;br /&gt;
* $PAGE-&amp;gt;init_course($course_or_id)&lt;br /&gt;
* $PAGE-&amp;gt;init_activity_by_cmid($modulename, $cmid)&lt;br /&gt;
* $PAGE-&amp;gt;init_activity_by_id($module, $id)&lt;br /&gt;
* $PAGE-&amp;gt;require_login()&lt;br /&gt;
* $PAGE-&amp;gt;is_enrolled($active)&lt;br /&gt;
* $PAGE-&amp;gt;get_current_group()&lt;br /&gt;
* $PAGE-&amp;gt;get_current_groupmode()&lt;br /&gt;
&lt;br /&gt;
The benefit could be tens of DB operations per page and simplified API resulting in improved security. The backwards compatibility should not be a problem. Please note that $PAGE must not be abused in low level API and cron.&lt;br /&gt;
&lt;br /&gt;
The only potential problem is the sloppy use of $PAGE in cron scripts, it has to be completely eliminated. We could create a fake page class that prints debug info when PAGE accessed from cron script, or it might return only some basic information.&lt;br /&gt;
&lt;br /&gt;
Estimate: relatively easy, few BC problems, 1 week, pre-requirement for navigation cleanup&lt;br /&gt;
&lt;br /&gt;
==Navigation cleanup==&lt;br /&gt;
&lt;br /&gt;
The goal is fewer DB hits per page, fewer PHP includes resulting in reduced memory use.&lt;br /&gt;
&lt;br /&gt;
We would used PAGE level caching instead of current navigation caches and DB access. The unnecessary includes are usually caused by incorrect coding style in plugins.&lt;br /&gt;
&lt;br /&gt;
Admin user performance could be significantly improved if the admin tree was loaded via ajax because the admin tree is usually necessary only when admin is already in the admin section or on the frontpage. The admin tree was never intended to be constructed on each page in the first place.&lt;br /&gt;
&lt;br /&gt;
The expected benefit is fewer page includes (less memory used) and fewer DB hits on each page.&lt;br /&gt;
&lt;br /&gt;
Estimate: relatively easy, no BC problems, 1 week&lt;br /&gt;
&lt;br /&gt;
==Text caching redesign==&lt;br /&gt;
&lt;br /&gt;
Current text caching is not very efficient and may actually crate a bottleneck at the database level.&lt;br /&gt;
&lt;br /&gt;
cache_text table was always very problematic, since the introduction of new context specific filtering and more options the hits are even less likely. The cache_filters previously used as a second level cache could benefit from shared memory caching. The proposed solution is to move the caching from the format_text() function to each filter plugin. This would allow much more efficient caching without DB bottlenecks.&lt;br /&gt;
&lt;br /&gt;
Estimate: moderate, no BC problems, 1 week for core; filter caching would be implemented later using new shared memory or static caches.&lt;br /&gt;
&lt;br /&gt;
==Javascript performance==&lt;br /&gt;
&lt;br /&gt;
Our biggest problems are YUI2 and order of JS initialisation steps. We should switch to official YUI 2in3 – unfortunately YUI 2.9.0 is not supported yet and YUI 3.3.0 does not work with our code.&lt;br /&gt;
YUI2 code is also not converted to YUI3 everywhere yet – YUI 3.4.0 should include all features we need, but it will be released much later this year&lt;br /&gt;
&lt;br /&gt;
After we switched JS init in footer we started to have problems with event handler registration – it happens too late - for example you select new language and nothing happens because you did it too early. One possible solution is define priorities which would allow us to load all the non-essential stuff such as dock and navigation after the plugin specific code (such as lang menu and other jump menus).&lt;br /&gt;
&lt;br /&gt;
In short we should switch to YUI 2in3, get rid of YUI2 as much as possible and tweak the order JS execution n each page. Benefits: faster page load, better perceived performance, some fast clicking problems solved. It would be nice to have a new JS debug console.&lt;br /&gt;
&lt;br /&gt;
Estimate: difficult, BC problems caused by elimination of YUI2 in main JS scope, few weeks; our release is not aligned with YUI releases, we might have to wait till YUI 3.4.0 to get best results&lt;br /&gt;
&lt;br /&gt;
==Static dir caching==&lt;br /&gt;
&lt;br /&gt;
At present we are relying on browser level caching for all theme CSS and images, user images  and javascript code. This works fine without any server configuration and it is very reliable during Moodle upgrades. If for some reason the browser caching does not work (mobil client, https, incorrect testing setup) the server may get overloaded because the serving of files via PHP is a more expensive than standard Apache file serving.&lt;br /&gt;
&lt;br /&gt;
Solution could be a new static directory where we would mirror all our image,CSS and JS resources – server administrators would have to configure appropriate caching directives manually. This feature would be controlled by a new experimental settings, it might require manual static dir rebuilding and extra server configuration.&lt;br /&gt;
&lt;br /&gt;
The only potential problem is automatic guessing of image extensions, this could be solved by conversion of all theme images to png format.&lt;br /&gt;
&lt;br /&gt;
Estimate: relatively easy, no BC problems expected, 1 week at least&lt;br /&gt;
&lt;br /&gt;
==General caching framework==&lt;br /&gt;
&lt;br /&gt;
Please note this general caching framework is not a silver bullet, we will need to spend a lot of time on each individual improvement that is going to use it.&lt;br /&gt;
&lt;br /&gt;
We could use different types of caching, we need to pinpoint the exact places and appropriate caching strategies. There has to be a balance otherwise the caching might actually slow the servers. This issue is describing general caching types and a few examples.&lt;br /&gt;
&lt;br /&gt;
Types of caches:&lt;br /&gt;
* persistent – this is used to cache expensive information which is not changing very often; it can be recreated at any time from existing data; it can be stored in database, filesystem, session or shared memory. Examples: htmlpurifier serializer, language list, tex image cache, modinfo, etc.&lt;br /&gt;
* request – eliminate repeated queries, it is relatively easy to get the information. Examples: context cache, admin tree caching, PAGE level caching, etc.&lt;br /&gt;
&lt;br /&gt;
Sometimes the caching strategy has to be manually selected by administrator depending on the type of server load.&lt;br /&gt;
&lt;br /&gt;
A few candidates that could use this framework:&lt;br /&gt;
* list of installed languages&lt;br /&gt;
* text filtering plugins&lt;br /&gt;
* context caching&lt;br /&gt;
* user preferences&lt;br /&gt;
* definition of roles from USER-&amp;gt;access&lt;br /&gt;
&lt;br /&gt;
The major problem is that we do not know what the API should look like, we need to start with implementation and gradually improve the API. I think we should begin with internal code first because we can deal with BC issues there easily.&lt;br /&gt;
&lt;br /&gt;
Estimate: hard, major API changes expected, months&lt;br /&gt;
&lt;br /&gt;
==Smaller sessions==&lt;br /&gt;
&lt;br /&gt;
Large sessions cause performance problems, we have to find ways to minimise our session data.&lt;br /&gt;
&lt;br /&gt;
Known problems:&lt;br /&gt;
* bogus calendar stuff&lt;br /&gt;
* repeated role definitions in each session&lt;br /&gt;
* user preferences&lt;br /&gt;
&lt;br /&gt;
Solution is to use other caching solutions and optimise the amount of information stored in session.&lt;br /&gt;
&lt;br /&gt;
Estimate: mixed difficulty, some parts can be fixed easily, others may require major refactoring&lt;br /&gt;
&lt;br /&gt;
==Load balancing support==&lt;br /&gt;
&lt;br /&gt;
Moodle is not optimised to be compatible with advanced load balancing set-ups. Usually the network filesystem access is the bottleneck here. The obvious solution would be to split the dataroot into separate storage, cache and temp areas.&lt;br /&gt;
&lt;br /&gt;
Depends on:&lt;br /&gt;
* improved caching&lt;br /&gt;
* no temporary files that span http requests in filesystem or shared memory&lt;br /&gt;
* separation of caches and temp files from moodledata&lt;br /&gt;
* elimination of file locking operations&lt;br /&gt;
&lt;br /&gt;
Estimate: hard, several months, depends on cleanup in several areas and changes in API&lt;br /&gt;
&lt;br /&gt;
==New logging framework==&lt;br /&gt;
&lt;br /&gt;
Current logging is insufficient and may be major bottleneck at the database level. Ideally all logging and subsequent access to log information should be abstracted at PHP level to allow different implementations (separate DB link, filesystem, etc.).&lt;br /&gt;
&lt;br /&gt;
Estimate: hard, API changes + new plugins and reports necessary, months&lt;br /&gt;
&lt;br /&gt;
==Other topics==&lt;br /&gt;
&lt;br /&gt;
* Mobile device caching and performance&lt;br /&gt;
* statistics aggregation&lt;br /&gt;
* moodle_string class from Sam&lt;br /&gt;
* HTMLPurifier shortcuts&lt;br /&gt;
&lt;br /&gt;
TODO: add links to MDLs&lt;br /&gt;
&lt;br /&gt;
==Compare performance of different databases==&lt;br /&gt;
Some database might be significantly faster, it would be nice to know what database is best for each different server load type.&lt;br /&gt;
&lt;br /&gt;
==General prerequisites==&lt;br /&gt;
&lt;br /&gt;
Core developers are not skilled at server configuration or production server optimisations. Large parts of Moodle 2.0 were developed on ageing computers using slow ADSL connections without any real test data. Some refactoring and API changes necessary for future performance improvements were already carried out, but in general the performance did not have high priority during the 2.0dev cycle.&lt;br /&gt;
&lt;br /&gt;
Developers need:&lt;br /&gt;
* access to data sets similar to existing large production sites.&lt;br /&gt;
* to know how are production servers configured (load balancing, db configurations, apache configurations, reverse proxing, etc.)&lt;br /&gt;
* access to large hardware that can simulate complex server loads and both slow &amp;amp; fast client connection.&lt;br /&gt;
* access to all supported browsers, operating systems and especially mobile devices.&lt;br /&gt;
* to study available profiling tools and ways how to simulate real life workloads.&lt;br /&gt;
&lt;br /&gt;
Current build-in tools:&lt;br /&gt;
* basic performance counters in page footers - we need more information and some external logging&lt;br /&gt;
* data generator script - unmaintained, we need to improve it significantly&lt;br /&gt;
* xhprof integration&lt;/div&gt;</summary>
		<author><name>Geoffr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Talk:Resource_module_file_API_migration&amp;diff=27941</id>
		<title>Talk:Resource module file API migration</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Talk:Resource_module_file_API_migration&amp;diff=27941"/>
		<updated>2010-08-01T17:27:34Z</updated>

		<summary type="html">&lt;p&gt;Geoffr: /* Jmol Resource: Comment from Geoff */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Current problems==&lt;br /&gt;
embedded images are lost during backup &amp;amp; restore which moves the course to a new site. -- Matt Gibson 08:53, 18 May 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Separate contrib modules==&lt;br /&gt;
New local files module - contrib - ???? --Eloy Lafuente (stronk7) 16:21, 19 May 2009 (UTC)&lt;br /&gt;
mod/resource/type/file/localfile.php is a win32 only hack which is not maintained much these days Petr Škoda (škoďák)&lt;br /&gt;
&lt;br /&gt;
==Extracted from HQ chat, pending to confirm (Y/N)==&lt;br /&gt;
I liked the :&lt;br /&gt;
&lt;br /&gt;
* 0 = native 2.0&lt;br /&gt;
* 1= flagged as migrated&lt;br /&gt;
* 2= pending to migrate&lt;br /&gt;
* lastmodified = for still being migrated-on-demand resources&lt;br /&gt;
&lt;br /&gt;
- so, anything with flag &amp;gt; 2 is susceptible to be marked as migrated (1) by any process (manual/automatic or whatever we can implement) and, at the same time, we keep native (0) and flagge (1) d separate, helping to know the orgin of the resource in case we need it later.&lt;br /&gt;
&lt;br /&gt;
- so, on upgrade... I&#039;d mark everything as pending to migrate (2) and then, think on possible ways to perform the lastmodified =&amp;gt; 1 conversion (but never to 0. it&#039;s reserved for native 2.0)&lt;br /&gt;
&lt;br /&gt;
--[[User:Eloy Lafuente (stronk7)|Eloy Lafuente (stronk7)]] 09:38, 28 May 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
==TODO - explain exactly how pluginfile can derive ...==&lt;br /&gt;
Here it&#039;s a tentative explanation:&lt;br /&gt;
&lt;br /&gt;
The whole path (within legacy course files) will be fully retained when copying files to the resource files area. &lt;br /&gt;
&lt;br /&gt;
So for example, if we have one resource pointing to: &#039;&#039;&amp;quot;some/dir/with/index.html file&amp;quot;&#039;&#039;, the &#039;&#039;&amp;quot;some/dir/with&amp;quot;&#039;&#039; directories will be created (if don&#039;t exist) in destination resource file area and then the &#039;&#039;&amp;quot;index.hml&amp;quot;&#039;&#039; file will be copied there (also, if don&#039;t exist, obviously).&lt;br /&gt;
&lt;br /&gt;
Then, advancing in the example, if that html includes one link to say: &#039;&#039;&amp;quot;another/different/dir/style.css&amp;quot;&#039;&#039;, then the &#039;&#039;&amp;quot;another/different/dir&amp;quot;&#039;&#039; dir will be created (once again, if it doesn&#039;t exist) and then the &#039;&#039;&amp;quot;style.css&amp;quot;&#039;&#039; file with be copied there (do you guess when? :-P ).&lt;br /&gt;
&lt;br /&gt;
That way, by retaining the &amp;quot;relative paths&amp;quot; present in legacy course files when copying them to 2.0 resource file areas, the only change will be that old resources being server by &amp;quot;file.php&amp;quot; will be now served by &amp;quot;pluginfile.php&amp;quot;, (with different parameters related to course/context/filearea, not important) but 100% equivalent in all their relative links. &lt;br /&gt;
&lt;br /&gt;
--[[User:Eloy Lafuente (stronk7)|Eloy Lafuente (stronk7)]] 09:49, 28 May 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Some comments from Tim ==&lt;br /&gt;
&lt;br /&gt;
Brilliant! Excellent detailed spec. Just a few comments:&lt;br /&gt;
&lt;br /&gt;
I added a few comments inline in the main page becuase it seemed easier. Please see main page history.&lt;br /&gt;
&lt;br /&gt;
For the resource_historic table - in the blocks code I used block_instance_old. old is shorter, is it worth being consistent?&lt;br /&gt;
&lt;br /&gt;
mod/page -&amp;gt; Show course blocks options. Martin said that that option could just be removed.&lt;br /&gt;
&lt;br /&gt;
is mod/link a better name than mod/url?&lt;br /&gt;
&lt;br /&gt;
mod/imspackage I have normally seen IMS Content Packaging abbreviated as IMS-CP. Since IMS may come out with other packaging schemes in the future, might it be better to call the module mod/imscp? Or would it be better to have one module to support all the packaging formats that we support? That is, should we go the other way and call it mod/contentpackage? (No, becuase SCORM will still be separate, and anyway, that name is too long.)&lt;br /&gt;
&lt;br /&gt;
--[[User:Tim Hunt|Tim Hunt]] 05:34, 9 June 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Some comments from Ray ==&lt;br /&gt;
&lt;br /&gt;
* References to &amp;quot;Directory&amp;quot;. This is terminology that most teachers, trainers etc. are not familiar with. A good time to standardise on the term &amp;quot;folder&amp;quot;. MDL-11841&lt;br /&gt;
&lt;br /&gt;
* Perhaps update spec table from &amp;quot;Links to external files in repositories (ie Hive)&amp;quot; to &amp;quot;Links to external files in repositories (e.g. Hive) &amp;quot;.&lt;br /&gt;
&lt;br /&gt;
-- Ray Lawrence 15/6/09&lt;br /&gt;
&lt;br /&gt;
== Jmol Resource: Comment from Geoff ==&lt;br /&gt;
&lt;br /&gt;
I think the Jmol Resource Type should also become a Resource Module (Not Filter, as suggested in the Development Docs)&lt;br /&gt;
&lt;br /&gt;
A separate Jmol filter already exists and does a different (simpler) job to the Resource Type. Latest versions of the Resource Type have a sophisticated configuration interface so that teachers can (relatively) easily build Jmol-based resources with different display options, controls and textual context. This would be (is) cumbersome to do through a Filter.&lt;br /&gt;
&lt;br /&gt;
At their simplest, Jmol resources are Web pages so could be considered a specialised HTML Page Resource Module&lt;br /&gt;
At their most complex, Jmol resources are akin to IMS packages. Indeed, I have built Jmol into IMS packages using RELOAD. However, again, this is much more cumbersome than using the Jmol Resource type configuration interface. That said, I do fully appreciate the portability of IMS packages between different systems.&lt;br /&gt;
&lt;br /&gt;
Therefore I suggest the following development sequence (I&#039;ll be happy to have a go at this!)&lt;br /&gt;
&lt;br /&gt;
1. Update Jmol filter for Moodle 2.0 (Should be straightforward)&lt;br /&gt;
2. Convert the Jmol Resource Type to a Jmol Resource Module /mod/jmol. The current Jmol Resource type was modelled on, amongst others, the HTML and Text Page Resource Types, so the new version could be based on mod/page&lt;br /&gt;
3. Consider &#039;converging&#039; the Jmol Resource Module with the IMS Resource Module mod/imscp. i.e. making the the Jmol Resource Module a specialised form of IMS package. The aim would be to retain the (relatively) simple resource-building interface, but allow import-export with other systems.&lt;br /&gt;
&lt;br /&gt;
Hope I&#039;m on the right lines with this.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
On further scrutiny, perhaps the Jmol Resource Type is best aligned with Scenario 2 of the general Resource Module mod/resource&lt;br /&gt;
&lt;br /&gt;
Secondary use cases: My additions in &#039;&#039;&#039;bold&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
* simple media file presentation - images, flash, movies, mp3, etc. &#039;&#039;&#039;3D molecular coordinate files, .cml, .cif, .mol, .pdb, .xyz etc.&#039;&#039;&#039;&lt;br /&gt;
* serving of general html files created in external system - web pages, html exported from Word, content packages, etc. &#039;&#039;&#039;Web pages exported from built-in Jmol template&#039;&#039;&#039;&lt;br /&gt;
* presentation of non-standard media files - no full control over embedding, might require proprietary browser plug-ins (quicktime, windows media, real media, adobe shockwave)  &#039;&#039;&#039;Java applets such as Jmol, FreeMind etc&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Geoffr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Talk:Resource_module_file_API_migration&amp;diff=27940</id>
		<title>Talk:Resource module file API migration</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Talk:Resource_module_file_API_migration&amp;diff=27940"/>
		<updated>2010-08-01T17:25:12Z</updated>

		<summary type="html">&lt;p&gt;Geoffr: /* Jmol Resource: Comment from Geoff */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Current problems==&lt;br /&gt;
embedded images are lost during backup &amp;amp; restore which moves the course to a new site. -- Matt Gibson 08:53, 18 May 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Separate contrib modules==&lt;br /&gt;
New local files module - contrib - ???? --Eloy Lafuente (stronk7) 16:21, 19 May 2009 (UTC)&lt;br /&gt;
mod/resource/type/file/localfile.php is a win32 only hack which is not maintained much these days Petr Škoda (škoďák)&lt;br /&gt;
&lt;br /&gt;
==Extracted from HQ chat, pending to confirm (Y/N)==&lt;br /&gt;
I liked the :&lt;br /&gt;
&lt;br /&gt;
* 0 = native 2.0&lt;br /&gt;
* 1= flagged as migrated&lt;br /&gt;
* 2= pending to migrate&lt;br /&gt;
* lastmodified = for still being migrated-on-demand resources&lt;br /&gt;
&lt;br /&gt;
- so, anything with flag &amp;gt; 2 is susceptible to be marked as migrated (1) by any process (manual/automatic or whatever we can implement) and, at the same time, we keep native (0) and flagge (1) d separate, helping to know the orgin of the resource in case we need it later.&lt;br /&gt;
&lt;br /&gt;
- so, on upgrade... I&#039;d mark everything as pending to migrate (2) and then, think on possible ways to perform the lastmodified =&amp;gt; 1 conversion (but never to 0. it&#039;s reserved for native 2.0)&lt;br /&gt;
&lt;br /&gt;
--[[User:Eloy Lafuente (stronk7)|Eloy Lafuente (stronk7)]] 09:38, 28 May 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
==TODO - explain exactly how pluginfile can derive ...==&lt;br /&gt;
Here it&#039;s a tentative explanation:&lt;br /&gt;
&lt;br /&gt;
The whole path (within legacy course files) will be fully retained when copying files to the resource files area. &lt;br /&gt;
&lt;br /&gt;
So for example, if we have one resource pointing to: &#039;&#039;&amp;quot;some/dir/with/index.html file&amp;quot;&#039;&#039;, the &#039;&#039;&amp;quot;some/dir/with&amp;quot;&#039;&#039; directories will be created (if don&#039;t exist) in destination resource file area and then the &#039;&#039;&amp;quot;index.hml&amp;quot;&#039;&#039; file will be copied there (also, if don&#039;t exist, obviously).&lt;br /&gt;
&lt;br /&gt;
Then, advancing in the example, if that html includes one link to say: &#039;&#039;&amp;quot;another/different/dir/style.css&amp;quot;&#039;&#039;, then the &#039;&#039;&amp;quot;another/different/dir&amp;quot;&#039;&#039; dir will be created (once again, if it doesn&#039;t exist) and then the &#039;&#039;&amp;quot;style.css&amp;quot;&#039;&#039; file with be copied there (do you guess when? :-P ).&lt;br /&gt;
&lt;br /&gt;
That way, by retaining the &amp;quot;relative paths&amp;quot; present in legacy course files when copying them to 2.0 resource file areas, the only change will be that old resources being server by &amp;quot;file.php&amp;quot; will be now served by &amp;quot;pluginfile.php&amp;quot;, (with different parameters related to course/context/filearea, not important) but 100% equivalent in all their relative links. &lt;br /&gt;
&lt;br /&gt;
--[[User:Eloy Lafuente (stronk7)|Eloy Lafuente (stronk7)]] 09:49, 28 May 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Some comments from Tim ==&lt;br /&gt;
&lt;br /&gt;
Brilliant! Excellent detailed spec. Just a few comments:&lt;br /&gt;
&lt;br /&gt;
I added a few comments inline in the main page becuase it seemed easier. Please see main page history.&lt;br /&gt;
&lt;br /&gt;
For the resource_historic table - in the blocks code I used block_instance_old. old is shorter, is it worth being consistent?&lt;br /&gt;
&lt;br /&gt;
mod/page -&amp;gt; Show course blocks options. Martin said that that option could just be removed.&lt;br /&gt;
&lt;br /&gt;
is mod/link a better name than mod/url?&lt;br /&gt;
&lt;br /&gt;
mod/imspackage I have normally seen IMS Content Packaging abbreviated as IMS-CP. Since IMS may come out with other packaging schemes in the future, might it be better to call the module mod/imscp? Or would it be better to have one module to support all the packaging formats that we support? That is, should we go the other way and call it mod/contentpackage? (No, becuase SCORM will still be separate, and anyway, that name is too long.)&lt;br /&gt;
&lt;br /&gt;
--[[User:Tim Hunt|Tim Hunt]] 05:34, 9 June 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Some comments from Ray ==&lt;br /&gt;
&lt;br /&gt;
* References to &amp;quot;Directory&amp;quot;. This is terminology that most teachers, trainers etc. are not familiar with. A good time to standardise on the term &amp;quot;folder&amp;quot;. MDL-11841&lt;br /&gt;
&lt;br /&gt;
* Perhaps update spec table from &amp;quot;Links to external files in repositories (ie Hive)&amp;quot; to &amp;quot;Links to external files in repositories (e.g. Hive) &amp;quot;.&lt;br /&gt;
&lt;br /&gt;
-- Ray Lawrence 15/6/09&lt;br /&gt;
&lt;br /&gt;
== Jmol Resource: Comment from Geoff ==&lt;br /&gt;
&lt;br /&gt;
I think the Jmol Resource Type should also become a Resource Module (Not Filter, as suggested in the Development Docs)&lt;br /&gt;
&lt;br /&gt;
A separate Jmol filter already exists and does a different (simpler) job to the Resource Type. Latest versions of the Resource Type have a sophisticated configuration interface so that teachers can (relatively) easily build Jmol-based resources with different display options, controls and textual context. This would be (is) cumbersome to do through a Filter.&lt;br /&gt;
&lt;br /&gt;
At their simplest, Jmol resources are Web pages so could be considered a specialised HTML Page Resource Module&lt;br /&gt;
At their most complex, Jmol resources are akin to IMS packages. Indeed, I have built Jmol into IMS packages using RELOAD. However, again it is much more cumbersome than using the Jmol Resource type configuration interface. That said, I do fully appreciate the portability of IMS packages between different systems.&lt;br /&gt;
&lt;br /&gt;
Therefore I suggest the following development sequence (I&#039;ll be happy to have a go at this!)&lt;br /&gt;
&lt;br /&gt;
1. Update Jmol filter for Moodle 2.0 (Should be straightforward)&lt;br /&gt;
2. Convert the Jmol Resource Type to a Jmol Resource Module /mod/jmol. The current Jmol Resource type was modelled on, amongst others, the HTML and Text Page Resource Types, so the new version could be based on mod/page&lt;br /&gt;
3. Consider &#039;converging&#039; the Jmol Resource Module with the IMS Resource Module mod/imscp. i.e. making the the Jmol Resource Module a specialised form of IMS package. The aim would be to retain the (relatively) simple resource-building interface, but allow import-export with other systems.&lt;br /&gt;
&lt;br /&gt;
Hope I&#039;m on the right lines with this.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
On further scrutiny, perhaps the Jmol Resource Type is best aligned with Scenario 2 of the general Resource Module mod/resource&lt;br /&gt;
&lt;br /&gt;
Secondary use cases: My additions in &#039;&#039;&#039;bold&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
* simple media file presentation - images, flash, movies, mp3, etc. &#039;&#039;&#039;3D molecular coordinate files, .cml, .cif, .mol, .pdb, .xyz etc.&#039;&#039;&#039;&lt;br /&gt;
* serving of general html files created in external system - web pages, html exported from Word, content packages, etc. &#039;&#039;&#039;Web pages exported from built-in Jmol template&#039;&#039;&#039;&lt;br /&gt;
* presentation of non-standard media files - no full control over embedding, might require proprietary browser plug-ins (quicktime, windows media, real media, adobe shockwave)  &#039;&#039;&#039;Java applets such as Jmol, FreeMind etc&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Geoffr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Talk:Resource_module_file_API_migration&amp;diff=27939</id>
		<title>Talk:Resource module file API migration</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Talk:Resource_module_file_API_migration&amp;diff=27939"/>
		<updated>2010-08-01T17:24:33Z</updated>

		<summary type="html">&lt;p&gt;Geoffr: /* Jmol Resource: Comment from Geoff */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Current problems==&lt;br /&gt;
embedded images are lost during backup &amp;amp; restore which moves the course to a new site. -- Matt Gibson 08:53, 18 May 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Separate contrib modules==&lt;br /&gt;
New local files module - contrib - ???? --Eloy Lafuente (stronk7) 16:21, 19 May 2009 (UTC)&lt;br /&gt;
mod/resource/type/file/localfile.php is a win32 only hack which is not maintained much these days Petr Škoda (škoďák)&lt;br /&gt;
&lt;br /&gt;
==Extracted from HQ chat, pending to confirm (Y/N)==&lt;br /&gt;
I liked the :&lt;br /&gt;
&lt;br /&gt;
* 0 = native 2.0&lt;br /&gt;
* 1= flagged as migrated&lt;br /&gt;
* 2= pending to migrate&lt;br /&gt;
* lastmodified = for still being migrated-on-demand resources&lt;br /&gt;
&lt;br /&gt;
- so, anything with flag &amp;gt; 2 is susceptible to be marked as migrated (1) by any process (manual/automatic or whatever we can implement) and, at the same time, we keep native (0) and flagge (1) d separate, helping to know the orgin of the resource in case we need it later.&lt;br /&gt;
&lt;br /&gt;
- so, on upgrade... I&#039;d mark everything as pending to migrate (2) and then, think on possible ways to perform the lastmodified =&amp;gt; 1 conversion (but never to 0. it&#039;s reserved for native 2.0)&lt;br /&gt;
&lt;br /&gt;
--[[User:Eloy Lafuente (stronk7)|Eloy Lafuente (stronk7)]] 09:38, 28 May 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
==TODO - explain exactly how pluginfile can derive ...==&lt;br /&gt;
Here it&#039;s a tentative explanation:&lt;br /&gt;
&lt;br /&gt;
The whole path (within legacy course files) will be fully retained when copying files to the resource files area. &lt;br /&gt;
&lt;br /&gt;
So for example, if we have one resource pointing to: &#039;&#039;&amp;quot;some/dir/with/index.html file&amp;quot;&#039;&#039;, the &#039;&#039;&amp;quot;some/dir/with&amp;quot;&#039;&#039; directories will be created (if don&#039;t exist) in destination resource file area and then the &#039;&#039;&amp;quot;index.hml&amp;quot;&#039;&#039; file will be copied there (also, if don&#039;t exist, obviously).&lt;br /&gt;
&lt;br /&gt;
Then, advancing in the example, if that html includes one link to say: &#039;&#039;&amp;quot;another/different/dir/style.css&amp;quot;&#039;&#039;, then the &#039;&#039;&amp;quot;another/different/dir&amp;quot;&#039;&#039; dir will be created (once again, if it doesn&#039;t exist) and then the &#039;&#039;&amp;quot;style.css&amp;quot;&#039;&#039; file with be copied there (do you guess when? :-P ).&lt;br /&gt;
&lt;br /&gt;
That way, by retaining the &amp;quot;relative paths&amp;quot; present in legacy course files when copying them to 2.0 resource file areas, the only change will be that old resources being server by &amp;quot;file.php&amp;quot; will be now served by &amp;quot;pluginfile.php&amp;quot;, (with different parameters related to course/context/filearea, not important) but 100% equivalent in all their relative links. &lt;br /&gt;
&lt;br /&gt;
--[[User:Eloy Lafuente (stronk7)|Eloy Lafuente (stronk7)]] 09:49, 28 May 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Some comments from Tim ==&lt;br /&gt;
&lt;br /&gt;
Brilliant! Excellent detailed spec. Just a few comments:&lt;br /&gt;
&lt;br /&gt;
I added a few comments inline in the main page becuase it seemed easier. Please see main page history.&lt;br /&gt;
&lt;br /&gt;
For the resource_historic table - in the blocks code I used block_instance_old. old is shorter, is it worth being consistent?&lt;br /&gt;
&lt;br /&gt;
mod/page -&amp;gt; Show course blocks options. Martin said that that option could just be removed.&lt;br /&gt;
&lt;br /&gt;
is mod/link a better name than mod/url?&lt;br /&gt;
&lt;br /&gt;
mod/imspackage I have normally seen IMS Content Packaging abbreviated as IMS-CP. Since IMS may come out with other packaging schemes in the future, might it be better to call the module mod/imscp? Or would it be better to have one module to support all the packaging formats that we support? That is, should we go the other way and call it mod/contentpackage? (No, becuase SCORM will still be separate, and anyway, that name is too long.)&lt;br /&gt;
&lt;br /&gt;
--[[User:Tim Hunt|Tim Hunt]] 05:34, 9 June 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Some comments from Ray ==&lt;br /&gt;
&lt;br /&gt;
* References to &amp;quot;Directory&amp;quot;. This is terminology that most teachers, trainers etc. are not familiar with. A good time to standardise on the term &amp;quot;folder&amp;quot;. MDL-11841&lt;br /&gt;
&lt;br /&gt;
* Perhaps update spec table from &amp;quot;Links to external files in repositories (ie Hive)&amp;quot; to &amp;quot;Links to external files in repositories (e.g. Hive) &amp;quot;.&lt;br /&gt;
&lt;br /&gt;
-- Ray Lawrence 15/6/09&lt;br /&gt;
&lt;br /&gt;
== Jmol Resource: Comment from Geoff ==&lt;br /&gt;
&lt;br /&gt;
I think the Jmol Resource Type should also become a Resource Module (Not Filter, as suggested in the Development Docs)&lt;br /&gt;
&lt;br /&gt;
A separate Jmol filter already exists and does a different (simpler) job to the Resource Type. Latest versions of the Resource Type have a sophisticated configuration interface so that teachers can (relatively) easily build Jmol-based resources with different display options, controls and textual context. This would be (is) cumbersome to do through a Filter.&lt;br /&gt;
&lt;br /&gt;
At their simplest, Jmol resources are Web pages so could be considered a specialised HTML Page Resource Module&lt;br /&gt;
At their most complex, Jmol resources are akin to IMS packages. Indeed, I have built Jmol into IMS packages using RELOAD. However, again it is much more cumbersome than using the Jmol Resource type configuration interface. That said, I do fully appreciate the portability of IMS packages between different systems.&lt;br /&gt;
&lt;br /&gt;
Therefore I suggest the following development sequence (I&#039;ll be happy to have a go at this!)&lt;br /&gt;
&lt;br /&gt;
1. Update Jmol filter for Moodle 2.0 (Should be straightforward)&lt;br /&gt;
2. Convert the Jmol Resource Type to a Jmol Resource Module /mod/jmol. The current Jmol Resource type was modelled on, amongst others, the HTML and Text Page Resource Types, so the new version could be based on mod/page&lt;br /&gt;
3. Consider &#039;converging&#039; the Jmol Resource Module with the IMS Resource Module mod/imscp. i.e. making the the Jmol Resource Module a specialised form of IMS package. The aim would be to retain the (relatively) simple resource-building interface, but allow import-export with other systems.&lt;br /&gt;
&lt;br /&gt;
Hope I&#039;m on the right lines with this.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
On further scrutiny, perhaps the Jmol Resource Type is best aligned with Scenario 2 of the general Resource Module mod/resource&lt;br /&gt;
&lt;br /&gt;
Secondary use cases: My additions in &#039;&#039;&#039;bold&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
simple media file presentation - images, flash, movies, mp3, etc. &#039;&#039;&#039;3D molecular coordinate files, .cml, .cif, .mol, .pdb, .xyz etc.&#039;&#039;&#039;&lt;br /&gt;
serving of general html files created in external system - web pages, html exported from Word, content packages, etc. &#039;&#039;&#039;Web pages exported from built-in Jmol template&#039;&#039;&#039;&lt;br /&gt;
presentation of non-standard media files - no full control over embedding, might require proprietary browser plug-ins (quicktime, windows media, real media, adobe shockwave)  &#039;&#039;&#039;Java applets such as Jmol, FreeMind etc&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Geoffr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Talk:Resource_module_file_API_migration&amp;diff=27938</id>
		<title>Talk:Resource module file API migration</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Talk:Resource_module_file_API_migration&amp;diff=27938"/>
		<updated>2010-08-01T17:23:29Z</updated>

		<summary type="html">&lt;p&gt;Geoffr: /* Jmol Resource: Comment from Geoff */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Current problems==&lt;br /&gt;
embedded images are lost during backup &amp;amp; restore which moves the course to a new site. -- Matt Gibson 08:53, 18 May 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Separate contrib modules==&lt;br /&gt;
New local files module - contrib - ???? --Eloy Lafuente (stronk7) 16:21, 19 May 2009 (UTC)&lt;br /&gt;
mod/resource/type/file/localfile.php is a win32 only hack which is not maintained much these days Petr Škoda (škoďák)&lt;br /&gt;
&lt;br /&gt;
==Extracted from HQ chat, pending to confirm (Y/N)==&lt;br /&gt;
I liked the :&lt;br /&gt;
&lt;br /&gt;
* 0 = native 2.0&lt;br /&gt;
* 1= flagged as migrated&lt;br /&gt;
* 2= pending to migrate&lt;br /&gt;
* lastmodified = for still being migrated-on-demand resources&lt;br /&gt;
&lt;br /&gt;
- so, anything with flag &amp;gt; 2 is susceptible to be marked as migrated (1) by any process (manual/automatic or whatever we can implement) and, at the same time, we keep native (0) and flagge (1) d separate, helping to know the orgin of the resource in case we need it later.&lt;br /&gt;
&lt;br /&gt;
- so, on upgrade... I&#039;d mark everything as pending to migrate (2) and then, think on possible ways to perform the lastmodified =&amp;gt; 1 conversion (but never to 0. it&#039;s reserved for native 2.0)&lt;br /&gt;
&lt;br /&gt;
--[[User:Eloy Lafuente (stronk7)|Eloy Lafuente (stronk7)]] 09:38, 28 May 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
==TODO - explain exactly how pluginfile can derive ...==&lt;br /&gt;
Here it&#039;s a tentative explanation:&lt;br /&gt;
&lt;br /&gt;
The whole path (within legacy course files) will be fully retained when copying files to the resource files area. &lt;br /&gt;
&lt;br /&gt;
So for example, if we have one resource pointing to: &#039;&#039;&amp;quot;some/dir/with/index.html file&amp;quot;&#039;&#039;, the &#039;&#039;&amp;quot;some/dir/with&amp;quot;&#039;&#039; directories will be created (if don&#039;t exist) in destination resource file area and then the &#039;&#039;&amp;quot;index.hml&amp;quot;&#039;&#039; file will be copied there (also, if don&#039;t exist, obviously).&lt;br /&gt;
&lt;br /&gt;
Then, advancing in the example, if that html includes one link to say: &#039;&#039;&amp;quot;another/different/dir/style.css&amp;quot;&#039;&#039;, then the &#039;&#039;&amp;quot;another/different/dir&amp;quot;&#039;&#039; dir will be created (once again, if it doesn&#039;t exist) and then the &#039;&#039;&amp;quot;style.css&amp;quot;&#039;&#039; file with be copied there (do you guess when? :-P ).&lt;br /&gt;
&lt;br /&gt;
That way, by retaining the &amp;quot;relative paths&amp;quot; present in legacy course files when copying them to 2.0 resource file areas, the only change will be that old resources being server by &amp;quot;file.php&amp;quot; will be now served by &amp;quot;pluginfile.php&amp;quot;, (with different parameters related to course/context/filearea, not important) but 100% equivalent in all their relative links. &lt;br /&gt;
&lt;br /&gt;
--[[User:Eloy Lafuente (stronk7)|Eloy Lafuente (stronk7)]] 09:49, 28 May 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Some comments from Tim ==&lt;br /&gt;
&lt;br /&gt;
Brilliant! Excellent detailed spec. Just a few comments:&lt;br /&gt;
&lt;br /&gt;
I added a few comments inline in the main page becuase it seemed easier. Please see main page history.&lt;br /&gt;
&lt;br /&gt;
For the resource_historic table - in the blocks code I used block_instance_old. old is shorter, is it worth being consistent?&lt;br /&gt;
&lt;br /&gt;
mod/page -&amp;gt; Show course blocks options. Martin said that that option could just be removed.&lt;br /&gt;
&lt;br /&gt;
is mod/link a better name than mod/url?&lt;br /&gt;
&lt;br /&gt;
mod/imspackage I have normally seen IMS Content Packaging abbreviated as IMS-CP. Since IMS may come out with other packaging schemes in the future, might it be better to call the module mod/imscp? Or would it be better to have one module to support all the packaging formats that we support? That is, should we go the other way and call it mod/contentpackage? (No, becuase SCORM will still be separate, and anyway, that name is too long.)&lt;br /&gt;
&lt;br /&gt;
--[[User:Tim Hunt|Tim Hunt]] 05:34, 9 June 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Some comments from Ray ==&lt;br /&gt;
&lt;br /&gt;
* References to &amp;quot;Directory&amp;quot;. This is terminology that most teachers, trainers etc. are not familiar with. A good time to standardise on the term &amp;quot;folder&amp;quot;. MDL-11841&lt;br /&gt;
&lt;br /&gt;
* Perhaps update spec table from &amp;quot;Links to external files in repositories (ie Hive)&amp;quot; to &amp;quot;Links to external files in repositories (e.g. Hive) &amp;quot;.&lt;br /&gt;
&lt;br /&gt;
-- Ray Lawrence 15/6/09&lt;br /&gt;
&lt;br /&gt;
== Jmol Resource: Comment from Geoff ==&lt;br /&gt;
&lt;br /&gt;
I think the Jmol Resource Type should also become a Resource Module (Not Filter, as suggested in the Development Docs)&lt;br /&gt;
&lt;br /&gt;
A separate Jmol filter already exists and does a different (simpler) job to the Resource Type. Latest versions of the Resource Type have a sophisticated configuration interface so that teachers can (relatively) easily build Jmol-based resources with different display options, controls and textual context. This would be (is) cumbersome to do through a Filter.&lt;br /&gt;
&lt;br /&gt;
At their simplest, Jmol resources are Web pages so could be considered a specialised HTML Page Resource Module&lt;br /&gt;
At their most complex, Jmol resources are akin to IMS packages. Indeed, I have built Jmol into IMS packages using RELOAD. However, again it is much more cumbersome than using the Jmol Resource type configuration interface. That said, I do fully appreciate the portability of IMS packages between different systems.&lt;br /&gt;
&lt;br /&gt;
Therefore I suggest the following development sequence (I&#039;ll be happy to have a go at this!)&lt;br /&gt;
&lt;br /&gt;
1. Update Jmol filter for Moodle 2.0 (Should be straightforward)&lt;br /&gt;
2. Convert the Jmol Resource Type to a Jmol Resource Module /mod/jmol. The current Jmol Resource type was modelled on, amongst others, the HTML and Text Page Resource Types, so the new version could be based on mod/page&lt;br /&gt;
3. Consider &#039;converging&#039; the Jmol Resource Module with the IMS Resource Module mod/imscp. i.e. making the the Jmol Resource Module a specialised form of IMS package. The aim would be to retain the (relatively) simple resource-building interface, but allow import-export with other systems.&lt;br /&gt;
&lt;br /&gt;
Hope I&#039;m on the right lines with this.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
On further scrutiny, perhaps the Jmol Resource Type is best aligned with Scenario 2 of the general Resource Module mod/resource&lt;br /&gt;
&lt;br /&gt;
Secondary use cases: My additions in &#039;&#039;&#039;bold&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
    * simple media file presentation - images, flash, movies, mp3, etc. &#039;&#039;&#039;3D molecular coordinate files, .cml, .cif, .mol, .pdb, .xyz etc.&#039;&#039;&#039;&lt;br /&gt;
    * serving of general html files created in external system - web pages, html exported from Word, content packages, etc. &#039;&#039;&#039;Web pages exported from built-in Jmol template&#039;&#039;&#039;&lt;br /&gt;
    * presentation of non-standard media files - no full control over embedding, might require proprietary browser plug-ins (quicktime, windows media, real media, adobe shockwave)  &#039;&#039;&#039;Java applets such as Jmol, FreeMind etc&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Geoffr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Talk:Resource_module_file_API_migration&amp;diff=27937</id>
		<title>Talk:Resource module file API migration</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Talk:Resource_module_file_API_migration&amp;diff=27937"/>
		<updated>2010-08-01T15:35:27Z</updated>

		<summary type="html">&lt;p&gt;Geoffr: /* Jmol Resource: Comment from Geoff */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Current problems==&lt;br /&gt;
embedded images are lost during backup &amp;amp; restore which moves the course to a new site. -- Matt Gibson 08:53, 18 May 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Separate contrib modules==&lt;br /&gt;
New local files module - contrib - ???? --Eloy Lafuente (stronk7) 16:21, 19 May 2009 (UTC)&lt;br /&gt;
mod/resource/type/file/localfile.php is a win32 only hack which is not maintained much these days Petr Škoda (škoďák)&lt;br /&gt;
&lt;br /&gt;
==Extracted from HQ chat, pending to confirm (Y/N)==&lt;br /&gt;
I liked the :&lt;br /&gt;
&lt;br /&gt;
* 0 = native 2.0&lt;br /&gt;
* 1= flagged as migrated&lt;br /&gt;
* 2= pending to migrate&lt;br /&gt;
* lastmodified = for still being migrated-on-demand resources&lt;br /&gt;
&lt;br /&gt;
- so, anything with flag &amp;gt; 2 is susceptible to be marked as migrated (1) by any process (manual/automatic or whatever we can implement) and, at the same time, we keep native (0) and flagge (1) d separate, helping to know the orgin of the resource in case we need it later.&lt;br /&gt;
&lt;br /&gt;
- so, on upgrade... I&#039;d mark everything as pending to migrate (2) and then, think on possible ways to perform the lastmodified =&amp;gt; 1 conversion (but never to 0. it&#039;s reserved for native 2.0)&lt;br /&gt;
&lt;br /&gt;
--[[User:Eloy Lafuente (stronk7)|Eloy Lafuente (stronk7)]] 09:38, 28 May 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
==TODO - explain exactly how pluginfile can derive ...==&lt;br /&gt;
Here it&#039;s a tentative explanation:&lt;br /&gt;
&lt;br /&gt;
The whole path (within legacy course files) will be fully retained when copying files to the resource files area. &lt;br /&gt;
&lt;br /&gt;
So for example, if we have one resource pointing to: &#039;&#039;&amp;quot;some/dir/with/index.html file&amp;quot;&#039;&#039;, the &#039;&#039;&amp;quot;some/dir/with&amp;quot;&#039;&#039; directories will be created (if don&#039;t exist) in destination resource file area and then the &#039;&#039;&amp;quot;index.hml&amp;quot;&#039;&#039; file will be copied there (also, if don&#039;t exist, obviously).&lt;br /&gt;
&lt;br /&gt;
Then, advancing in the example, if that html includes one link to say: &#039;&#039;&amp;quot;another/different/dir/style.css&amp;quot;&#039;&#039;, then the &#039;&#039;&amp;quot;another/different/dir&amp;quot;&#039;&#039; dir will be created (once again, if it doesn&#039;t exist) and then the &#039;&#039;&amp;quot;style.css&amp;quot;&#039;&#039; file with be copied there (do you guess when? :-P ).&lt;br /&gt;
&lt;br /&gt;
That way, by retaining the &amp;quot;relative paths&amp;quot; present in legacy course files when copying them to 2.0 resource file areas, the only change will be that old resources being server by &amp;quot;file.php&amp;quot; will be now served by &amp;quot;pluginfile.php&amp;quot;, (with different parameters related to course/context/filearea, not important) but 100% equivalent in all their relative links. &lt;br /&gt;
&lt;br /&gt;
--[[User:Eloy Lafuente (stronk7)|Eloy Lafuente (stronk7)]] 09:49, 28 May 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Some comments from Tim ==&lt;br /&gt;
&lt;br /&gt;
Brilliant! Excellent detailed spec. Just a few comments:&lt;br /&gt;
&lt;br /&gt;
I added a few comments inline in the main page becuase it seemed easier. Please see main page history.&lt;br /&gt;
&lt;br /&gt;
For the resource_historic table - in the blocks code I used block_instance_old. old is shorter, is it worth being consistent?&lt;br /&gt;
&lt;br /&gt;
mod/page -&amp;gt; Show course blocks options. Martin said that that option could just be removed.&lt;br /&gt;
&lt;br /&gt;
is mod/link a better name than mod/url?&lt;br /&gt;
&lt;br /&gt;
mod/imspackage I have normally seen IMS Content Packaging abbreviated as IMS-CP. Since IMS may come out with other packaging schemes in the future, might it be better to call the module mod/imscp? Or would it be better to have one module to support all the packaging formats that we support? That is, should we go the other way and call it mod/contentpackage? (No, becuase SCORM will still be separate, and anyway, that name is too long.)&lt;br /&gt;
&lt;br /&gt;
--[[User:Tim Hunt|Tim Hunt]] 05:34, 9 June 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Some comments from Ray ==&lt;br /&gt;
&lt;br /&gt;
* References to &amp;quot;Directory&amp;quot;. This is terminology that most teachers, trainers etc. are not familiar with. A good time to standardise on the term &amp;quot;folder&amp;quot;. MDL-11841&lt;br /&gt;
&lt;br /&gt;
* Perhaps update spec table from &amp;quot;Links to external files in repositories (ie Hive)&amp;quot; to &amp;quot;Links to external files in repositories (e.g. Hive) &amp;quot;.&lt;br /&gt;
&lt;br /&gt;
-- Ray Lawrence 15/6/09&lt;br /&gt;
&lt;br /&gt;
== Jmol Resource: Comment from Geoff ==&lt;br /&gt;
&lt;br /&gt;
I think the Jmol Resource Type should also become a Resource Module (Not Filter, as suggested in the Development Docs)&lt;br /&gt;
&lt;br /&gt;
A separate Jmol filter already exists and does a different (simpler) job to the Resource Type. Latest versions of the Resource Type have a sophisticated configuration interface so that teachers can (relatively) easily build Jmol-based resources with different display options, controls and textual context. This would be (is) cumbersome to do through a Filter.&lt;br /&gt;
&lt;br /&gt;
At their simplest, Jmol resources are Web pages so could be considered a specialised HTML Page Resource Module&lt;br /&gt;
At their most complex, Jmol resources are akin to IMS packages. Indeed, I have built Jmol into IMS packages using RELOAD. However, again it is much more cumbersome than using the Jmol Resource type configuration interface. That said, I do fully appreciate the portability of IMS packages between different systems.&lt;br /&gt;
&lt;br /&gt;
Therefore I suggest the following development sequence (I&#039;ll be happy to have a go at this!)&lt;br /&gt;
&lt;br /&gt;
1. Update Jmol filter for Moodle 2.0 (Should be straightforward)&lt;br /&gt;
2. Convert the Jmol Resource Type to a Jmol Resource Module /mod/jmol. The current Jmol Resource type was modelled on, amongst others, the HTML and Text Page Resource Types, so the new version could be based on mod/page&lt;br /&gt;
3. Consider &#039;converging&#039; the Jmol Resource Module with the IMS Resource Module mod/imscp. i.e. making the the Jmol Resource Module a specialised form of IMS package. The aim would be to retain the (relatively) simple resource-building interface, but allow import-export with other systems.&lt;br /&gt;
&lt;br /&gt;
Hope I&#039;m on the right lines with this.&lt;/div&gt;</summary>
		<author><name>Geoffr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Talk:Resource_module_file_API_migration&amp;diff=27936</id>
		<title>Talk:Resource module file API migration</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Talk:Resource_module_file_API_migration&amp;diff=27936"/>
		<updated>2010-08-01T15:28:53Z</updated>

		<summary type="html">&lt;p&gt;Geoffr: /* Jmol Resource: Comment from Geoff */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Current problems==&lt;br /&gt;
embedded images are lost during backup &amp;amp; restore which moves the course to a new site. -- Matt Gibson 08:53, 18 May 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Separate contrib modules==&lt;br /&gt;
New local files module - contrib - ???? --Eloy Lafuente (stronk7) 16:21, 19 May 2009 (UTC)&lt;br /&gt;
mod/resource/type/file/localfile.php is a win32 only hack which is not maintained much these days Petr Škoda (škoďák)&lt;br /&gt;
&lt;br /&gt;
==Extracted from HQ chat, pending to confirm (Y/N)==&lt;br /&gt;
I liked the :&lt;br /&gt;
&lt;br /&gt;
* 0 = native 2.0&lt;br /&gt;
* 1= flagged as migrated&lt;br /&gt;
* 2= pending to migrate&lt;br /&gt;
* lastmodified = for still being migrated-on-demand resources&lt;br /&gt;
&lt;br /&gt;
- so, anything with flag &amp;gt; 2 is susceptible to be marked as migrated (1) by any process (manual/automatic or whatever we can implement) and, at the same time, we keep native (0) and flagge (1) d separate, helping to know the orgin of the resource in case we need it later.&lt;br /&gt;
&lt;br /&gt;
- so, on upgrade... I&#039;d mark everything as pending to migrate (2) and then, think on possible ways to perform the lastmodified =&amp;gt; 1 conversion (but never to 0. it&#039;s reserved for native 2.0)&lt;br /&gt;
&lt;br /&gt;
--[[User:Eloy Lafuente (stronk7)|Eloy Lafuente (stronk7)]] 09:38, 28 May 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
==TODO - explain exactly how pluginfile can derive ...==&lt;br /&gt;
Here it&#039;s a tentative explanation:&lt;br /&gt;
&lt;br /&gt;
The whole path (within legacy course files) will be fully retained when copying files to the resource files area. &lt;br /&gt;
&lt;br /&gt;
So for example, if we have one resource pointing to: &#039;&#039;&amp;quot;some/dir/with/index.html file&amp;quot;&#039;&#039;, the &#039;&#039;&amp;quot;some/dir/with&amp;quot;&#039;&#039; directories will be created (if don&#039;t exist) in destination resource file area and then the &#039;&#039;&amp;quot;index.hml&amp;quot;&#039;&#039; file will be copied there (also, if don&#039;t exist, obviously).&lt;br /&gt;
&lt;br /&gt;
Then, advancing in the example, if that html includes one link to say: &#039;&#039;&amp;quot;another/different/dir/style.css&amp;quot;&#039;&#039;, then the &#039;&#039;&amp;quot;another/different/dir&amp;quot;&#039;&#039; dir will be created (once again, if it doesn&#039;t exist) and then the &#039;&#039;&amp;quot;style.css&amp;quot;&#039;&#039; file with be copied there (do you guess when? :-P ).&lt;br /&gt;
&lt;br /&gt;
That way, by retaining the &amp;quot;relative paths&amp;quot; present in legacy course files when copying them to 2.0 resource file areas, the only change will be that old resources being server by &amp;quot;file.php&amp;quot; will be now served by &amp;quot;pluginfile.php&amp;quot;, (with different parameters related to course/context/filearea, not important) but 100% equivalent in all their relative links. &lt;br /&gt;
&lt;br /&gt;
--[[User:Eloy Lafuente (stronk7)|Eloy Lafuente (stronk7)]] 09:49, 28 May 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Some comments from Tim ==&lt;br /&gt;
&lt;br /&gt;
Brilliant! Excellent detailed spec. Just a few comments:&lt;br /&gt;
&lt;br /&gt;
I added a few comments inline in the main page becuase it seemed easier. Please see main page history.&lt;br /&gt;
&lt;br /&gt;
For the resource_historic table - in the blocks code I used block_instance_old. old is shorter, is it worth being consistent?&lt;br /&gt;
&lt;br /&gt;
mod/page -&amp;gt; Show course blocks options. Martin said that that option could just be removed.&lt;br /&gt;
&lt;br /&gt;
is mod/link a better name than mod/url?&lt;br /&gt;
&lt;br /&gt;
mod/imspackage I have normally seen IMS Content Packaging abbreviated as IMS-CP. Since IMS may come out with other packaging schemes in the future, might it be better to call the module mod/imscp? Or would it be better to have one module to support all the packaging formats that we support? That is, should we go the other way and call it mod/contentpackage? (No, becuase SCORM will still be separate, and anyway, that name is too long.)&lt;br /&gt;
&lt;br /&gt;
--[[User:Tim Hunt|Tim Hunt]] 05:34, 9 June 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Some comments from Ray ==&lt;br /&gt;
&lt;br /&gt;
* References to &amp;quot;Directory&amp;quot;. This is terminology that most teachers, trainers etc. are not familiar with. A good time to standardise on the term &amp;quot;folder&amp;quot;. MDL-11841&lt;br /&gt;
&lt;br /&gt;
* Perhaps update spec table from &amp;quot;Links to external files in repositories (ie Hive)&amp;quot; to &amp;quot;Links to external files in repositories (e.g. Hive) &amp;quot;.&lt;br /&gt;
&lt;br /&gt;
-- Ray Lawrence 15/6/09&lt;br /&gt;
&lt;br /&gt;
== Jmol Resource: Comment from Geoff ==&lt;br /&gt;
&lt;br /&gt;
I think the Jmol Resource Type should also become a Resource Module (Not Filter, as suggested in the Development Docs)&lt;br /&gt;
&lt;br /&gt;
A separate Jmol filter already exists and does a different (simpler) job to the Resource Type. Latest versions of the Resource Type have a sophisticated configuration interface so that teachers can (relatively) easily build Jmol-based resources with different display options, controls and textual context. This would be (is) cumbersome to do through a Filter.&lt;br /&gt;
&lt;br /&gt;
At their simplest, Jmol resources are Web pages so could be considered a specialised HTML Page Resource Module&lt;br /&gt;
At their most complex, Jmol resources are akin to IMS packages. Indeed, I have built Jmol into IMS packages using RELOAD. However, again it is much more cumbersome than using the Jmol Resource type configuration interface. That said, I do fully appreciate the portability of IMS packages between different systems.&lt;br /&gt;
&lt;br /&gt;
Therefore I suggest the following development sequence (I&#039;ll be happy to have a go at this!)&lt;br /&gt;
&lt;br /&gt;
1. Update Jmol filter for Moodle 2.0 (Should be straightforward)&lt;br /&gt;
2. Convert the Jmol Resource Type to a Jmol Resource Module (The current Jmol Resource type was modelled on, amongst others, the HTML and Text Page Resource Types)&lt;br /&gt;
3. Consider &#039;converging&#039; the Jmol Resource Module with the IMS Resource Module. i.e. making the the Jmol Resource Module a specialised form of IMS package. The aim would be to retain the resource-building interface, but allow import-export with other systems.&lt;/div&gt;</summary>
		<author><name>Geoffr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Talk:Repository_API&amp;diff=27302</id>
		<title>Talk:Repository API</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Talk:Repository_API&amp;diff=27302"/>
		<updated>2008-08-07T00:13:44Z</updated>

		<summary type="html">&lt;p&gt;Geoffr: /* Windows network drives */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Ideas will be deleted from the comments section as they are resolved or merged into the main spec)&lt;br /&gt;
&lt;br /&gt;
===Missing concept of trusted files===&lt;br /&gt;
Files are not created equal, some of them are to be trusted, some can not be trusted at all. Web browsers trust everything received from the server, files from server may access cookie information and thus scripting technologies may allow them to do anything user can do. We do have to trust our teachers because they are supposed to create the learning content, but we definitely can not trust all students.&lt;br /&gt;
&lt;br /&gt;
Imagine if students were allowed to upload arbitrary files to server, like html file loaded with javascript and the server would happily serve them to all Moodle users. Our solution is to use html cleaning filters for submitted texts and force downloads of student uploaded files. To do this we must know if we trust the files or not. Unfortunately the forced downloads of student uploaded files and cleaning of html texts does not solve all problems, because bugs in browsers and especially browser plug-ins may sometimes be used to work around our protections.&lt;br /&gt;
&lt;br /&gt;
The best solution would be to use separate web addresses for trusted and not trusted files (two wwwroots in config.php), not all sites may afford two different addresses but we should be imo prepared for this.  [[User:Skodak|Skodak]] 16:42, 28 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
 Great idea, yes.  In fact couldn&#039;t all the files be served via $CFG-&amp;gt;fileroot all the time?  &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
userid field could be used for this, but separate flag might be better in order to allow teachers to upload untrusted files (teacher uploads assignment submission for the student).&lt;br /&gt;
&lt;br /&gt;
===Relative file links===&lt;br /&gt;
Flash, Java and SCORM require relative links and directory hierarchy in general - we must support it. Some SCORM packages load hundreds of files per page which means the file serving must be very fast with minimum of db access.&lt;br /&gt;
&lt;br /&gt;
Reading the proposal above it seems the API is about serving of isolated files referenced by repository ids. HTML requires to use relative or absolute locators with file names, we can not use repository ids directly in relative links. In case of scorm we have absolute path to base of SCORM package of given activity and SCORM files use relative links inside the package.&lt;br /&gt;
Solution could be to store relative paths directly in filename field ex:directory1/directory2/filename.ext.&lt;br /&gt;
&lt;br /&gt;
 Yes I agree, we definitely need to support (virtual) directories and slasharguments.&lt;br /&gt;
 We could just match the file argument to a path in the db.  Perhaps add the fileid &lt;br /&gt;
 to the argument path as a primary key: fileid/directory1/directory2/filename.ext&lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
===Virtual directories and files===&lt;br /&gt;
Sometimes the content of files is generated on the fly (csv exports, etc.), there are many special files spread through codebase doing nearly the same, it should be imho possible to use the same file API for these.&lt;br /&gt;
&lt;br /&gt;
Another virtual example is assignment submissions and webdav. I would like to see an option to browse the assignment submissions as directory structure, the top directory would be a list of names of users, inside html files with online assignment and uploaded files. This would allow us to implement simple zip&amp;amp;go or webdav based offline grading solutions. The problem here is that the content of this virtual submissions directly needs to be created on the fly based on user references, the proposed repository structure can not be used for this.&lt;br /&gt;
&lt;br /&gt;
 Very interesting idea! [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
===Backup/restore relinking===&lt;br /&gt;
We are supporting relinking inside courses only. Till now it was easy to guess if absolute link will work after restore on another server.&lt;br /&gt;
There are several types of files:&lt;br /&gt;
*course files - relinked during restore, works on any server if from the same course&lt;br /&gt;
*module files - not relinked, urls are not permanent, link can not be copypasted (assignments, forum attachments, rss files, etc.)&lt;br /&gt;
*user files - not relinked, links work only on original server (blog attachments, personal files, etc.)&lt;br /&gt;
&lt;br /&gt;
 I think all this will be simplified in the proposed system because everything is &lt;br /&gt;
 represented using the same system: a file with an ACL (backup can quickly &lt;br /&gt;
 determine all the files in one course, probably using one SQL query). &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
If we are backing up/restoring on the same server, will copies of a course restore without file duplication? I use this a lot so that I can archive one year&#039;s course whilst modifying it for next year. [[User:Matt Gibson|Matt Gibson]] 03:12, 29 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
===Access needed for both file and its instances===&lt;br /&gt;
We need two types of access control - first who can create instances (link files), second who can access the instance (download the file).&lt;br /&gt;
&lt;br /&gt;
 For the first don&#039;t we already have those capabilities? (like mod/forum:createattachment,&lt;br /&gt;
 moodle/course:managefiles) but they probably could use rationalising.   We&#039;ll need new &lt;br /&gt;
 ones per repository, too, of course.  &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
===Cache lifetime===&lt;br /&gt;
There should be a way to specify cache filetime for each instance of file. For example 0 for uploaded assignments, 1 day for resource file. It might be better to allow modules to decide about this, at present it is hardcoded in file.php.&lt;br /&gt;
&lt;br /&gt;
 Great idea.  [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Hierarchy in tables ? ==&lt;br /&gt;
&lt;br /&gt;
It&#039;s possible that I don&#039;t undertand a key piece of the concept, but I wonder why there is no reference to any &amp;quot;parent id&amp;quot; in the file or file_instance table ?&lt;br /&gt;
In other words, how the hierarchical structure is supposed to be &amp;quot;imported&amp;quot; from repository to Moodle ?&lt;br /&gt;
If the hierarchy is reserved to the course context, and not to the repository context, it seems difficult to allow students to access&lt;br /&gt;
to a complete directory, for example.&lt;br /&gt;
&lt;br /&gt;
On the other hand, maybe it&#039;s only a question for the &amp;quot;local&amp;quot; repository type, and not to the &amp;quot;generic&amp;quot; repository API ?&lt;br /&gt;
[[User:Allegre Guillaume|Allegre Guillaume]] 16:43, 5 March 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 12:58, 15 March 2008 (CDT): basically I was thinking we just store a full local path for each file instead of hierarchies.  It wasn&#039;t in the db schema though: I&#039;ve just added it.  Thanks!&lt;br /&gt;
&lt;br /&gt;
As for allowing access to a whole directory, that&#039;s something I&#039;ve not thought about - thanks!  I agree we need to support something like that in the interface.  Hmm ..&lt;br /&gt;
&lt;br /&gt;
== Editing Repository Files / Version Control ? ==&lt;br /&gt;
&lt;br /&gt;
How do you imagine to handle the &amp;quot;editing file&amp;quot; problem ? &lt;br /&gt;
I can see several solutions :&lt;br /&gt;
# the simplest way : write access to a file really allows to edit (re-upload) the file, each instance being modified&lt;br /&gt;
# the &amp;quot;cheap copy&amp;quot; way : optionally, the modification is applied only to new file_instances (or those for which the teacher forces to). Here you have to handle two (then maybe more) revisions of this file.&lt;br /&gt;
This triggers the file revisions (or version control) question.&lt;br /&gt;
&lt;br /&gt;
A related question is about versionned files : &lt;br /&gt;
should it depend only upon the repository layer (for example, a plugin could implement a SVN &amp;quot;repository&amp;quot;) ?&lt;br /&gt;
Or should Moodle be aware of the file &amp;quot;revision number&amp;quot; ? &lt;br /&gt;
[[User:Allegre Guillaume|Allegre Guillaume]] 17:00, 5 March 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 13:08, 15 March 2008 (CDT):  I don&#039;t think we should start getting into such things, version and editing is the job of the dedicated external repository system and people should use that interface.  &lt;br /&gt;
&lt;br /&gt;
What we do have in Moodle is the file-&amp;gt;updates field.  This specifies when to get a fresh copy.  It would be set when the user has specified they want Moodle to use the &amp;quot;latest version&amp;quot; of the file.  And if the user specified a particular version in the repository interface then that is what gets copied (once) and the file-&amp;gt;updates field is left as zero.&lt;br /&gt;
&lt;br /&gt;
One scenario would be if someone wants to use version 1 in one course and version 2 in another, but since the version is in the URL to the original file (and thus a different remote path) they would be treated as two separate files in Moodle anyway.&lt;br /&gt;
&lt;br /&gt;
Might be a small problem if they said &amp;quot;latest version, no update&amp;quot; in course 1 and then later on said &amp;quot;latest version, no update&amp;quot; in a second course.  I guess that would re-download the latest version (which might have changed) and thus course 1 would have an unexpected update.  We could solve this by alerting the user and giving them a choice, I suppose.&lt;br /&gt;
&lt;br /&gt;
== Replacing Moodle&#039;s File System ==&lt;br /&gt;
&lt;br /&gt;
The API as specified still uses the standard Moodle file system, which has its limitations while providing a simple file access method. But, shouldn&#039;t we also be considering completely (or partially) replacing the Moodle file system with the repository system? To that end, the file interface would be the same to users, but where the files are and how they are accessed would be up to which repository was being used. In this system, the standard Moodle file system would just be one of the available repositories. Then the API could support more robust access controls if available, or very few (as Moodle does now). This could allow for per-directory / per-file privilege granting, common file areas so that courses could access the same copy of a file (rather than copying it into the Moodle file area), etc.&lt;br /&gt;
&lt;br /&gt;
The API could also support multiple repositories and allow choosing a file as a link rather than copying it.&lt;br /&gt;
&lt;br /&gt;
Of course, this would also mean allowing write access to the repository area from Moodle, rather than leaving it as read-only. I know the plan was to do this through the [[Portfolio API]], but that really is limited to a user storage function and not a file management function. I think having an API defined to allow for full file management would be a better solution - even if not supported by all repositories.&lt;br /&gt;
[[User:Mike Churchward|Mike Churchward]] 12:54, 6 March 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 12:54, 15 March 2008 (CDT) :&lt;br /&gt;
Actually, Mike, the standard file system is NOT being retained at all.  I&#039;ve clarified this slightly in the docs.  The course-centered structure for files is gone.  All files ARE stored on disk but most of the info regarding their location and access is all governed by a table in the database (so the files could just as easily be in a remote database if you wished).  Files used in multiple areas within Moodle will never be stored more than once in Moodle.&lt;br /&gt;
&lt;br /&gt;
The idea of a read/write interface was how we started, but it&#039;s insanely complex once you try to handle backups (ie how do you make a complete backup suitable for giving to someone else?) and access control (how do you decide access depending on Moodle contexts), and we&#039;ll never do it as well as the original repository does it.  Why should we duplicate the Hive interface (to use an example) in Moodle when Hive has a perfectly good one already, one that handles all the extra stuff like Copyright controls, workflow and so on?   &lt;br /&gt;
&lt;br /&gt;
That said, the current Repository plugin idea is very simple, so that if anyone really wanted to embed management into the &amp;quot;file picker&amp;quot; interface they totally could do it in the plugin.&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
==Windows network drives==&lt;br /&gt;
I&#039;ve added this to the end of the list of repository types to be supported because its possibly the most useful one I can think of. Our school wants to make the transition to moodle, but getting the files on there is the biggest barrier and there is a lot of stuff sitting on our shared and personal folders which is time consuming to transfer. Integration is a big thing that management want to see, particularly the ability to bulk upload files. This may not be a repository as such because it may be that the best way is to copy the file from the shared folder into the repository rather than where it is so it can be moved/deleted accidentally, but easy access is vital in making the process of uploading a file possible. It would also make Moodle a killer app in that it could make our network drives available from home through a secure web interface. &lt;br /&gt;
&lt;br /&gt;
I&#039;ve linked to Guy Thomas&#039; [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=991 Windows Share Web Client block] as it is a good start, but sadly only works on Linux. [[User:Matt Gibson|Matt Gibson]] 03:43, 29 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Fantastic idea, let&#039;s call it the SMB plugin  - [[User:Martin Dougiamas|Martin Dougiamas]] 21:25, 8 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
Glad you like it :) Hope it works on Windows servers! [[User:Matt Gibson|Matt Gibson]] 03:11, 25 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I would like to add my enthusiastic support for this proposal. The recent update to the [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=991 Windows Share Web Client block] to allow specific network shares (non home dir) to be accessed from specific Moodle courses &#039;&#039;almost&#039;&#039; has the required functionality (see the bundled README.TXT file for more details). Just need to replace the download of a resource from network share then upload to Moode with a direct transfer to the Moodle course file folder (similar to the way the DOOR resource integration works).&lt;br /&gt;
&lt;br /&gt;
As Matt outlines, this has the huge advantage that many institutions are already using this kind of setup on their intranets and it is familiar to teachers. By leveraging existing systems and introducing users to the benefits of repositories, this may also be the first step towards more sophisticated Repository/Document Management Systems, such as [http://www.alfresco.com/ Alfresco], with searching, version control, automatic file transformations (e.g. PowerPoint to Flash). &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;SMB plugin&#039;&#039;&#039; certainly has my vote. --[[User:Geoffrey Rowland|Geoffrey Rowland]] 19:03, 6 August 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Bulk operations==&lt;br /&gt;
On a similar note, Don Hinkelman&#039;s new course format provides a great bulk-upload feature whereby a whole folder can be uploaded and added to the course as resources with the names of the files as titles, with just a couple of clicks. I know this is extending the repository idea a little, but to be honest, I think that one of the biggest weaknesses of Moodle&#039;s file handling right now is not being able to add an entire folder of files without manually going through each one and laboriously specifying location and title. To make any repository useful, I think three operations should be possible with one or two clicks:&lt;br /&gt;
* Add a whole folder/group of files to the repository at once&lt;br /&gt;
* The above operation, but additionally, have all of the folder/group added to a course and named automatically, all in one go.&lt;br /&gt;
* Find a group of files which are already in the repository and add them to a course all at once, with automatic naming as above.&lt;br /&gt;
Not sure if this is best put here or in the Developemt: File_API bit, but here seemed slightly better. [[User:Matt Gibson|Matt Gibson]] 03:43, 29 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
  This is probably not related to the file API at all.  I&#039;d see it as being a new item on &lt;br /&gt;
 the resource menu (Add multiple resources ...) with some sort of shift-click scenario.  &lt;br /&gt;
 nice idea though.  Can you file it as a tracker item?    &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 21:26, 8 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
See MDL-15408 [[User:Matt Gibson|Matt Gibson]] 03:09, 25 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== Bulk and a new resource type from repository ==&lt;br /&gt;
&lt;br /&gt;
Our school has several campuses and a distance learning unit with well organized and big course resource trees. The repository module could be enormously useful for us.&lt;br /&gt;
&lt;br /&gt;
I have looked at Moodle&#039;s IMS repository a bit, and like the way it is possible to put multiple resources into one access point. If the new repository could have some of the same possibilities, it would be marvellous. The drawback with the IMS is that it opens a new window with all the multiple resources. Instead, it would be OK to be able to share a whole lot of resources, or a whole &amp;quot;resource tree&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
I also like the bulk function, to be able to parse a folder of say, html-files, and add it to the resource tree.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;local repository name&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
I think users will find the word local to be confusing.  For the developer or administrator, local seems to refer to the Moodle server.  But for the teacher or student, they will think that local refers to their own local files system.  I would suggest just using the domain name for that server (like myMoodleSite.org) and list it as the first entry to avoid this confusion.  [[User:Gary Anderson|Gary Anderson]] 02:40, 10 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
 I&#039;ll add a setting so the admin can override this as they like  [[User:Martin Dougiamas|Martin Dougiamas]] 01:07, 23  June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== Credentials to third party systems ==&lt;br /&gt;
&lt;br /&gt;
You might want to consider something like oauth - http://oauth.net - to manage credentials of third party sites, rather than asking the user for them. I know I sure wouldn&#039;t want to input my credentials for one system into another! [[User:Nigel McNie|Nigel McNie]] 07:08, 17 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
 It&#039;s up to the plugin, but generally we won&#039;t be storing anything permanently.  Oauth could be useful though, thanks  [[User:Martin Dougiamas|Martin Dougiamas]] 01:09, 23  June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== function is_logged() ==&lt;br /&gt;
&lt;br /&gt;
I created a prototype of file picker, the repository I tested is box.net, in this cast, we need a function to check if users are authenticated by box.net, if this function return false, print_login function will be called, it print a link to redirect to box.net login page, after the user logged in, box.net will redirect to file picker page, the authenticated user obtain a auth_token_key to access resource.&lt;br /&gt;
&lt;br /&gt;
The other web service like google docs and facebook have similar authentication process. &lt;br /&gt;
&lt;br /&gt;
See: http://enabled.box.net/docs/rest#authentication&lt;br /&gt;
&lt;br /&gt;
-- [[User:Dongsheng Cai|Dongsheng Cai]] 01:34, 22 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== ws.php ==&lt;br /&gt;
Another problem is users have to wait for page loading (file picker page) until moodle have got the response from remote web service (limited by cURL&#039;s synchronous requests), this may take a long time or the remote web service won&#039;t reply at all, users may consider something goes wrong, then they may refresh the file picker. &lt;br /&gt;
&lt;br /&gt;
Maybe we should have another page: repository/ws.php, which in charge of communicating with web services, it can be embedded in file picker page as iframe, or we can use Ajax to invoke this page, the main page -- repository/picker.php will display a loading picture or a progress bar during communicating, this is more user friendly.&lt;br /&gt;
&lt;br /&gt;
For example, when users try to obtain a file list in box.net, a iframe of ws.php?action=get_list will be inserted in picker, $repository_box-&amp;gt;get_listing(&#039;/&#039;) will be invoked in ws.php, a loading picture will be displayed in picker page, when remote web service returned, the picker page remove the loading picture, and display the result. Does this sound reasonable?&lt;br /&gt;
&lt;br /&gt;
-- [[User:Dongsheng Cai|Dongsheng Cai]] 01:34, 22 June 2008 (CDT)&lt;/div&gt;</summary>
		<author><name>Geoffr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Talk:Repository_API&amp;diff=27301</id>
		<title>Talk:Repository API</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Talk:Repository_API&amp;diff=27301"/>
		<updated>2008-08-07T00:03:35Z</updated>

		<summary type="html">&lt;p&gt;Geoffr: /* Windows network drives */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Ideas will be deleted from the comments section as they are resolved or merged into the main spec)&lt;br /&gt;
&lt;br /&gt;
===Missing concept of trusted files===&lt;br /&gt;
Files are not created equal, some of them are to be trusted, some can not be trusted at all. Web browsers trust everything received from the server, files from server may access cookie information and thus scripting technologies may allow them to do anything user can do. We do have to trust our teachers because they are supposed to create the learning content, but we definitely can not trust all students.&lt;br /&gt;
&lt;br /&gt;
Imagine if students were allowed to upload arbitrary files to server, like html file loaded with javascript and the server would happily serve them to all Moodle users. Our solution is to use html cleaning filters for submitted texts and force downloads of student uploaded files. To do this we must know if we trust the files or not. Unfortunately the forced downloads of student uploaded files and cleaning of html texts does not solve all problems, because bugs in browsers and especially browser plug-ins may sometimes be used to work around our protections.&lt;br /&gt;
&lt;br /&gt;
The best solution would be to use separate web addresses for trusted and not trusted files (two wwwroots in config.php), not all sites may afford two different addresses but we should be imo prepared for this.  [[User:Skodak|Skodak]] 16:42, 28 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
 Great idea, yes.  In fact couldn&#039;t all the files be served via $CFG-&amp;gt;fileroot all the time?  &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
userid field could be used for this, but separate flag might be better in order to allow teachers to upload untrusted files (teacher uploads assignment submission for the student).&lt;br /&gt;
&lt;br /&gt;
===Relative file links===&lt;br /&gt;
Flash, Java and SCORM require relative links and directory hierarchy in general - we must support it. Some SCORM packages load hundreds of files per page which means the file serving must be very fast with minimum of db access.&lt;br /&gt;
&lt;br /&gt;
Reading the proposal above it seems the API is about serving of isolated files referenced by repository ids. HTML requires to use relative or absolute locators with file names, we can not use repository ids directly in relative links. In case of scorm we have absolute path to base of SCORM package of given activity and SCORM files use relative links inside the package.&lt;br /&gt;
Solution could be to store relative paths directly in filename field ex:directory1/directory2/filename.ext.&lt;br /&gt;
&lt;br /&gt;
 Yes I agree, we definitely need to support (virtual) directories and slasharguments.&lt;br /&gt;
 We could just match the file argument to a path in the db.  Perhaps add the fileid &lt;br /&gt;
 to the argument path as a primary key: fileid/directory1/directory2/filename.ext&lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
===Virtual directories and files===&lt;br /&gt;
Sometimes the content of files is generated on the fly (csv exports, etc.), there are many special files spread through codebase doing nearly the same, it should be imho possible to use the same file API for these.&lt;br /&gt;
&lt;br /&gt;
Another virtual example is assignment submissions and webdav. I would like to see an option to browse the assignment submissions as directory structure, the top directory would be a list of names of users, inside html files with online assignment and uploaded files. This would allow us to implement simple zip&amp;amp;go or webdav based offline grading solutions. The problem here is that the content of this virtual submissions directly needs to be created on the fly based on user references, the proposed repository structure can not be used for this.&lt;br /&gt;
&lt;br /&gt;
 Very interesting idea! [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
===Backup/restore relinking===&lt;br /&gt;
We are supporting relinking inside courses only. Till now it was easy to guess if absolute link will work after restore on another server.&lt;br /&gt;
There are several types of files:&lt;br /&gt;
*course files - relinked during restore, works on any server if from the same course&lt;br /&gt;
*module files - not relinked, urls are not permanent, link can not be copypasted (assignments, forum attachments, rss files, etc.)&lt;br /&gt;
*user files - not relinked, links work only on original server (blog attachments, personal files, etc.)&lt;br /&gt;
&lt;br /&gt;
 I think all this will be simplified in the proposed system because everything is &lt;br /&gt;
 represented using the same system: a file with an ACL (backup can quickly &lt;br /&gt;
 determine all the files in one course, probably using one SQL query). &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
If we are backing up/restoring on the same server, will copies of a course restore without file duplication? I use this a lot so that I can archive one year&#039;s course whilst modifying it for next year. [[User:Matt Gibson|Matt Gibson]] 03:12, 29 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
===Access needed for both file and its instances===&lt;br /&gt;
We need two types of access control - first who can create instances (link files), second who can access the instance (download the file).&lt;br /&gt;
&lt;br /&gt;
 For the first don&#039;t we already have those capabilities? (like mod/forum:createattachment,&lt;br /&gt;
 moodle/course:managefiles) but they probably could use rationalising.   We&#039;ll need new &lt;br /&gt;
 ones per repository, too, of course.  &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
===Cache lifetime===&lt;br /&gt;
There should be a way to specify cache filetime for each instance of file. For example 0 for uploaded assignments, 1 day for resource file. It might be better to allow modules to decide about this, at present it is hardcoded in file.php.&lt;br /&gt;
&lt;br /&gt;
 Great idea.  [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Hierarchy in tables ? ==&lt;br /&gt;
&lt;br /&gt;
It&#039;s possible that I don&#039;t undertand a key piece of the concept, but I wonder why there is no reference to any &amp;quot;parent id&amp;quot; in the file or file_instance table ?&lt;br /&gt;
In other words, how the hierarchical structure is supposed to be &amp;quot;imported&amp;quot; from repository to Moodle ?&lt;br /&gt;
If the hierarchy is reserved to the course context, and not to the repository context, it seems difficult to allow students to access&lt;br /&gt;
to a complete directory, for example.&lt;br /&gt;
&lt;br /&gt;
On the other hand, maybe it&#039;s only a question for the &amp;quot;local&amp;quot; repository type, and not to the &amp;quot;generic&amp;quot; repository API ?&lt;br /&gt;
[[User:Allegre Guillaume|Allegre Guillaume]] 16:43, 5 March 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 12:58, 15 March 2008 (CDT): basically I was thinking we just store a full local path for each file instead of hierarchies.  It wasn&#039;t in the db schema though: I&#039;ve just added it.  Thanks!&lt;br /&gt;
&lt;br /&gt;
As for allowing access to a whole directory, that&#039;s something I&#039;ve not thought about - thanks!  I agree we need to support something like that in the interface.  Hmm ..&lt;br /&gt;
&lt;br /&gt;
== Editing Repository Files / Version Control ? ==&lt;br /&gt;
&lt;br /&gt;
How do you imagine to handle the &amp;quot;editing file&amp;quot; problem ? &lt;br /&gt;
I can see several solutions :&lt;br /&gt;
# the simplest way : write access to a file really allows to edit (re-upload) the file, each instance being modified&lt;br /&gt;
# the &amp;quot;cheap copy&amp;quot; way : optionally, the modification is applied only to new file_instances (or those for which the teacher forces to). Here you have to handle two (then maybe more) revisions of this file.&lt;br /&gt;
This triggers the file revisions (or version control) question.&lt;br /&gt;
&lt;br /&gt;
A related question is about versionned files : &lt;br /&gt;
should it depend only upon the repository layer (for example, a plugin could implement a SVN &amp;quot;repository&amp;quot;) ?&lt;br /&gt;
Or should Moodle be aware of the file &amp;quot;revision number&amp;quot; ? &lt;br /&gt;
[[User:Allegre Guillaume|Allegre Guillaume]] 17:00, 5 March 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 13:08, 15 March 2008 (CDT):  I don&#039;t think we should start getting into such things, version and editing is the job of the dedicated external repository system and people should use that interface.  &lt;br /&gt;
&lt;br /&gt;
What we do have in Moodle is the file-&amp;gt;updates field.  This specifies when to get a fresh copy.  It would be set when the user has specified they want Moodle to use the &amp;quot;latest version&amp;quot; of the file.  And if the user specified a particular version in the repository interface then that is what gets copied (once) and the file-&amp;gt;updates field is left as zero.&lt;br /&gt;
&lt;br /&gt;
One scenario would be if someone wants to use version 1 in one course and version 2 in another, but since the version is in the URL to the original file (and thus a different remote path) they would be treated as two separate files in Moodle anyway.&lt;br /&gt;
&lt;br /&gt;
Might be a small problem if they said &amp;quot;latest version, no update&amp;quot; in course 1 and then later on said &amp;quot;latest version, no update&amp;quot; in a second course.  I guess that would re-download the latest version (which might have changed) and thus course 1 would have an unexpected update.  We could solve this by alerting the user and giving them a choice, I suppose.&lt;br /&gt;
&lt;br /&gt;
== Replacing Moodle&#039;s File System ==&lt;br /&gt;
&lt;br /&gt;
The API as specified still uses the standard Moodle file system, which has its limitations while providing a simple file access method. But, shouldn&#039;t we also be considering completely (or partially) replacing the Moodle file system with the repository system? To that end, the file interface would be the same to users, but where the files are and how they are accessed would be up to which repository was being used. In this system, the standard Moodle file system would just be one of the available repositories. Then the API could support more robust access controls if available, or very few (as Moodle does now). This could allow for per-directory / per-file privilege granting, common file areas so that courses could access the same copy of a file (rather than copying it into the Moodle file area), etc.&lt;br /&gt;
&lt;br /&gt;
The API could also support multiple repositories and allow choosing a file as a link rather than copying it.&lt;br /&gt;
&lt;br /&gt;
Of course, this would also mean allowing write access to the repository area from Moodle, rather than leaving it as read-only. I know the plan was to do this through the [[Portfolio API]], but that really is limited to a user storage function and not a file management function. I think having an API defined to allow for full file management would be a better solution - even if not supported by all repositories.&lt;br /&gt;
[[User:Mike Churchward|Mike Churchward]] 12:54, 6 March 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 12:54, 15 March 2008 (CDT) :&lt;br /&gt;
Actually, Mike, the standard file system is NOT being retained at all.  I&#039;ve clarified this slightly in the docs.  The course-centered structure for files is gone.  All files ARE stored on disk but most of the info regarding their location and access is all governed by a table in the database (so the files could just as easily be in a remote database if you wished).  Files used in multiple areas within Moodle will never be stored more than once in Moodle.&lt;br /&gt;
&lt;br /&gt;
The idea of a read/write interface was how we started, but it&#039;s insanely complex once you try to handle backups (ie how do you make a complete backup suitable for giving to someone else?) and access control (how do you decide access depending on Moodle contexts), and we&#039;ll never do it as well as the original repository does it.  Why should we duplicate the Hive interface (to use an example) in Moodle when Hive has a perfectly good one already, one that handles all the extra stuff like Copyright controls, workflow and so on?   &lt;br /&gt;
&lt;br /&gt;
That said, the current Repository plugin idea is very simple, so that if anyone really wanted to embed management into the &amp;quot;file picker&amp;quot; interface they totally could do it in the plugin.&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
==Windows network drives==&lt;br /&gt;
I&#039;ve added this to the end of the list of repository types to be supported because its possibly the most useful one I can think of. Our school wants to make the transition to moodle, but getting the files on there is the biggest barrier and there is a lot of stuff sitting on our shared and personal folders which is time consuming to transfer. Integration is a big thing that management want to see, particularly the ability to bulk upload files. This may not be a repository as such because it may be that the best way is to copy the file from the shared folder into the repository rather than where it is so it can be moved/deleted accidentally, but easy access is vital in making the process of uploading a file possible. It would also make Moodle a killer app in that it could make our network drives available from home through a secure web interface. &lt;br /&gt;
&lt;br /&gt;
I&#039;ve linked to Guy Thomas&#039; [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=991 Windows Share Web Client block] as it is a good start, but sadly only works on Linux. [[User:Matt Gibson|Matt Gibson]] 03:43, 29 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Fantastic idea, let&#039;s call it the SMB plugin  - [[User:Martin Dougiamas|Martin Dougiamas]] 21:25, 8 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
Glad you like it :) Hope it works on Windows servers! [[User:Matt Gibson|Matt Gibson]] 03:11, 25 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I would like to add my enthusiastic support for this proposal. The recent update to the [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=991 Windows Share Web Client block] to allow specific network shares (non home dir) to be accessed from specific Moodle courses &#039;&#039;almost&#039;&#039; has the required functionality (see the bundled README.TXT file for more details). Just need to replace the download of a resource from network share then upload to Moode with a direct transfer to the Moodle course file folder (similar to the way the DOOR resource integration works). &lt;br /&gt;
&lt;br /&gt;
As Matt outlines, this has the huge advantage that many institutions are already using this kind of setup on their intranets and it is familiar to teachers. By leveraging existing systems and introducing users to the benefits of repositories, this may also be the first step towards more sophisticated Repository/Document Management Systems, such as [http://www.alfresco.com/ Alfresco], with searching, version control, automatic file transformations (e.g. PowerPoint to Flash). --[[User:Geoffrey Rowland|Geoffrey Rowland]] 19:03, 6 August 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Bulk operations==&lt;br /&gt;
On a similar note, Don Hinkelman&#039;s new course format provides a great bulk-upload feature whereby a whole folder can be uploaded and added to the course as resources with the names of the files as titles, with just a couple of clicks. I know this is extending the repository idea a little, but to be honest, I think that one of the biggest weaknesses of Moodle&#039;s file handling right now is not being able to add an entire folder of files without manually going through each one and laboriously specifying location and title. To make any repository useful, I think three operations should be possible with one or two clicks:&lt;br /&gt;
* Add a whole folder/group of files to the repository at once&lt;br /&gt;
* The above operation, but additionally, have all of the folder/group added to a course and named automatically, all in one go.&lt;br /&gt;
* Find a group of files which are already in the repository and add them to a course all at once, with automatic naming as above.&lt;br /&gt;
Not sure if this is best put here or in the Developemt: File_API bit, but here seemed slightly better. [[User:Matt Gibson|Matt Gibson]] 03:43, 29 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
  This is probably not related to the file API at all.  I&#039;d see it as being a new item on &lt;br /&gt;
 the resource menu (Add multiple resources ...) with some sort of shift-click scenario.  &lt;br /&gt;
 nice idea though.  Can you file it as a tracker item?    &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 21:26, 8 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
See MDL-15408 [[User:Matt Gibson|Matt Gibson]] 03:09, 25 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== Bulk and a new resource type from repository ==&lt;br /&gt;
&lt;br /&gt;
Our school has several campuses and a distance learning unit with well organized and big course resource trees. The repository module could be enormously useful for us.&lt;br /&gt;
&lt;br /&gt;
I have looked at Moodle&#039;s IMS repository a bit, and like the way it is possible to put multiple resources into one access point. If the new repository could have some of the same possibilities, it would be marvellous. The drawback with the IMS is that it opens a new window with all the multiple resources. Instead, it would be OK to be able to share a whole lot of resources, or a whole &amp;quot;resource tree&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
I also like the bulk function, to be able to parse a folder of say, html-files, and add it to the resource tree.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;local repository name&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
I think users will find the word local to be confusing.  For the developer or administrator, local seems to refer to the Moodle server.  But for the teacher or student, they will think that local refers to their own local files system.  I would suggest just using the domain name for that server (like myMoodleSite.org) and list it as the first entry to avoid this confusion.  [[User:Gary Anderson|Gary Anderson]] 02:40, 10 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
 I&#039;ll add a setting so the admin can override this as they like  [[User:Martin Dougiamas|Martin Dougiamas]] 01:07, 23  June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== Credentials to third party systems ==&lt;br /&gt;
&lt;br /&gt;
You might want to consider something like oauth - http://oauth.net - to manage credentials of third party sites, rather than asking the user for them. I know I sure wouldn&#039;t want to input my credentials for one system into another! [[User:Nigel McNie|Nigel McNie]] 07:08, 17 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
 It&#039;s up to the plugin, but generally we won&#039;t be storing anything permanently.  Oauth could be useful though, thanks  [[User:Martin Dougiamas|Martin Dougiamas]] 01:09, 23  June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== function is_logged() ==&lt;br /&gt;
&lt;br /&gt;
I created a prototype of file picker, the repository I tested is box.net, in this cast, we need a function to check if users are authenticated by box.net, if this function return false, print_login function will be called, it print a link to redirect to box.net login page, after the user logged in, box.net will redirect to file picker page, the authenticated user obtain a auth_token_key to access resource.&lt;br /&gt;
&lt;br /&gt;
The other web service like google docs and facebook have similar authentication process. &lt;br /&gt;
&lt;br /&gt;
See: http://enabled.box.net/docs/rest#authentication&lt;br /&gt;
&lt;br /&gt;
-- [[User:Dongsheng Cai|Dongsheng Cai]] 01:34, 22 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== ws.php ==&lt;br /&gt;
Another problem is users have to wait for page loading (file picker page) until moodle have got the response from remote web service (limited by cURL&#039;s synchronous requests), this may take a long time or the remote web service won&#039;t reply at all, users may consider something goes wrong, then they may refresh the file picker. &lt;br /&gt;
&lt;br /&gt;
Maybe we should have another page: repository/ws.php, which in charge of communicating with web services, it can be embedded in file picker page as iframe, or we can use Ajax to invoke this page, the main page -- repository/picker.php will display a loading picture or a progress bar during communicating, this is more user friendly.&lt;br /&gt;
&lt;br /&gt;
For example, when users try to obtain a file list in box.net, a iframe of ws.php?action=get_list will be inserted in picker, $repository_box-&amp;gt;get_listing(&#039;/&#039;) will be invoked in ws.php, a loading picture will be displayed in picker page, when remote web service returned, the picker page remove the loading picture, and display the result. Does this sound reasonable?&lt;br /&gt;
&lt;br /&gt;
-- [[User:Dongsheng Cai|Dongsheng Cai]] 01:34, 22 June 2008 (CDT)&lt;/div&gt;</summary>
		<author><name>Geoffr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Talk:Repository_API&amp;diff=27300</id>
		<title>Talk:Repository API</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Talk:Repository_API&amp;diff=27300"/>
		<updated>2008-08-07T00:00:09Z</updated>

		<summary type="html">&lt;p&gt;Geoffr: /* Windows network drives */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Ideas will be deleted from the comments section as they are resolved or merged into the main spec)&lt;br /&gt;
&lt;br /&gt;
===Missing concept of trusted files===&lt;br /&gt;
Files are not created equal, some of them are to be trusted, some can not be trusted at all. Web browsers trust everything received from the server, files from server may access cookie information and thus scripting technologies may allow them to do anything user can do. We do have to trust our teachers because they are supposed to create the learning content, but we definitely can not trust all students.&lt;br /&gt;
&lt;br /&gt;
Imagine if students were allowed to upload arbitrary files to server, like html file loaded with javascript and the server would happily serve them to all Moodle users. Our solution is to use html cleaning filters for submitted texts and force downloads of student uploaded files. To do this we must know if we trust the files or not. Unfortunately the forced downloads of student uploaded files and cleaning of html texts does not solve all problems, because bugs in browsers and especially browser plug-ins may sometimes be used to work around our protections.&lt;br /&gt;
&lt;br /&gt;
The best solution would be to use separate web addresses for trusted and not trusted files (two wwwroots in config.php), not all sites may afford two different addresses but we should be imo prepared for this.  [[User:Skodak|Skodak]] 16:42, 28 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
 Great idea, yes.  In fact couldn&#039;t all the files be served via $CFG-&amp;gt;fileroot all the time?  &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
userid field could be used for this, but separate flag might be better in order to allow teachers to upload untrusted files (teacher uploads assignment submission for the student).&lt;br /&gt;
&lt;br /&gt;
===Relative file links===&lt;br /&gt;
Flash, Java and SCORM require relative links and directory hierarchy in general - we must support it. Some SCORM packages load hundreds of files per page which means the file serving must be very fast with minimum of db access.&lt;br /&gt;
&lt;br /&gt;
Reading the proposal above it seems the API is about serving of isolated files referenced by repository ids. HTML requires to use relative or absolute locators with file names, we can not use repository ids directly in relative links. In case of scorm we have absolute path to base of SCORM package of given activity and SCORM files use relative links inside the package.&lt;br /&gt;
Solution could be to store relative paths directly in filename field ex:directory1/directory2/filename.ext.&lt;br /&gt;
&lt;br /&gt;
 Yes I agree, we definitely need to support (virtual) directories and slasharguments.&lt;br /&gt;
 We could just match the file argument to a path in the db.  Perhaps add the fileid &lt;br /&gt;
 to the argument path as a primary key: fileid/directory1/directory2/filename.ext&lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
===Virtual directories and files===&lt;br /&gt;
Sometimes the content of files is generated on the fly (csv exports, etc.), there are many special files spread through codebase doing nearly the same, it should be imho possible to use the same file API for these.&lt;br /&gt;
&lt;br /&gt;
Another virtual example is assignment submissions and webdav. I would like to see an option to browse the assignment submissions as directory structure, the top directory would be a list of names of users, inside html files with online assignment and uploaded files. This would allow us to implement simple zip&amp;amp;go or webdav based offline grading solutions. The problem here is that the content of this virtual submissions directly needs to be created on the fly based on user references, the proposed repository structure can not be used for this.&lt;br /&gt;
&lt;br /&gt;
 Very interesting idea! [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
===Backup/restore relinking===&lt;br /&gt;
We are supporting relinking inside courses only. Till now it was easy to guess if absolute link will work after restore on another server.&lt;br /&gt;
There are several types of files:&lt;br /&gt;
*course files - relinked during restore, works on any server if from the same course&lt;br /&gt;
*module files - not relinked, urls are not permanent, link can not be copypasted (assignments, forum attachments, rss files, etc.)&lt;br /&gt;
*user files - not relinked, links work only on original server (blog attachments, personal files, etc.)&lt;br /&gt;
&lt;br /&gt;
 I think all this will be simplified in the proposed system because everything is &lt;br /&gt;
 represented using the same system: a file with an ACL (backup can quickly &lt;br /&gt;
 determine all the files in one course, probably using one SQL query). &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
If we are backing up/restoring on the same server, will copies of a course restore without file duplication? I use this a lot so that I can archive one year&#039;s course whilst modifying it for next year. [[User:Matt Gibson|Matt Gibson]] 03:12, 29 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
===Access needed for both file and its instances===&lt;br /&gt;
We need two types of access control - first who can create instances (link files), second who can access the instance (download the file).&lt;br /&gt;
&lt;br /&gt;
 For the first don&#039;t we already have those capabilities? (like mod/forum:createattachment,&lt;br /&gt;
 moodle/course:managefiles) but they probably could use rationalising.   We&#039;ll need new &lt;br /&gt;
 ones per repository, too, of course.  &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
===Cache lifetime===&lt;br /&gt;
There should be a way to specify cache filetime for each instance of file. For example 0 for uploaded assignments, 1 day for resource file. It might be better to allow modules to decide about this, at present it is hardcoded in file.php.&lt;br /&gt;
&lt;br /&gt;
 Great idea.  [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Hierarchy in tables ? ==&lt;br /&gt;
&lt;br /&gt;
It&#039;s possible that I don&#039;t undertand a key piece of the concept, but I wonder why there is no reference to any &amp;quot;parent id&amp;quot; in the file or file_instance table ?&lt;br /&gt;
In other words, how the hierarchical structure is supposed to be &amp;quot;imported&amp;quot; from repository to Moodle ?&lt;br /&gt;
If the hierarchy is reserved to the course context, and not to the repository context, it seems difficult to allow students to access&lt;br /&gt;
to a complete directory, for example.&lt;br /&gt;
&lt;br /&gt;
On the other hand, maybe it&#039;s only a question for the &amp;quot;local&amp;quot; repository type, and not to the &amp;quot;generic&amp;quot; repository API ?&lt;br /&gt;
[[User:Allegre Guillaume|Allegre Guillaume]] 16:43, 5 March 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 12:58, 15 March 2008 (CDT): basically I was thinking we just store a full local path for each file instead of hierarchies.  It wasn&#039;t in the db schema though: I&#039;ve just added it.  Thanks!&lt;br /&gt;
&lt;br /&gt;
As for allowing access to a whole directory, that&#039;s something I&#039;ve not thought about - thanks!  I agree we need to support something like that in the interface.  Hmm ..&lt;br /&gt;
&lt;br /&gt;
== Editing Repository Files / Version Control ? ==&lt;br /&gt;
&lt;br /&gt;
How do you imagine to handle the &amp;quot;editing file&amp;quot; problem ? &lt;br /&gt;
I can see several solutions :&lt;br /&gt;
# the simplest way : write access to a file really allows to edit (re-upload) the file, each instance being modified&lt;br /&gt;
# the &amp;quot;cheap copy&amp;quot; way : optionally, the modification is applied only to new file_instances (or those for which the teacher forces to). Here you have to handle two (then maybe more) revisions of this file.&lt;br /&gt;
This triggers the file revisions (or version control) question.&lt;br /&gt;
&lt;br /&gt;
A related question is about versionned files : &lt;br /&gt;
should it depend only upon the repository layer (for example, a plugin could implement a SVN &amp;quot;repository&amp;quot;) ?&lt;br /&gt;
Or should Moodle be aware of the file &amp;quot;revision number&amp;quot; ? &lt;br /&gt;
[[User:Allegre Guillaume|Allegre Guillaume]] 17:00, 5 March 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 13:08, 15 March 2008 (CDT):  I don&#039;t think we should start getting into such things, version and editing is the job of the dedicated external repository system and people should use that interface.  &lt;br /&gt;
&lt;br /&gt;
What we do have in Moodle is the file-&amp;gt;updates field.  This specifies when to get a fresh copy.  It would be set when the user has specified they want Moodle to use the &amp;quot;latest version&amp;quot; of the file.  And if the user specified a particular version in the repository interface then that is what gets copied (once) and the file-&amp;gt;updates field is left as zero.&lt;br /&gt;
&lt;br /&gt;
One scenario would be if someone wants to use version 1 in one course and version 2 in another, but since the version is in the URL to the original file (and thus a different remote path) they would be treated as two separate files in Moodle anyway.&lt;br /&gt;
&lt;br /&gt;
Might be a small problem if they said &amp;quot;latest version, no update&amp;quot; in course 1 and then later on said &amp;quot;latest version, no update&amp;quot; in a second course.  I guess that would re-download the latest version (which might have changed) and thus course 1 would have an unexpected update.  We could solve this by alerting the user and giving them a choice, I suppose.&lt;br /&gt;
&lt;br /&gt;
== Replacing Moodle&#039;s File System ==&lt;br /&gt;
&lt;br /&gt;
The API as specified still uses the standard Moodle file system, which has its limitations while providing a simple file access method. But, shouldn&#039;t we also be considering completely (or partially) replacing the Moodle file system with the repository system? To that end, the file interface would be the same to users, but where the files are and how they are accessed would be up to which repository was being used. In this system, the standard Moodle file system would just be one of the available repositories. Then the API could support more robust access controls if available, or very few (as Moodle does now). This could allow for per-directory / per-file privilege granting, common file areas so that courses could access the same copy of a file (rather than copying it into the Moodle file area), etc.&lt;br /&gt;
&lt;br /&gt;
The API could also support multiple repositories and allow choosing a file as a link rather than copying it.&lt;br /&gt;
&lt;br /&gt;
Of course, this would also mean allowing write access to the repository area from Moodle, rather than leaving it as read-only. I know the plan was to do this through the [[Portfolio API]], but that really is limited to a user storage function and not a file management function. I think having an API defined to allow for full file management would be a better solution - even if not supported by all repositories.&lt;br /&gt;
[[User:Mike Churchward|Mike Churchward]] 12:54, 6 March 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 12:54, 15 March 2008 (CDT) :&lt;br /&gt;
Actually, Mike, the standard file system is NOT being retained at all.  I&#039;ve clarified this slightly in the docs.  The course-centered structure for files is gone.  All files ARE stored on disk but most of the info regarding their location and access is all governed by a table in the database (so the files could just as easily be in a remote database if you wished).  Files used in multiple areas within Moodle will never be stored more than once in Moodle.&lt;br /&gt;
&lt;br /&gt;
The idea of a read/write interface was how we started, but it&#039;s insanely complex once you try to handle backups (ie how do you make a complete backup suitable for giving to someone else?) and access control (how do you decide access depending on Moodle contexts), and we&#039;ll never do it as well as the original repository does it.  Why should we duplicate the Hive interface (to use an example) in Moodle when Hive has a perfectly good one already, one that handles all the extra stuff like Copyright controls, workflow and so on?   &lt;br /&gt;
&lt;br /&gt;
That said, the current Repository plugin idea is very simple, so that if anyone really wanted to embed management into the &amp;quot;file picker&amp;quot; interface they totally could do it in the plugin.&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
==Windows network drives==&lt;br /&gt;
I&#039;ve added this to the end of the list of repository types to be supported because its possibly the most useful one I can think of. Our school wants to make the transition to moodle, but getting the files on there is the biggest barrier and there is a lot of stuff sitting on our shared and personal folders which is time consuming to transfer. Integration is a big thing that management want to see, particularly the ability to bulk upload files. This may not be a repository as such because it may be that the best way is to copy the file from the shared folder into the repository rather than where it is so it can be moved/deleted accidentally, but easy access is vital in making the process of uploading a file possible. It would also make Moodle a killer app in that it could make our network drives available from home through a secure web interface. &lt;br /&gt;
&lt;br /&gt;
I&#039;ve linked to Guy Thomas&#039; [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=991 Windows Share Web Client block] as it is a good start, but sadly only works on Linux. [[User:Matt Gibson|Matt Gibson]] 03:43, 29 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Fantastic idea, let&#039;s call it the SMB plugin  - [[User:Martin Dougiamas|Martin Dougiamas]] 21:25, 8 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
Glad you like it :) Hope it works on Windows servers! [[User:Matt Gibson|Matt Gibson]] 03:11, 25 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I would like to add my enthusiastic support for this proposal. The recent update to the [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=991 Windows Share Web Client block] to allow specific network shares (non home dir) to be accessed from specific Moodle courses &#039;&#039;almost&#039;&#039; has the required functionality (see the bundled README.TXT file for more details). Just need to replace the download of a resource from network share then upload to Moode with a direct transfer to the Moodle course file folder (similar to the way the DOOR resource integration works). &lt;br /&gt;
&lt;br /&gt;
As Matt outlines, this has the huge advantage that many institutions are already using this kind of setup on their intranets and it is familiar to teachers. By leveraging existing systems and introducing users to the benefits of repositories, this may also be the first step towards more sophisticated Repository/Document Management Systems, such as [http://www.alfresco.com/ Alfresco], with searching, version control, automatic file transformations (e.g. PowerPoint to Flash).&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Bulk operations==&lt;br /&gt;
On a similar note, Don Hinkelman&#039;s new course format provides a great bulk-upload feature whereby a whole folder can be uploaded and added to the course as resources with the names of the files as titles, with just a couple of clicks. I know this is extending the repository idea a little, but to be honest, I think that one of the biggest weaknesses of Moodle&#039;s file handling right now is not being able to add an entire folder of files without manually going through each one and laboriously specifying location and title. To make any repository useful, I think three operations should be possible with one or two clicks:&lt;br /&gt;
* Add a whole folder/group of files to the repository at once&lt;br /&gt;
* The above operation, but additionally, have all of the folder/group added to a course and named automatically, all in one go.&lt;br /&gt;
* Find a group of files which are already in the repository and add them to a course all at once, with automatic naming as above.&lt;br /&gt;
Not sure if this is best put here or in the Developemt: File_API bit, but here seemed slightly better. [[User:Matt Gibson|Matt Gibson]] 03:43, 29 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
  This is probably not related to the file API at all.  I&#039;d see it as being a new item on &lt;br /&gt;
 the resource menu (Add multiple resources ...) with some sort of shift-click scenario.  &lt;br /&gt;
 nice idea though.  Can you file it as a tracker item?    &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 21:26, 8 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
See MDL-15408 [[User:Matt Gibson|Matt Gibson]] 03:09, 25 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== Bulk and a new resource type from repository ==&lt;br /&gt;
&lt;br /&gt;
Our school has several campuses and a distance learning unit with well organized and big course resource trees. The repository module could be enormously useful for us.&lt;br /&gt;
&lt;br /&gt;
I have looked at Moodle&#039;s IMS repository a bit, and like the way it is possible to put multiple resources into one access point. If the new repository could have some of the same possibilities, it would be marvellous. The drawback with the IMS is that it opens a new window with all the multiple resources. Instead, it would be OK to be able to share a whole lot of resources, or a whole &amp;quot;resource tree&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
I also like the bulk function, to be able to parse a folder of say, html-files, and add it to the resource tree.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;local repository name&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
I think users will find the word local to be confusing.  For the developer or administrator, local seems to refer to the Moodle server.  But for the teacher or student, they will think that local refers to their own local files system.  I would suggest just using the domain name for that server (like myMoodleSite.org) and list it as the first entry to avoid this confusion.  [[User:Gary Anderson|Gary Anderson]] 02:40, 10 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
 I&#039;ll add a setting so the admin can override this as they like  [[User:Martin Dougiamas|Martin Dougiamas]] 01:07, 23  June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== Credentials to third party systems ==&lt;br /&gt;
&lt;br /&gt;
You might want to consider something like oauth - http://oauth.net - to manage credentials of third party sites, rather than asking the user for them. I know I sure wouldn&#039;t want to input my credentials for one system into another! [[User:Nigel McNie|Nigel McNie]] 07:08, 17 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
 It&#039;s up to the plugin, but generally we won&#039;t be storing anything permanently.  Oauth could be useful though, thanks  [[User:Martin Dougiamas|Martin Dougiamas]] 01:09, 23  June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== function is_logged() ==&lt;br /&gt;
&lt;br /&gt;
I created a prototype of file picker, the repository I tested is box.net, in this cast, we need a function to check if users are authenticated by box.net, if this function return false, print_login function will be called, it print a link to redirect to box.net login page, after the user logged in, box.net will redirect to file picker page, the authenticated user obtain a auth_token_key to access resource.&lt;br /&gt;
&lt;br /&gt;
The other web service like google docs and facebook have similar authentication process. &lt;br /&gt;
&lt;br /&gt;
See: http://enabled.box.net/docs/rest#authentication&lt;br /&gt;
&lt;br /&gt;
-- [[User:Dongsheng Cai|Dongsheng Cai]] 01:34, 22 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== ws.php ==&lt;br /&gt;
Another problem is users have to wait for page loading (file picker page) until moodle have got the response from remote web service (limited by cURL&#039;s synchronous requests), this may take a long time or the remote web service won&#039;t reply at all, users may consider something goes wrong, then they may refresh the file picker. &lt;br /&gt;
&lt;br /&gt;
Maybe we should have another page: repository/ws.php, which in charge of communicating with web services, it can be embedded in file picker page as iframe, or we can use Ajax to invoke this page, the main page -- repository/picker.php will display a loading picture or a progress bar during communicating, this is more user friendly.&lt;br /&gt;
&lt;br /&gt;
For example, when users try to obtain a file list in box.net, a iframe of ws.php?action=get_list will be inserted in picker, $repository_box-&amp;gt;get_listing(&#039;/&#039;) will be invoked in ws.php, a loading picture will be displayed in picker page, when remote web service returned, the picker page remove the loading picture, and display the result. Does this sound reasonable?&lt;br /&gt;
&lt;br /&gt;
-- [[User:Dongsheng Cai|Dongsheng Cai]] 01:34, 22 June 2008 (CDT)&lt;/div&gt;</summary>
		<author><name>Geoffr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Talk:Repository_API&amp;diff=27299</id>
		<title>Talk:Repository API</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Talk:Repository_API&amp;diff=27299"/>
		<updated>2008-08-06T23:59:31Z</updated>

		<summary type="html">&lt;p&gt;Geoffr: /* Windows network drives */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(Ideas will be deleted from the comments section as they are resolved or merged into the main spec)&lt;br /&gt;
&lt;br /&gt;
===Missing concept of trusted files===&lt;br /&gt;
Files are not created equal, some of them are to be trusted, some can not be trusted at all. Web browsers trust everything received from the server, files from server may access cookie information and thus scripting technologies may allow them to do anything user can do. We do have to trust our teachers because they are supposed to create the learning content, but we definitely can not trust all students.&lt;br /&gt;
&lt;br /&gt;
Imagine if students were allowed to upload arbitrary files to server, like html file loaded with javascript and the server would happily serve them to all Moodle users. Our solution is to use html cleaning filters for submitted texts and force downloads of student uploaded files. To do this we must know if we trust the files or not. Unfortunately the forced downloads of student uploaded files and cleaning of html texts does not solve all problems, because bugs in browsers and especially browser plug-ins may sometimes be used to work around our protections.&lt;br /&gt;
&lt;br /&gt;
The best solution would be to use separate web addresses for trusted and not trusted files (two wwwroots in config.php), not all sites may afford two different addresses but we should be imo prepared for this.  [[User:Skodak|Skodak]] 16:42, 28 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
 Great idea, yes.  In fact couldn&#039;t all the files be served via $CFG-&amp;gt;fileroot all the time?  &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
userid field could be used for this, but separate flag might be better in order to allow teachers to upload untrusted files (teacher uploads assignment submission for the student).&lt;br /&gt;
&lt;br /&gt;
===Relative file links===&lt;br /&gt;
Flash, Java and SCORM require relative links and directory hierarchy in general - we must support it. Some SCORM packages load hundreds of files per page which means the file serving must be very fast with minimum of db access.&lt;br /&gt;
&lt;br /&gt;
Reading the proposal above it seems the API is about serving of isolated files referenced by repository ids. HTML requires to use relative or absolute locators with file names, we can not use repository ids directly in relative links. In case of scorm we have absolute path to base of SCORM package of given activity and SCORM files use relative links inside the package.&lt;br /&gt;
Solution could be to store relative paths directly in filename field ex:directory1/directory2/filename.ext.&lt;br /&gt;
&lt;br /&gt;
 Yes I agree, we definitely need to support (virtual) directories and slasharguments.&lt;br /&gt;
 We could just match the file argument to a path in the db.  Perhaps add the fileid &lt;br /&gt;
 to the argument path as a primary key: fileid/directory1/directory2/filename.ext&lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
===Virtual directories and files===&lt;br /&gt;
Sometimes the content of files is generated on the fly (csv exports, etc.), there are many special files spread through codebase doing nearly the same, it should be imho possible to use the same file API for these.&lt;br /&gt;
&lt;br /&gt;
Another virtual example is assignment submissions and webdav. I would like to see an option to browse the assignment submissions as directory structure, the top directory would be a list of names of users, inside html files with online assignment and uploaded files. This would allow us to implement simple zip&amp;amp;go or webdav based offline grading solutions. The problem here is that the content of this virtual submissions directly needs to be created on the fly based on user references, the proposed repository structure can not be used for this.&lt;br /&gt;
&lt;br /&gt;
 Very interesting idea! [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
===Backup/restore relinking===&lt;br /&gt;
We are supporting relinking inside courses only. Till now it was easy to guess if absolute link will work after restore on another server.&lt;br /&gt;
There are several types of files:&lt;br /&gt;
*course files - relinked during restore, works on any server if from the same course&lt;br /&gt;
*module files - not relinked, urls are not permanent, link can not be copypasted (assignments, forum attachments, rss files, etc.)&lt;br /&gt;
*user files - not relinked, links work only on original server (blog attachments, personal files, etc.)&lt;br /&gt;
&lt;br /&gt;
 I think all this will be simplified in the proposed system because everything is &lt;br /&gt;
 represented using the same system: a file with an ACL (backup can quickly &lt;br /&gt;
 determine all the files in one course, probably using one SQL query). &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
If we are backing up/restoring on the same server, will copies of a course restore without file duplication? I use this a lot so that I can archive one year&#039;s course whilst modifying it for next year. [[User:Matt Gibson|Matt Gibson]] 03:12, 29 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
===Access needed for both file and its instances===&lt;br /&gt;
We need two types of access control - first who can create instances (link files), second who can access the instance (download the file).&lt;br /&gt;
&lt;br /&gt;
 For the first don&#039;t we already have those capabilities? (like mod/forum:createattachment,&lt;br /&gt;
 moodle/course:managefiles) but they probably could use rationalising.   We&#039;ll need new &lt;br /&gt;
 ones per repository, too, of course.  &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
===Cache lifetime===&lt;br /&gt;
There should be a way to specify cache filetime for each instance of file. For example 0 for uploaded assignments, 1 day for resource file. It might be better to allow modules to decide about this, at present it is hardcoded in file.php.&lt;br /&gt;
&lt;br /&gt;
 Great idea.  [[User:Martin Dougiamas|Martin Dougiamas]] 07:08, 29 February 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
== Hierarchy in tables ? ==&lt;br /&gt;
&lt;br /&gt;
It&#039;s possible that I don&#039;t undertand a key piece of the concept, but I wonder why there is no reference to any &amp;quot;parent id&amp;quot; in the file or file_instance table ?&lt;br /&gt;
In other words, how the hierarchical structure is supposed to be &amp;quot;imported&amp;quot; from repository to Moodle ?&lt;br /&gt;
If the hierarchy is reserved to the course context, and not to the repository context, it seems difficult to allow students to access&lt;br /&gt;
to a complete directory, for example.&lt;br /&gt;
&lt;br /&gt;
On the other hand, maybe it&#039;s only a question for the &amp;quot;local&amp;quot; repository type, and not to the &amp;quot;generic&amp;quot; repository API ?&lt;br /&gt;
[[User:Allegre Guillaume|Allegre Guillaume]] 16:43, 5 March 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 12:58, 15 March 2008 (CDT): basically I was thinking we just store a full local path for each file instead of hierarchies.  It wasn&#039;t in the db schema though: I&#039;ve just added it.  Thanks!&lt;br /&gt;
&lt;br /&gt;
As for allowing access to a whole directory, that&#039;s something I&#039;ve not thought about - thanks!  I agree we need to support something like that in the interface.  Hmm ..&lt;br /&gt;
&lt;br /&gt;
== Editing Repository Files / Version Control ? ==&lt;br /&gt;
&lt;br /&gt;
How do you imagine to handle the &amp;quot;editing file&amp;quot; problem ? &lt;br /&gt;
I can see several solutions :&lt;br /&gt;
# the simplest way : write access to a file really allows to edit (re-upload) the file, each instance being modified&lt;br /&gt;
# the &amp;quot;cheap copy&amp;quot; way : optionally, the modification is applied only to new file_instances (or those for which the teacher forces to). Here you have to handle two (then maybe more) revisions of this file.&lt;br /&gt;
This triggers the file revisions (or version control) question.&lt;br /&gt;
&lt;br /&gt;
A related question is about versionned files : &lt;br /&gt;
should it depend only upon the repository layer (for example, a plugin could implement a SVN &amp;quot;repository&amp;quot;) ?&lt;br /&gt;
Or should Moodle be aware of the file &amp;quot;revision number&amp;quot; ? &lt;br /&gt;
[[User:Allegre Guillaume|Allegre Guillaume]] 17:00, 5 March 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 13:08, 15 March 2008 (CDT):  I don&#039;t think we should start getting into such things, version and editing is the job of the dedicated external repository system and people should use that interface.  &lt;br /&gt;
&lt;br /&gt;
What we do have in Moodle is the file-&amp;gt;updates field.  This specifies when to get a fresh copy.  It would be set when the user has specified they want Moodle to use the &amp;quot;latest version&amp;quot; of the file.  And if the user specified a particular version in the repository interface then that is what gets copied (once) and the file-&amp;gt;updates field is left as zero.&lt;br /&gt;
&lt;br /&gt;
One scenario would be if someone wants to use version 1 in one course and version 2 in another, but since the version is in the URL to the original file (and thus a different remote path) they would be treated as two separate files in Moodle anyway.&lt;br /&gt;
&lt;br /&gt;
Might be a small problem if they said &amp;quot;latest version, no update&amp;quot; in course 1 and then later on said &amp;quot;latest version, no update&amp;quot; in a second course.  I guess that would re-download the latest version (which might have changed) and thus course 1 would have an unexpected update.  We could solve this by alerting the user and giving them a choice, I suppose.&lt;br /&gt;
&lt;br /&gt;
== Replacing Moodle&#039;s File System ==&lt;br /&gt;
&lt;br /&gt;
The API as specified still uses the standard Moodle file system, which has its limitations while providing a simple file access method. But, shouldn&#039;t we also be considering completely (or partially) replacing the Moodle file system with the repository system? To that end, the file interface would be the same to users, but where the files are and how they are accessed would be up to which repository was being used. In this system, the standard Moodle file system would just be one of the available repositories. Then the API could support more robust access controls if available, or very few (as Moodle does now). This could allow for per-directory / per-file privilege granting, common file areas so that courses could access the same copy of a file (rather than copying it into the Moodle file area), etc.&lt;br /&gt;
&lt;br /&gt;
The API could also support multiple repositories and allow choosing a file as a link rather than copying it.&lt;br /&gt;
&lt;br /&gt;
Of course, this would also mean allowing write access to the repository area from Moodle, rather than leaving it as read-only. I know the plan was to do this through the [[Portfolio API]], but that really is limited to a user storage function and not a file management function. I think having an API defined to allow for full file management would be a better solution - even if not supported by all repositories.&lt;br /&gt;
[[User:Mike Churchward|Mike Churchward]] 12:54, 6 March 2008 (CST)&lt;br /&gt;
&lt;br /&gt;
[[User:Martin Dougiamas|Martin Dougiamas]] 12:54, 15 March 2008 (CDT) :&lt;br /&gt;
Actually, Mike, the standard file system is NOT being retained at all.  I&#039;ve clarified this slightly in the docs.  The course-centered structure for files is gone.  All files ARE stored on disk but most of the info regarding their location and access is all governed by a table in the database (so the files could just as easily be in a remote database if you wished).  Files used in multiple areas within Moodle will never be stored more than once in Moodle.&lt;br /&gt;
&lt;br /&gt;
The idea of a read/write interface was how we started, but it&#039;s insanely complex once you try to handle backups (ie how do you make a complete backup suitable for giving to someone else?) and access control (how do you decide access depending on Moodle contexts), and we&#039;ll never do it as well as the original repository does it.  Why should we duplicate the Hive interface (to use an example) in Moodle when Hive has a perfectly good one already, one that handles all the extra stuff like Copyright controls, workflow and so on?   &lt;br /&gt;
&lt;br /&gt;
That said, the current Repository plugin idea is very simple, so that if anyone really wanted to embed management into the &amp;quot;file picker&amp;quot; interface they totally could do it in the plugin.&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
==Windows network drives==&lt;br /&gt;
I&#039;ve added this to the end of the list of repository types to be supported because its possibly the most useful one I can think of. Our school wants to make the transition to moodle, but getting the files on there is the biggest barrier and there is a lot of stuff sitting on our shared and personal folders which is time consuming to transfer. Integration is a big thing that management want to see, particularly the ability to bulk upload files. This may not be a repository as such because it may be that the best way is to copy the file from the shared folder into the repository rather than where it is so it can be moved/deleted accidentally, but easy access is vital in making the process of uploading a file possible. It would also make Moodle a killer app in that it could make our network drives available from home through a secure web interface. &lt;br /&gt;
&lt;br /&gt;
I&#039;ve linked to Guy Thomas&#039; [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=991 Windows Share Web Client block] as it is a good start, but sadly only works on Linux. [[User:Matt Gibson|Matt Gibson]] 03:43, 29 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Fantastic idea, let&#039;s call it the SMB plugin  - [[User:Martin Dougiamas|Martin Dougiamas]] 21:25, 8 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
Glad you like it :) Hope it works on Windows servers! [[User:Matt Gibson|Matt Gibson]] 03:11, 25 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
 I would like to add my enthusiastic support for this proposal. The recent update to the [http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=991 Windows Share Web Client block] to allow specific network shares (non home dir) to be accessed from specific Moodle courses &#039;&#039;almost&#039;&#039; has the required functionality (see the bundled README.TXT file for more details). Just need to replace the download of a resource from network share then upload to Moode with a direct transfer to the Moodle course file folder (similar to the way the DOOR resource integration works). &lt;br /&gt;
&lt;br /&gt;
 As Matt outlines, this has the huge advantage that many institutions are already using this kind of setup on their intranets and it is familiar to teachers. By leveraging existing systems and introducing users to the benefits of repositories, this may also be the first step towards more sophisticated Repository/Document Management Systems, such as [http://www.alfresco.com/ Alfresco], with searching, version control, automatic file transformations (e.g. PowerPoint to Flash).&lt;br /&gt;
&lt;br /&gt;
==Bulk operations==&lt;br /&gt;
On a similar note, Don Hinkelman&#039;s new course format provides a great bulk-upload feature whereby a whole folder can be uploaded and added to the course as resources with the names of the files as titles, with just a couple of clicks. I know this is extending the repository idea a little, but to be honest, I think that one of the biggest weaknesses of Moodle&#039;s file handling right now is not being able to add an entire folder of files without manually going through each one and laboriously specifying location and title. To make any repository useful, I think three operations should be possible with one or two clicks:&lt;br /&gt;
* Add a whole folder/group of files to the repository at once&lt;br /&gt;
* The above operation, but additionally, have all of the folder/group added to a course and named automatically, all in one go.&lt;br /&gt;
* Find a group of files which are already in the repository and add them to a course all at once, with automatic naming as above.&lt;br /&gt;
Not sure if this is best put here or in the Developemt: File_API bit, but here seemed slightly better. [[User:Matt Gibson|Matt Gibson]] 03:43, 29 April 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
  This is probably not related to the file API at all.  I&#039;d see it as being a new item on &lt;br /&gt;
 the resource menu (Add multiple resources ...) with some sort of shift-click scenario.  &lt;br /&gt;
 nice idea though.  Can you file it as a tracker item?    &lt;br /&gt;
 [[User:Martin Dougiamas|Martin Dougiamas]] 21:26, 8 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
See MDL-15408 [[User:Matt Gibson|Matt Gibson]] 03:09, 25 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== Bulk and a new resource type from repository ==&lt;br /&gt;
&lt;br /&gt;
Our school has several campuses and a distance learning unit with well organized and big course resource trees. The repository module could be enormously useful for us.&lt;br /&gt;
&lt;br /&gt;
I have looked at Moodle&#039;s IMS repository a bit, and like the way it is possible to put multiple resources into one access point. If the new repository could have some of the same possibilities, it would be marvellous. The drawback with the IMS is that it opens a new window with all the multiple resources. Instead, it would be OK to be able to share a whole lot of resources, or a whole &amp;quot;resource tree&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
I also like the bulk function, to be able to parse a folder of say, html-files, and add it to the resource tree.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;local repository name&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
I think users will find the word local to be confusing.  For the developer or administrator, local seems to refer to the Moodle server.  But for the teacher or student, they will think that local refers to their own local files system.  I would suggest just using the domain name for that server (like myMoodleSite.org) and list it as the first entry to avoid this confusion.  [[User:Gary Anderson|Gary Anderson]] 02:40, 10 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
 I&#039;ll add a setting so the admin can override this as they like  [[User:Martin Dougiamas|Martin Dougiamas]] 01:07, 23  June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== Credentials to third party systems ==&lt;br /&gt;
&lt;br /&gt;
You might want to consider something like oauth - http://oauth.net - to manage credentials of third party sites, rather than asking the user for them. I know I sure wouldn&#039;t want to input my credentials for one system into another! [[User:Nigel McNie|Nigel McNie]] 07:08, 17 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
 It&#039;s up to the plugin, but generally we won&#039;t be storing anything permanently.  Oauth could be useful though, thanks  [[User:Martin Dougiamas|Martin Dougiamas]] 01:09, 23  June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== function is_logged() ==&lt;br /&gt;
&lt;br /&gt;
I created a prototype of file picker, the repository I tested is box.net, in this cast, we need a function to check if users are authenticated by box.net, if this function return false, print_login function will be called, it print a link to redirect to box.net login page, after the user logged in, box.net will redirect to file picker page, the authenticated user obtain a auth_token_key to access resource.&lt;br /&gt;
&lt;br /&gt;
The other web service like google docs and facebook have similar authentication process. &lt;br /&gt;
&lt;br /&gt;
See: http://enabled.box.net/docs/rest#authentication&lt;br /&gt;
&lt;br /&gt;
-- [[User:Dongsheng Cai|Dongsheng Cai]] 01:34, 22 June 2008 (CDT)&lt;br /&gt;
&lt;br /&gt;
== ws.php ==&lt;br /&gt;
Another problem is users have to wait for page loading (file picker page) until moodle have got the response from remote web service (limited by cURL&#039;s synchronous requests), this may take a long time or the remote web service won&#039;t reply at all, users may consider something goes wrong, then they may refresh the file picker. &lt;br /&gt;
&lt;br /&gt;
Maybe we should have another page: repository/ws.php, which in charge of communicating with web services, it can be embedded in file picker page as iframe, or we can use Ajax to invoke this page, the main page -- repository/picker.php will display a loading picture or a progress bar during communicating, this is more user friendly.&lt;br /&gt;
&lt;br /&gt;
For example, when users try to obtain a file list in box.net, a iframe of ws.php?action=get_list will be inserted in picker, $repository_box-&amp;gt;get_listing(&#039;/&#039;) will be invoked in ws.php, a loading picture will be displayed in picker page, when remote web service returned, the picker page remove the loading picture, and display the result. Does this sound reasonable?&lt;br /&gt;
&lt;br /&gt;
-- [[User:Dongsheng Cai|Dongsheng Cai]] 01:34, 22 June 2008 (CDT)&lt;/div&gt;</summary>
		<author><name>Geoffr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Wikindx&amp;diff=4834</id>
		<title>Wikindx</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Wikindx&amp;diff=4834"/>
		<updated>2007-09-23T18:51:26Z</updated>

		<summary type="html">&lt;p&gt;Geoffr: /* CMS Integration with WIKINDX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Notes on the possible integration of [http://wikindx.sourceforge.net/index2.html WIKINDX] with Moodle.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://wikindx.sourceforge.net/index2.html WIKINDX]is a free BiblioGraphic and quotations/notes management and article authoring system designed either for single use (on a variety of operating sytems) or multi-user collaborative use across the internet.&lt;br /&gt;
&lt;br /&gt;
Please also see the Moodle Discussion at http://moodle.org/mod/forum/discuss.php?d=23022&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;From GR: Most of the capabilities discussed in this documentation have now been incorporated in the WIKINDX Bibliography Filter:&#039;&#039;&#039; http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=970&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Also see this discussion forum:&#039;&#039;&#039; http://moodle.org/mod/forum/discuss.php?d=76936&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
==CMS Integration with WIKINDX==&lt;br /&gt;
&lt;br /&gt;
From MG:&lt;br /&gt;
WIKINDX 3.7 (released 29th July 2007) provides CMS &#039;hooks&#039; enabling any CMS using replacement tags or similar to include a range of WIKINDX output.  This output includes lists of resources selected and ordered by various parameters.&lt;br /&gt;
&lt;br /&gt;
Additionally, WIKINDX may be used to format a block of CMS text (containing the appropriate replacement tags) with either in-text or footnote-style citations and an appended bibliography.&lt;br /&gt;
&lt;br /&gt;
Finally, because the CMS hooks make use of WIKINDX ID numbers, WIKINDX (providing the option has been turned on in the user&#039;s Preferences) provides an interface to formulate the CMS replacement tag for a single WIKINDX resource and to interrogate the WIKINDX database for collection, creator, publisher etc. IDs.&lt;br /&gt;
&lt;br /&gt;
Once WIKINDX has been installed, the CMS scripter should read README_CMS.&lt;br /&gt;
&lt;br /&gt;
Still desired (but not absolutely necessary), is an interface to WIKINDX from within Moodle and design considerations for this are discussed below.&lt;br /&gt;
&lt;br /&gt;
==Wikindx filter for Moodle==&lt;br /&gt;
&lt;br /&gt;
From MG:&lt;br /&gt;
Dan&#039;s filter likely needs updating/altering in the light of WIKINDX 3.7.&lt;br /&gt;
&lt;br /&gt;
Dan Stowell has created a &amp;quot;Wikindx filter&amp;quot; for Moodle which allows you to cross-link to a wikindx entry by typing (for example) wikindx:646. The filter is in contrib CVS, named &amp;quot;filter_wikindx&amp;quot; or can be downloaded at http://download.moodle.org/download.php/modules/filter_wikindx.zip&lt;br /&gt;
&lt;br /&gt;
From MG:&lt;br /&gt;
Some design considerations for a moodle filter that enables a wikindx to be searched, a reference to be selected, page number(s) to be added and the in-text or footnote citation and full reference to be returned formatted to the user&#039;s requirements.  README_CMS in the WIKINDX install should be read in conjunction with this.  WIKINDX&#039;s config.php provides some initial CMS hook settings.&lt;br /&gt;
&lt;br /&gt;
1/ The Moodle filter needs to provide 3 basic functions:&lt;br /&gt;
:a) an icon in the HTML text editor that opens a pop-up,&lt;br /&gt;
:b) the pop up should provide a simple search/select interface to wikindx resources,&lt;br /&gt;
:c) once the selected wikindx resource has been inserted into the text, the moodle HTML editor text is saved and the filter sends the reference (and style and page number(s)) to wikindx for formatting and insertion into the moodle text.&lt;br /&gt;
&lt;br /&gt;
2/ Because what is supplied to the pop-up (see below) requires a connection to wikindx, the filter should have a config file for the wikindx database connection details.  wikindx 3.4 now allows admins to lock out read-only users so this config file may also have the option to add a wikindx username::password pair (I would not favour this though).&lt;br /&gt;
&lt;br /&gt;
3/ The search interface could be similar to the wikindx Quick Search interface less the ordering options (to save on space). [WIKINDX code (filling the pop-up)]&lt;br /&gt;
&lt;br /&gt;
4/ The results of a search should be displayed with multiple resources next to radio buttons, a select box to choose the formatting style and text boxes to enter page number(s).  Each radio button has a value that is the unique resource ID in the wikindx.  [WIKINDX code]&lt;br /&gt;
&lt;br /&gt;
5/ Once the appropriate resource has been selected and other details added, clicking on a &#039;process&#039; button will add the appropriate filter mark-up which &#039;&#039;may&#039;&#039; be something like:&lt;br /&gt;
:wikindx:34:12&lt;br /&gt;
:wikindx:56:34-35&lt;br /&gt;
&lt;br /&gt;
where the first number is the wikindx resource ID and the second number(s) is the page.  See README_CMS for instructions on how to add further parameters.&lt;br /&gt;
&lt;br /&gt;
6/ On displaying the moodle text, that markup is extracted and sent to the wikindx server (something like &#039;http://localhost/wikindx3/cmsprint.php?action=getResource&amp;amp;id=242&#039;) which then formats the requested resource and provides a string in return which would consist of a serialized/base64_encoded PHP multi-dimensional array which, when unpacked, would have something like the following (if APA for example):&lt;br /&gt;
::[13] =&amp;gt; Back, M., &amp;amp;amp; Des, D. (1996). Micro-narratives in sound design: Context and caricature in waveform manipulation. Retrieved March 12, 2004, from &amp;lt;a href=&amp;quot;http://www2.hku.nl/~audiogam/ag/articles/micronaratives.htm&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;http://www2.hku.nl/~aud&amp;amp;nbsp;...&amp;amp;nbsp;cles/micronaratives.htm&amp;lt;/a&amp;gt;.&lt;br /&gt;
::[54] =&amp;gt; Carr, D. (2003). Play dead: Genre and affect in silent hill and planescape torment. &amp;lt;em&amp;gt;Game Studies&amp;lt;/em&amp;gt;&amp;lt;em&amp;gt;, 3&amp;lt;/em&amp;gt;(1). Retrieved September 16, 2003, from &amp;lt;a href=&amp;quot;http://www.gamestudies.org/0301/carr/&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;http://www.gamestudies.org/0301/carr/&amp;lt;/a&amp;gt;. &lt;br /&gt;
::[2] =&amp;gt; Chion, M. (1992). Wasted words. In R. Altman (Ed.), &amp;lt;em&amp;gt;Sound Theory Sound Practice&amp;lt;/em&amp;gt; (pp. 104&amp;amp;ndash;110). New York: Routledge.&lt;br /&gt;
::[103] =&amp;gt; Chion, M. (1994). &amp;lt;em&amp;gt;Audio-vision: Sound on screen&amp;lt;/em&amp;gt; (C. Gorbman, Trans.) New York: Columbia University Press.&lt;br /&gt;
::[4] =&amp;gt; Truppin, A. (1992). And then there was sound: The films of Andrei Tarkovsky. In R. Altman (Ed.), &amp;lt;em&amp;gt;Sound Theory Sound Practice&amp;lt;/em&amp;gt; (pp. 235&amp;amp;ndash;248). New York: Routledge.&lt;br /&gt;
&lt;br /&gt;
Note that, depending upon the bibliographic style chosen in the WIKINDX&#039;s config.php, the results may contain HTML tags (as in the above example).  The key of each array member is the resource ID.&lt;br /&gt;
&lt;br /&gt;
WIKINDX may also be used to format a block of CMS text having appropriate replacement tags with in-text or footnote-style citations and an optional bibliography.  An example output from this might be:&lt;br /&gt;
&lt;br /&gt;
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis ligula lorem, consequat eget, tristique nec, auctor quis, purus. Vivamus  (Mayer &amp;amp; Moreno, 1998) ut sem. Fusce aliquam nunc vitae purus. Aenean viverra malesuada libero. Fusce ac quam. Donec neque. Nunc venenatis enim nec quam. Cras faucibus, justo vel accumsan aliquam, tellus dui fringilla quam, in condimentum augue lorem non tellus.  (Rittel &amp;amp; Webber, 1973) Pellentesque id arcu non sem placerat iaculis. Curabitur posuere  (Kullberg, 1991), pede vitae lacinia accumsan, enim nibh elementum orci, ut volutpat eros sapien nec sapien. Suspendisse neque arcu, ultrices commodo, pellentesque sit amet, ultricies ut, ipsum. Mauris et eros eget erat dapibus mollis. Mauris laoreet posuere odio. Nam ipsum ligula, ullamcorper eu, fringilla at, lacinia ut, augue. Nullam nunc.&lt;br /&gt;
&lt;br /&gt;
Kullberg, R. (1991). Dynamic timelines: Visualizing historical information in three dimensions. Unpublished master&#039;s thesis, Massachusetts Insititute of Technology.&lt;br /&gt;
Mayer, R. E., &amp;amp; Moreno, R. (1998). A split-attention effect in multimedia learning: Evidence for dual processing systems in working memory. Journal of Educational Psychology, 90(2), 312–320.&lt;br /&gt;
Rittel, R. W. J., &amp;amp; Webber, M. M. (1973). Dilemmas in a general theory of planning. Policy Sciences, 2(4), 155–169.&lt;br /&gt;
&lt;br /&gt;
See WIKINDX&#039;s README_CMS for further information and example PHP code.&lt;br /&gt;
&lt;br /&gt;
--[[User:Mark Grimshaw|Mark Grimshaw]] 01:27, 30 July 2007 (CDT)&lt;br /&gt;
&lt;br /&gt;
==Outline thoughts on integration...==&lt;br /&gt;
&lt;br /&gt;
1. Do we need to allowing a user already logged into a Moodle site to be seamlessly logged in to a wikindx? Or maybe just use the same login details between the two (like the way that Moodle.org and MoodleDocs works).  If necessary, something could be added to wikindx to enable this. In most cases though, with the right config settings, wikindx will allow any read only request without requiring login.&lt;br /&gt;
&lt;br /&gt;
2. Another issue is how to integrate the paper writing function of Wikindx into Moodle. What about use of the HTML editor? Could it be integrated some way with the Netpublish module? Imagine students or professors being able to use it to write academic papers and then publish those on the Moodle site.  Currently wikindx publishes papers solely to RTF.  It should be simple to publish to HTML since that&#039;s what the raw document is anyway (a matter of adding HTML header/footer, formatting citations and appending bibliographies -- most of this code is already in wikindx but not (yet) made available to the word processor).  Compared to other HTML editors, the only additional options wikindx offers in its version are buttons to import citations, metadata and insert footnotes.  All the rest (barring stats, timestamps, save etc.) are font/text formatting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note from DS: No, at present the Wikindx filter simply displays the text &amp;quot;wikindx:646&amp;quot; (for example). It&#039;s a very simple start and I hope that people with more knowledge of Wikindx will be able to modify it to extract the properly-formatted reference direct from Wikindx. If wikindx had a system whereby a certain URL call would supply the reference text in whatever style was configured for wikindx, this would be a good way to display the citation nicely within Moodle. Does such a call exist? I don&#039;t think so. Something like mywikindx.com/index.php?&#039;&#039;&#039;action=resourceGrabCitation&#039;&#039;&#039;&amp;amp;id=501 would be required.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note from JB: As the wikindx admin can set the default bibliographic style in the config, the filter will just present that style. The filter is simple but oh so useful! So when I type &#039;&#039;&#039;wikindx:1&#039;&#039;&#039; into my moodle installation, it creates an automatic link to http://www.baillie.org.uk/wikindx//index.php?action=resourceView&amp;amp;id=1&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note from MG: In wikindx, inserting a citation into metadata or the word processor involves clicking on an icon which opens a popup.  In this, there is a select box listing short entries of all available resources and some text fields for users to enter cited page numbers.  Perhaps something similar could be used in the moodle wikindx filter to avoid the hassle of having to look up the wikindx resource id before entering it into moodle.  This pop-up could also list the available citation/bibliographic styles on the wikindx allowing the user to select the style with which the citation should be formatted prior to insertion into moodle.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
4. Mark, your remarks in 2 have gotten me thinking. Although not everyone likes the Moodle HTML area editor that much, it still is the standard way of creating text in Moodle and perhaps a way of integrating Wikindx would be to add buttons for Wikindx to it, just like the kind described above in Wikindx&#039;s native editor. I needed to integrate a hieroglyph editor into my site and Janne Mikkonen helped me to add it through a button in the html editor that pops up a window, in which the student type the hieroglyphs they need, and then click a button to have them inserted back into the editor-similar to the way the insert image popup works. I would imagine something similar could be done with Wikindx. The advantage of this is that it would make Wikindx accessible anywhere within Moodle, rather than just as a separate module. You might also want a standalone module option whereby students could collaborate on creating bibliographies together.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note from MG: Adding the appropriate buttons would be my suggestion.  In wikindx, citations are added by the popup automatically adding something like&#039;&#039;&lt;br /&gt;
:&#039;&#039;[cite]146:22-23[/cite]&#039;&#039;&lt;br /&gt;
:&#039;&#039;where 146 is the resource ID in the database and 22-23 are the page nos. This can be added via a cite button or will be appended to an inserted quotation/paraphrase via the wikindx &#039;insert metadata&#039; button.  Footnotes (i.e. parenthetical thoughts as opposed to citation footnotes - WIKINDX does handle those footnotes/endnotes as well) are inserted via a button which encloses the inserted footnote in:&#039;&#039;&lt;br /&gt;
:&#039;&#039;[footnote]....[/footnote]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Exporting to RTF, the cite tags are substituted with the formatted citation marker (in-text or footnote/endnote), bibliographic information is extracted and appended to a bibliography and footnote tags are converted to RTF footnotes.  Of course, all HTML code (font/text formatting, tables, lists, images etc.) are converted to their appropriate RTF code too.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
5. Re the citation/bibliographic formatting, the PHP code for this has been extracted from wikindx and made available to other OSS apps at http://bibliophile.sourceforge.net (I think Aigaion and Bibliograph use it or are about to) so it may be easy enough for Moodle to use this too.  In fact doubly easy if moodle interfaces with a wikindx because the quickest way to set up the formatting engine is to provide data to it in exactly the same PHP associative array that wikindx natively expects.&lt;br /&gt;
&lt;br /&gt;
6. What capabilities are there in Wikindx at this time for different capabilities in using bibliographies? Can bibliographies be shared by a predefined group/all users? Can some people be given the ability to add to a bibliography while others can only use the bibilography? Can bibliography entries be required to have approval by some person before they are displayed to all? These would be nice features to have.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;MG: WIKINDX recognizes two types of bibliography; the master bibliography (MB) and user bibliographies (UB).  The MB holds the resources while UBs merely have references to resources from the MB.  Currently both the MB and UBs are readable by all users.  A UB is owned by a user and only he/she can add/delete references to resources.  All write enabled users can add to the MB.  Because I&#039;m aiming towards collaborative authoring in the word processor (SUWP), a long-standing feature to be implemented is to add user groups (i.e. research teams).  Then, the owner of a UB can add other users with write access to the UB and only those users can browse the UB.  Additionally, a user can make comments and musings private, shared with a group or public. Of course, a SUWP article can be shared among a group.  This hasn&#039;t been implemented yet -- I need to find someone familiar with wiki technology to help implement the collaborative authoring first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Wikindx]]&lt;/div&gt;</summary>
		<author><name>Geoffr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Wikindx&amp;diff=4833</id>
		<title>Wikindx</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Wikindx&amp;diff=4833"/>
		<updated>2007-09-23T18:50:36Z</updated>

		<summary type="html">&lt;p&gt;Geoffr: /* CMS Integration with WIKINDX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Notes on the possible integration of [http://wikindx.sourceforge.net/index2.html WIKINDX] with Moodle.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://wikindx.sourceforge.net/index2.html WIKINDX]is a free BiblioGraphic and quotations/notes management and article authoring system designed either for single use (on a variety of operating sytems) or multi-user collaborative use across the internet.&lt;br /&gt;
&lt;br /&gt;
Please also see the Moodle Discussion at http://moodle.org/mod/forum/discuss.php?d=23022&lt;br /&gt;
&lt;br /&gt;
==CMS Integration with WIKINDX==&lt;br /&gt;
&lt;br /&gt;
From MG:&lt;br /&gt;
WIKINDX 3.7 (released 29th July 2007) provides CMS &#039;hooks&#039; enabling any CMS using replacement tags or similar to include a range of WIKINDX output.  This output includes lists of resources selected and ordered by various parameters.&lt;br /&gt;
&lt;br /&gt;
Additionally, WIKINDX may be used to format a block of CMS text (containing the appropriate replacement tags) with either in-text or footnote-style citations and an appended bibliography.&lt;br /&gt;
&lt;br /&gt;
Finally, because the CMS hooks make use of WIKINDX ID numbers, WIKINDX (providing the option has been turned on in the user&#039;s Preferences) provides an interface to formulate the CMS replacement tag for a single WIKINDX resource and to interrogate the WIKINDX database for collection, creator, publisher etc. IDs.&lt;br /&gt;
&lt;br /&gt;
Once WIKINDX has been installed, the CMS scripter should read README_CMS.&lt;br /&gt;
&lt;br /&gt;
Still desired (but not absolutely necessary), is an interface to WIKINDX from within Moodle and design considerations for this are discussed below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;From GR: Most of the capabilities discussed in this documentation have now been incorporated in the WIKINDX Bibliography Filter:&#039;&#039;&#039; http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=970&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Also see this discussion forum:&#039;&#039;&#039; http://moodle.org/mod/forum/discuss.php?d=76936&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Wikindx filter for Moodle==&lt;br /&gt;
&lt;br /&gt;
From MG:&lt;br /&gt;
Dan&#039;s filter likely needs updating/altering in the light of WIKINDX 3.7.&lt;br /&gt;
&lt;br /&gt;
Dan Stowell has created a &amp;quot;Wikindx filter&amp;quot; for Moodle which allows you to cross-link to a wikindx entry by typing (for example) wikindx:646. The filter is in contrib CVS, named &amp;quot;filter_wikindx&amp;quot; or can be downloaded at http://download.moodle.org/download.php/modules/filter_wikindx.zip&lt;br /&gt;
&lt;br /&gt;
From MG:&lt;br /&gt;
Some design considerations for a moodle filter that enables a wikindx to be searched, a reference to be selected, page number(s) to be added and the in-text or footnote citation and full reference to be returned formatted to the user&#039;s requirements.  README_CMS in the WIKINDX install should be read in conjunction with this.  WIKINDX&#039;s config.php provides some initial CMS hook settings.&lt;br /&gt;
&lt;br /&gt;
1/ The Moodle filter needs to provide 3 basic functions:&lt;br /&gt;
:a) an icon in the HTML text editor that opens a pop-up,&lt;br /&gt;
:b) the pop up should provide a simple search/select interface to wikindx resources,&lt;br /&gt;
:c) once the selected wikindx resource has been inserted into the text, the moodle HTML editor text is saved and the filter sends the reference (and style and page number(s)) to wikindx for formatting and insertion into the moodle text.&lt;br /&gt;
&lt;br /&gt;
2/ Because what is supplied to the pop-up (see below) requires a connection to wikindx, the filter should have a config file for the wikindx database connection details.  wikindx 3.4 now allows admins to lock out read-only users so this config file may also have the option to add a wikindx username::password pair (I would not favour this though).&lt;br /&gt;
&lt;br /&gt;
3/ The search interface could be similar to the wikindx Quick Search interface less the ordering options (to save on space). [WIKINDX code (filling the pop-up)]&lt;br /&gt;
&lt;br /&gt;
4/ The results of a search should be displayed with multiple resources next to radio buttons, a select box to choose the formatting style and text boxes to enter page number(s).  Each radio button has a value that is the unique resource ID in the wikindx.  [WIKINDX code]&lt;br /&gt;
&lt;br /&gt;
5/ Once the appropriate resource has been selected and other details added, clicking on a &#039;process&#039; button will add the appropriate filter mark-up which &#039;&#039;may&#039;&#039; be something like:&lt;br /&gt;
:wikindx:34:12&lt;br /&gt;
:wikindx:56:34-35&lt;br /&gt;
&lt;br /&gt;
where the first number is the wikindx resource ID and the second number(s) is the page.  See README_CMS for instructions on how to add further parameters.&lt;br /&gt;
&lt;br /&gt;
6/ On displaying the moodle text, that markup is extracted and sent to the wikindx server (something like &#039;http://localhost/wikindx3/cmsprint.php?action=getResource&amp;amp;id=242&#039;) which then formats the requested resource and provides a string in return which would consist of a serialized/base64_encoded PHP multi-dimensional array which, when unpacked, would have something like the following (if APA for example):&lt;br /&gt;
::[13] =&amp;gt; Back, M., &amp;amp;amp; Des, D. (1996). Micro-narratives in sound design: Context and caricature in waveform manipulation. Retrieved March 12, 2004, from &amp;lt;a href=&amp;quot;http://www2.hku.nl/~audiogam/ag/articles/micronaratives.htm&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;http://www2.hku.nl/~aud&amp;amp;nbsp;...&amp;amp;nbsp;cles/micronaratives.htm&amp;lt;/a&amp;gt;.&lt;br /&gt;
::[54] =&amp;gt; Carr, D. (2003). Play dead: Genre and affect in silent hill and planescape torment. &amp;lt;em&amp;gt;Game Studies&amp;lt;/em&amp;gt;&amp;lt;em&amp;gt;, 3&amp;lt;/em&amp;gt;(1). Retrieved September 16, 2003, from &amp;lt;a href=&amp;quot;http://www.gamestudies.org/0301/carr/&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;http://www.gamestudies.org/0301/carr/&amp;lt;/a&amp;gt;. &lt;br /&gt;
::[2] =&amp;gt; Chion, M. (1992). Wasted words. In R. Altman (Ed.), &amp;lt;em&amp;gt;Sound Theory Sound Practice&amp;lt;/em&amp;gt; (pp. 104&amp;amp;ndash;110). New York: Routledge.&lt;br /&gt;
::[103] =&amp;gt; Chion, M. (1994). &amp;lt;em&amp;gt;Audio-vision: Sound on screen&amp;lt;/em&amp;gt; (C. Gorbman, Trans.) New York: Columbia University Press.&lt;br /&gt;
::[4] =&amp;gt; Truppin, A. (1992). And then there was sound: The films of Andrei Tarkovsky. In R. Altman (Ed.), &amp;lt;em&amp;gt;Sound Theory Sound Practice&amp;lt;/em&amp;gt; (pp. 235&amp;amp;ndash;248). New York: Routledge.&lt;br /&gt;
&lt;br /&gt;
Note that, depending upon the bibliographic style chosen in the WIKINDX&#039;s config.php, the results may contain HTML tags (as in the above example).  The key of each array member is the resource ID.&lt;br /&gt;
&lt;br /&gt;
WIKINDX may also be used to format a block of CMS text having appropriate replacement tags with in-text or footnote-style citations and an optional bibliography.  An example output from this might be:&lt;br /&gt;
&lt;br /&gt;
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis ligula lorem, consequat eget, tristique nec, auctor quis, purus. Vivamus  (Mayer &amp;amp; Moreno, 1998) ut sem. Fusce aliquam nunc vitae purus. Aenean viverra malesuada libero. Fusce ac quam. Donec neque. Nunc venenatis enim nec quam. Cras faucibus, justo vel accumsan aliquam, tellus dui fringilla quam, in condimentum augue lorem non tellus.  (Rittel &amp;amp; Webber, 1973) Pellentesque id arcu non sem placerat iaculis. Curabitur posuere  (Kullberg, 1991), pede vitae lacinia accumsan, enim nibh elementum orci, ut volutpat eros sapien nec sapien. Suspendisse neque arcu, ultrices commodo, pellentesque sit amet, ultricies ut, ipsum. Mauris et eros eget erat dapibus mollis. Mauris laoreet posuere odio. Nam ipsum ligula, ullamcorper eu, fringilla at, lacinia ut, augue. Nullam nunc.&lt;br /&gt;
&lt;br /&gt;
Kullberg, R. (1991). Dynamic timelines: Visualizing historical information in three dimensions. Unpublished master&#039;s thesis, Massachusetts Insititute of Technology.&lt;br /&gt;
Mayer, R. E., &amp;amp; Moreno, R. (1998). A split-attention effect in multimedia learning: Evidence for dual processing systems in working memory. Journal of Educational Psychology, 90(2), 312–320.&lt;br /&gt;
Rittel, R. W. J., &amp;amp; Webber, M. M. (1973). Dilemmas in a general theory of planning. Policy Sciences, 2(4), 155–169.&lt;br /&gt;
&lt;br /&gt;
See WIKINDX&#039;s README_CMS for further information and example PHP code.&lt;br /&gt;
&lt;br /&gt;
--[[User:Mark Grimshaw|Mark Grimshaw]] 01:27, 30 July 2007 (CDT)&lt;br /&gt;
&lt;br /&gt;
==Outline thoughts on integration...==&lt;br /&gt;
&lt;br /&gt;
1. Do we need to allowing a user already logged into a Moodle site to be seamlessly logged in to a wikindx? Or maybe just use the same login details between the two (like the way that Moodle.org and MoodleDocs works).  If necessary, something could be added to wikindx to enable this. In most cases though, with the right config settings, wikindx will allow any read only request without requiring login.&lt;br /&gt;
&lt;br /&gt;
2. Another issue is how to integrate the paper writing function of Wikindx into Moodle. What about use of the HTML editor? Could it be integrated some way with the Netpublish module? Imagine students or professors being able to use it to write academic papers and then publish those on the Moodle site.  Currently wikindx publishes papers solely to RTF.  It should be simple to publish to HTML since that&#039;s what the raw document is anyway (a matter of adding HTML header/footer, formatting citations and appending bibliographies -- most of this code is already in wikindx but not (yet) made available to the word processor).  Compared to other HTML editors, the only additional options wikindx offers in its version are buttons to import citations, metadata and insert footnotes.  All the rest (barring stats, timestamps, save etc.) are font/text formatting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note from DS: No, at present the Wikindx filter simply displays the text &amp;quot;wikindx:646&amp;quot; (for example). It&#039;s a very simple start and I hope that people with more knowledge of Wikindx will be able to modify it to extract the properly-formatted reference direct from Wikindx. If wikindx had a system whereby a certain URL call would supply the reference text in whatever style was configured for wikindx, this would be a good way to display the citation nicely within Moodle. Does such a call exist? I don&#039;t think so. Something like mywikindx.com/index.php?&#039;&#039;&#039;action=resourceGrabCitation&#039;&#039;&#039;&amp;amp;id=501 would be required.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note from JB: As the wikindx admin can set the default bibliographic style in the config, the filter will just present that style. The filter is simple but oh so useful! So when I type &#039;&#039;&#039;wikindx:1&#039;&#039;&#039; into my moodle installation, it creates an automatic link to http://www.baillie.org.uk/wikindx//index.php?action=resourceView&amp;amp;id=1&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note from MG: In wikindx, inserting a citation into metadata or the word processor involves clicking on an icon which opens a popup.  In this, there is a select box listing short entries of all available resources and some text fields for users to enter cited page numbers.  Perhaps something similar could be used in the moodle wikindx filter to avoid the hassle of having to look up the wikindx resource id before entering it into moodle.  This pop-up could also list the available citation/bibliographic styles on the wikindx allowing the user to select the style with which the citation should be formatted prior to insertion into moodle.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
4. Mark, your remarks in 2 have gotten me thinking. Although not everyone likes the Moodle HTML area editor that much, it still is the standard way of creating text in Moodle and perhaps a way of integrating Wikindx would be to add buttons for Wikindx to it, just like the kind described above in Wikindx&#039;s native editor. I needed to integrate a hieroglyph editor into my site and Janne Mikkonen helped me to add it through a button in the html editor that pops up a window, in which the student type the hieroglyphs they need, and then click a button to have them inserted back into the editor-similar to the way the insert image popup works. I would imagine something similar could be done with Wikindx. The advantage of this is that it would make Wikindx accessible anywhere within Moodle, rather than just as a separate module. You might also want a standalone module option whereby students could collaborate on creating bibliographies together.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note from MG: Adding the appropriate buttons would be my suggestion.  In wikindx, citations are added by the popup automatically adding something like&#039;&#039;&lt;br /&gt;
:&#039;&#039;[cite]146:22-23[/cite]&#039;&#039;&lt;br /&gt;
:&#039;&#039;where 146 is the resource ID in the database and 22-23 are the page nos. This can be added via a cite button or will be appended to an inserted quotation/paraphrase via the wikindx &#039;insert metadata&#039; button.  Footnotes (i.e. parenthetical thoughts as opposed to citation footnotes - WIKINDX does handle those footnotes/endnotes as well) are inserted via a button which encloses the inserted footnote in:&#039;&#039;&lt;br /&gt;
:&#039;&#039;[footnote]....[/footnote]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Exporting to RTF, the cite tags are substituted with the formatted citation marker (in-text or footnote/endnote), bibliographic information is extracted and appended to a bibliography and footnote tags are converted to RTF footnotes.  Of course, all HTML code (font/text formatting, tables, lists, images etc.) are converted to their appropriate RTF code too.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
5. Re the citation/bibliographic formatting, the PHP code for this has been extracted from wikindx and made available to other OSS apps at http://bibliophile.sourceforge.net (I think Aigaion and Bibliograph use it or are about to) so it may be easy enough for Moodle to use this too.  In fact doubly easy if moodle interfaces with a wikindx because the quickest way to set up the formatting engine is to provide data to it in exactly the same PHP associative array that wikindx natively expects.&lt;br /&gt;
&lt;br /&gt;
6. What capabilities are there in Wikindx at this time for different capabilities in using bibliographies? Can bibliographies be shared by a predefined group/all users? Can some people be given the ability to add to a bibliography while others can only use the bibilography? Can bibliography entries be required to have approval by some person before they are displayed to all? These would be nice features to have.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;MG: WIKINDX recognizes two types of bibliography; the master bibliography (MB) and user bibliographies (UB).  The MB holds the resources while UBs merely have references to resources from the MB.  Currently both the MB and UBs are readable by all users.  A UB is owned by a user and only he/she can add/delete references to resources.  All write enabled users can add to the MB.  Because I&#039;m aiming towards collaborative authoring in the word processor (SUWP), a long-standing feature to be implemented is to add user groups (i.e. research teams).  Then, the owner of a UB can add other users with write access to the UB and only those users can browse the UB.  Additionally, a user can make comments and musings private, shared with a group or public. Of course, a SUWP article can be shared among a group.  This hasn&#039;t been implemented yet -- I need to find someone familiar with wiki technology to help implement the collaborative authoring first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Wikindx]]&lt;/div&gt;</summary>
		<author><name>Geoffr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Wikindx&amp;diff=4832</id>
		<title>Wikindx</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Wikindx&amp;diff=4832"/>
		<updated>2007-09-21T18:29:21Z</updated>

		<summary type="html">&lt;p&gt;Geoffr: /* CMS Integration with WIKINDX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Notes on the possible integration of [http://wikindx.sourceforge.net/index2.html WIKINDX] with Moodle.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://wikindx.sourceforge.net/index2.html WIKINDX]is a free BiblioGraphic and quotations/notes management and article authoring system designed either for single use (on a variety of operating sytems) or multi-user collaborative use across the internet.&lt;br /&gt;
&lt;br /&gt;
Please also see the Moodle Discussion at http://moodle.org/mod/forum/discuss.php?d=23022&lt;br /&gt;
&lt;br /&gt;
==CMS Integration with WIKINDX==&lt;br /&gt;
&lt;br /&gt;
From MG:&lt;br /&gt;
WIKINDX 3.7 (released 29th July 2007) provides CMS &#039;hooks&#039; enabling any CMS using replacement tags or similar to include a range of WIKINDX output.  This output includes lists of resources selected and ordered by various parameters.&lt;br /&gt;
&lt;br /&gt;
Additionally, WIKINDX may be used to format a block of CMS text (containing the appropriate replacement tags) with either in-text or footnote-style citations and an appended bibliography.&lt;br /&gt;
&lt;br /&gt;
Finally, because the CMS hooks make use of WIKINDX ID numbers, WIKINDX (providing the option has been turned on in the user&#039;s Preferences) provides an interface to formulate the CMS replacement tag for a single WIKINDX resource and to interrogate the WIKINDX database for collection, creator, publisher etc. IDs.&lt;br /&gt;
&lt;br /&gt;
Once WIKINDX has been installed, the CMS scripter should read README_CMS.&lt;br /&gt;
&lt;br /&gt;
Still desired (but not absolutely necessary), is an interface to WIKINDX from within Moodle and design considerations for this are discussed below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From GR: Most of the capabilities discussed in this documentation have now been incorporated in the WIKINDX Bibliography Filter: http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=970&lt;br /&gt;
&lt;br /&gt;
Also see this discussion forum: http://moodle.org/mod/forum/discuss.php?d=76936&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Wikindx filter for Moodle==&lt;br /&gt;
&lt;br /&gt;
From MG:&lt;br /&gt;
Dan&#039;s filter likely needs updating/altering in the light of WIKINDX 3.7.&lt;br /&gt;
&lt;br /&gt;
Dan Stowell has created a &amp;quot;Wikindx filter&amp;quot; for Moodle which allows you to cross-link to a wikindx entry by typing (for example) wikindx:646. The filter is in contrib CVS, named &amp;quot;filter_wikindx&amp;quot; or can be downloaded at http://download.moodle.org/download.php/modules/filter_wikindx.zip&lt;br /&gt;
&lt;br /&gt;
From MG:&lt;br /&gt;
Some design considerations for a moodle filter that enables a wikindx to be searched, a reference to be selected, page number(s) to be added and the in-text or footnote citation and full reference to be returned formatted to the user&#039;s requirements.  README_CMS in the WIKINDX install should be read in conjunction with this.  WIKINDX&#039;s config.php provides some initial CMS hook settings.&lt;br /&gt;
&lt;br /&gt;
1/ The Moodle filter needs to provide 3 basic functions:&lt;br /&gt;
:a) an icon in the HTML text editor that opens a pop-up,&lt;br /&gt;
:b) the pop up should provide a simple search/select interface to wikindx resources,&lt;br /&gt;
:c) once the selected wikindx resource has been inserted into the text, the moodle HTML editor text is saved and the filter sends the reference (and style and page number(s)) to wikindx for formatting and insertion into the moodle text.&lt;br /&gt;
&lt;br /&gt;
2/ Because what is supplied to the pop-up (see below) requires a connection to wikindx, the filter should have a config file for the wikindx database connection details.  wikindx 3.4 now allows admins to lock out read-only users so this config file may also have the option to add a wikindx username::password pair (I would not favour this though).&lt;br /&gt;
&lt;br /&gt;
3/ The search interface could be similar to the wikindx Quick Search interface less the ordering options (to save on space). [WIKINDX code (filling the pop-up)]&lt;br /&gt;
&lt;br /&gt;
4/ The results of a search should be displayed with multiple resources next to radio buttons, a select box to choose the formatting style and text boxes to enter page number(s).  Each radio button has a value that is the unique resource ID in the wikindx.  [WIKINDX code]&lt;br /&gt;
&lt;br /&gt;
5/ Once the appropriate resource has been selected and other details added, clicking on a &#039;process&#039; button will add the appropriate filter mark-up which &#039;&#039;may&#039;&#039; be something like:&lt;br /&gt;
:wikindx:34:12&lt;br /&gt;
:wikindx:56:34-35&lt;br /&gt;
&lt;br /&gt;
where the first number is the wikindx resource ID and the second number(s) is the page.  See README_CMS for instructions on how to add further parameters.&lt;br /&gt;
&lt;br /&gt;
6/ On displaying the moodle text, that markup is extracted and sent to the wikindx server (something like &#039;http://localhost/wikindx3/cmsprint.php?action=getResource&amp;amp;id=242&#039;) which then formats the requested resource and provides a string in return which would consist of a serialized/base64_encoded PHP multi-dimensional array which, when unpacked, would have something like the following (if APA for example):&lt;br /&gt;
::[13] =&amp;gt; Back, M., &amp;amp;amp; Des, D. (1996). Micro-narratives in sound design: Context and caricature in waveform manipulation. Retrieved March 12, 2004, from &amp;lt;a href=&amp;quot;http://www2.hku.nl/~audiogam/ag/articles/micronaratives.htm&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;http://www2.hku.nl/~aud&amp;amp;nbsp;...&amp;amp;nbsp;cles/micronaratives.htm&amp;lt;/a&amp;gt;.&lt;br /&gt;
::[54] =&amp;gt; Carr, D. (2003). Play dead: Genre and affect in silent hill and planescape torment. &amp;lt;em&amp;gt;Game Studies&amp;lt;/em&amp;gt;&amp;lt;em&amp;gt;, 3&amp;lt;/em&amp;gt;(1). Retrieved September 16, 2003, from &amp;lt;a href=&amp;quot;http://www.gamestudies.org/0301/carr/&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;http://www.gamestudies.org/0301/carr/&amp;lt;/a&amp;gt;. &lt;br /&gt;
::[2] =&amp;gt; Chion, M. (1992). Wasted words. In R. Altman (Ed.), &amp;lt;em&amp;gt;Sound Theory Sound Practice&amp;lt;/em&amp;gt; (pp. 104&amp;amp;ndash;110). New York: Routledge.&lt;br /&gt;
::[103] =&amp;gt; Chion, M. (1994). &amp;lt;em&amp;gt;Audio-vision: Sound on screen&amp;lt;/em&amp;gt; (C. Gorbman, Trans.) New York: Columbia University Press.&lt;br /&gt;
::[4] =&amp;gt; Truppin, A. (1992). And then there was sound: The films of Andrei Tarkovsky. In R. Altman (Ed.), &amp;lt;em&amp;gt;Sound Theory Sound Practice&amp;lt;/em&amp;gt; (pp. 235&amp;amp;ndash;248). New York: Routledge.&lt;br /&gt;
&lt;br /&gt;
Note that, depending upon the bibliographic style chosen in the WIKINDX&#039;s config.php, the results may contain HTML tags (as in the above example).  The key of each array member is the resource ID.&lt;br /&gt;
&lt;br /&gt;
WIKINDX may also be used to format a block of CMS text having appropriate replacement tags with in-text or footnote-style citations and an optional bibliography.  An example output from this might be:&lt;br /&gt;
&lt;br /&gt;
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis ligula lorem, consequat eget, tristique nec, auctor quis, purus. Vivamus  (Mayer &amp;amp; Moreno, 1998) ut sem. Fusce aliquam nunc vitae purus. Aenean viverra malesuada libero. Fusce ac quam. Donec neque. Nunc venenatis enim nec quam. Cras faucibus, justo vel accumsan aliquam, tellus dui fringilla quam, in condimentum augue lorem non tellus.  (Rittel &amp;amp; Webber, 1973) Pellentesque id arcu non sem placerat iaculis. Curabitur posuere  (Kullberg, 1991), pede vitae lacinia accumsan, enim nibh elementum orci, ut volutpat eros sapien nec sapien. Suspendisse neque arcu, ultrices commodo, pellentesque sit amet, ultricies ut, ipsum. Mauris et eros eget erat dapibus mollis. Mauris laoreet posuere odio. Nam ipsum ligula, ullamcorper eu, fringilla at, lacinia ut, augue. Nullam nunc.&lt;br /&gt;
&lt;br /&gt;
Kullberg, R. (1991). Dynamic timelines: Visualizing historical information in three dimensions. Unpublished master&#039;s thesis, Massachusetts Insititute of Technology.&lt;br /&gt;
Mayer, R. E., &amp;amp; Moreno, R. (1998). A split-attention effect in multimedia learning: Evidence for dual processing systems in working memory. Journal of Educational Psychology, 90(2), 312–320.&lt;br /&gt;
Rittel, R. W. J., &amp;amp; Webber, M. M. (1973). Dilemmas in a general theory of planning. Policy Sciences, 2(4), 155–169.&lt;br /&gt;
&lt;br /&gt;
See WIKINDX&#039;s README_CMS for further information and example PHP code.&lt;br /&gt;
&lt;br /&gt;
--[[User:Mark Grimshaw|Mark Grimshaw]] 01:27, 30 July 2007 (CDT)&lt;br /&gt;
&lt;br /&gt;
==Outline thoughts on integration...==&lt;br /&gt;
&lt;br /&gt;
1. Do we need to allowing a user already logged into a Moodle site to be seamlessly logged in to a wikindx? Or maybe just use the same login details between the two (like the way that Moodle.org and MoodleDocs works).  If necessary, something could be added to wikindx to enable this. In most cases though, with the right config settings, wikindx will allow any read only request without requiring login.&lt;br /&gt;
&lt;br /&gt;
2. Another issue is how to integrate the paper writing function of Wikindx into Moodle. What about use of the HTML editor? Could it be integrated some way with the Netpublish module? Imagine students or professors being able to use it to write academic papers and then publish those on the Moodle site.  Currently wikindx publishes papers solely to RTF.  It should be simple to publish to HTML since that&#039;s what the raw document is anyway (a matter of adding HTML header/footer, formatting citations and appending bibliographies -- most of this code is already in wikindx but not (yet) made available to the word processor).  Compared to other HTML editors, the only additional options wikindx offers in its version are buttons to import citations, metadata and insert footnotes.  All the rest (barring stats, timestamps, save etc.) are font/text formatting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note from DS: No, at present the Wikindx filter simply displays the text &amp;quot;wikindx:646&amp;quot; (for example). It&#039;s a very simple start and I hope that people with more knowledge of Wikindx will be able to modify it to extract the properly-formatted reference direct from Wikindx. If wikindx had a system whereby a certain URL call would supply the reference text in whatever style was configured for wikindx, this would be a good way to display the citation nicely within Moodle. Does such a call exist? I don&#039;t think so. Something like mywikindx.com/index.php?&#039;&#039;&#039;action=resourceGrabCitation&#039;&#039;&#039;&amp;amp;id=501 would be required.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note from JB: As the wikindx admin can set the default bibliographic style in the config, the filter will just present that style. The filter is simple but oh so useful! So when I type &#039;&#039;&#039;wikindx:1&#039;&#039;&#039; into my moodle installation, it creates an automatic link to http://www.baillie.org.uk/wikindx//index.php?action=resourceView&amp;amp;id=1&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note from MG: In wikindx, inserting a citation into metadata or the word processor involves clicking on an icon which opens a popup.  In this, there is a select box listing short entries of all available resources and some text fields for users to enter cited page numbers.  Perhaps something similar could be used in the moodle wikindx filter to avoid the hassle of having to look up the wikindx resource id before entering it into moodle.  This pop-up could also list the available citation/bibliographic styles on the wikindx allowing the user to select the style with which the citation should be formatted prior to insertion into moodle.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
4. Mark, your remarks in 2 have gotten me thinking. Although not everyone likes the Moodle HTML area editor that much, it still is the standard way of creating text in Moodle and perhaps a way of integrating Wikindx would be to add buttons for Wikindx to it, just like the kind described above in Wikindx&#039;s native editor. I needed to integrate a hieroglyph editor into my site and Janne Mikkonen helped me to add it through a button in the html editor that pops up a window, in which the student type the hieroglyphs they need, and then click a button to have them inserted back into the editor-similar to the way the insert image popup works. I would imagine something similar could be done with Wikindx. The advantage of this is that it would make Wikindx accessible anywhere within Moodle, rather than just as a separate module. You might also want a standalone module option whereby students could collaborate on creating bibliographies together.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note from MG: Adding the appropriate buttons would be my suggestion.  In wikindx, citations are added by the popup automatically adding something like&#039;&#039;&lt;br /&gt;
:&#039;&#039;[cite]146:22-23[/cite]&#039;&#039;&lt;br /&gt;
:&#039;&#039;where 146 is the resource ID in the database and 22-23 are the page nos. This can be added via a cite button or will be appended to an inserted quotation/paraphrase via the wikindx &#039;insert metadata&#039; button.  Footnotes (i.e. parenthetical thoughts as opposed to citation footnotes - WIKINDX does handle those footnotes/endnotes as well) are inserted via a button which encloses the inserted footnote in:&#039;&#039;&lt;br /&gt;
:&#039;&#039;[footnote]....[/footnote]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Exporting to RTF, the cite tags are substituted with the formatted citation marker (in-text or footnote/endnote), bibliographic information is extracted and appended to a bibliography and footnote tags are converted to RTF footnotes.  Of course, all HTML code (font/text formatting, tables, lists, images etc.) are converted to their appropriate RTF code too.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
5. Re the citation/bibliographic formatting, the PHP code for this has been extracted from wikindx and made available to other OSS apps at http://bibliophile.sourceforge.net (I think Aigaion and Bibliograph use it or are about to) so it may be easy enough for Moodle to use this too.  In fact doubly easy if moodle interfaces with a wikindx because the quickest way to set up the formatting engine is to provide data to it in exactly the same PHP associative array that wikindx natively expects.&lt;br /&gt;
&lt;br /&gt;
6. What capabilities are there in Wikindx at this time for different capabilities in using bibliographies? Can bibliographies be shared by a predefined group/all users? Can some people be given the ability to add to a bibliography while others can only use the bibilography? Can bibliography entries be required to have approval by some person before they are displayed to all? These would be nice features to have.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;MG: WIKINDX recognizes two types of bibliography; the master bibliography (MB) and user bibliographies (UB).  The MB holds the resources while UBs merely have references to resources from the MB.  Currently both the MB and UBs are readable by all users.  A UB is owned by a user and only he/she can add/delete references to resources.  All write enabled users can add to the MB.  Because I&#039;m aiming towards collaborative authoring in the word processor (SUWP), a long-standing feature to be implemented is to add user groups (i.e. research teams).  Then, the owner of a UB can add other users with write access to the UB and only those users can browse the UB.  Additionally, a user can make comments and musings private, shared with a group or public. Of course, a SUWP article can be shared among a group.  This hasn&#039;t been implemented yet -- I need to find someone familiar with wiki technology to help implement the collaborative authoring first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Wikindx]]&lt;/div&gt;</summary>
		<author><name>Geoffr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Wikindx&amp;diff=4831</id>
		<title>Wikindx</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Wikindx&amp;diff=4831"/>
		<updated>2007-09-21T18:28:45Z</updated>

		<summary type="html">&lt;p&gt;Geoffr: /* CMS Integration with WIKINDX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Notes on the possible integration of [http://wikindx.sourceforge.net/index2.html WIKINDX] with Moodle.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://wikindx.sourceforge.net/index2.html WIKINDX]is a free BiblioGraphic and quotations/notes management and article authoring system designed either for single use (on a variety of operating sytems) or multi-user collaborative use across the internet.&lt;br /&gt;
&lt;br /&gt;
Please also see the Moodle Discussion at http://moodle.org/mod/forum/discuss.php?d=23022&lt;br /&gt;
&lt;br /&gt;
==CMS Integration with WIKINDX==&lt;br /&gt;
&lt;br /&gt;
From MG:&lt;br /&gt;
WIKINDX 3.7 (released 29th July 2007) provides CMS &#039;hooks&#039; enabling any CMS using replacement tags or similar to include a range of WIKINDX output.  This output includes lists of resources selected and ordered by various parameters.&lt;br /&gt;
&lt;br /&gt;
Additionally, WIKINDX may be used to format a block of CMS text (containing the appropriate replacement tags) with either in-text or footnote-style citations and an appended bibliography.&lt;br /&gt;
&lt;br /&gt;
Finally, because the CMS hooks make use of WIKINDX ID numbers, WIKINDX (providing the option has been turned on in the user&#039;s Preferences) provides an interface to formulate the CMS replacement tag for a single WIKINDX resource and to interrogate the WIKINDX database for collection, creator, publisher etc. IDs.&lt;br /&gt;
&lt;br /&gt;
Once WIKINDX has been installed, the CMS scripter should read README_CMS.&lt;br /&gt;
&lt;br /&gt;
Still desired (but not absolutely necessary), is an interface to WIKINDX from within Moodle and design considerations for this are discussed below.&lt;br /&gt;
&lt;br /&gt;
==Wikindx filter for Moodle==&lt;br /&gt;
&lt;br /&gt;
From MG:&lt;br /&gt;
Dan&#039;s filter likely needs updating/altering in the light of WIKINDX 3.7.&lt;br /&gt;
&lt;br /&gt;
Dan Stowell has created a &amp;quot;Wikindx filter&amp;quot; for Moodle which allows you to cross-link to a wikindx entry by typing (for example) wikindx:646. The filter is in contrib CVS, named &amp;quot;filter_wikindx&amp;quot; or can be downloaded at http://download.moodle.org/download.php/modules/filter_wikindx.zip&lt;br /&gt;
&lt;br /&gt;
From MG:&lt;br /&gt;
Some design considerations for a moodle filter that enables a wikindx to be searched, a reference to be selected, page number(s) to be added and the in-text or footnote citation and full reference to be returned formatted to the user&#039;s requirements.  README_CMS in the WIKINDX install should be read in conjunction with this.  WIKINDX&#039;s config.php provides some initial CMS hook settings.&lt;br /&gt;
&lt;br /&gt;
1/ The Moodle filter needs to provide 3 basic functions:&lt;br /&gt;
:a) an icon in the HTML text editor that opens a pop-up,&lt;br /&gt;
:b) the pop up should provide a simple search/select interface to wikindx resources,&lt;br /&gt;
:c) once the selected wikindx resource has been inserted into the text, the moodle HTML editor text is saved and the filter sends the reference (and style and page number(s)) to wikindx for formatting and insertion into the moodle text.&lt;br /&gt;
&lt;br /&gt;
2/ Because what is supplied to the pop-up (see below) requires a connection to wikindx, the filter should have a config file for the wikindx database connection details.  wikindx 3.4 now allows admins to lock out read-only users so this config file may also have the option to add a wikindx username::password pair (I would not favour this though).&lt;br /&gt;
&lt;br /&gt;
3/ The search interface could be similar to the wikindx Quick Search interface less the ordering options (to save on space). [WIKINDX code (filling the pop-up)]&lt;br /&gt;
&lt;br /&gt;
4/ The results of a search should be displayed with multiple resources next to radio buttons, a select box to choose the formatting style and text boxes to enter page number(s).  Each radio button has a value that is the unique resource ID in the wikindx.  [WIKINDX code]&lt;br /&gt;
&lt;br /&gt;
5/ Once the appropriate resource has been selected and other details added, clicking on a &#039;process&#039; button will add the appropriate filter mark-up which &#039;&#039;may&#039;&#039; be something like:&lt;br /&gt;
:wikindx:34:12&lt;br /&gt;
:wikindx:56:34-35&lt;br /&gt;
&lt;br /&gt;
where the first number is the wikindx resource ID and the second number(s) is the page.  See README_CMS for instructions on how to add further parameters.&lt;br /&gt;
&lt;br /&gt;
6/ On displaying the moodle text, that markup is extracted and sent to the wikindx server (something like &#039;http://localhost/wikindx3/cmsprint.php?action=getResource&amp;amp;id=242&#039;) which then formats the requested resource and provides a string in return which would consist of a serialized/base64_encoded PHP multi-dimensional array which, when unpacked, would have something like the following (if APA for example):&lt;br /&gt;
::[13] =&amp;gt; Back, M., &amp;amp;amp; Des, D. (1996). Micro-narratives in sound design: Context and caricature in waveform manipulation. Retrieved March 12, 2004, from &amp;lt;a href=&amp;quot;http://www2.hku.nl/~audiogam/ag/articles/micronaratives.htm&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;http://www2.hku.nl/~aud&amp;amp;nbsp;...&amp;amp;nbsp;cles/micronaratives.htm&amp;lt;/a&amp;gt;.&lt;br /&gt;
::[54] =&amp;gt; Carr, D. (2003). Play dead: Genre and affect in silent hill and planescape torment. &amp;lt;em&amp;gt;Game Studies&amp;lt;/em&amp;gt;&amp;lt;em&amp;gt;, 3&amp;lt;/em&amp;gt;(1). Retrieved September 16, 2003, from &amp;lt;a href=&amp;quot;http://www.gamestudies.org/0301/carr/&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;http://www.gamestudies.org/0301/carr/&amp;lt;/a&amp;gt;. &lt;br /&gt;
::[2] =&amp;gt; Chion, M. (1992). Wasted words. In R. Altman (Ed.), &amp;lt;em&amp;gt;Sound Theory Sound Practice&amp;lt;/em&amp;gt; (pp. 104&amp;amp;ndash;110). New York: Routledge.&lt;br /&gt;
::[103] =&amp;gt; Chion, M. (1994). &amp;lt;em&amp;gt;Audio-vision: Sound on screen&amp;lt;/em&amp;gt; (C. Gorbman, Trans.) New York: Columbia University Press.&lt;br /&gt;
::[4] =&amp;gt; Truppin, A. (1992). And then there was sound: The films of Andrei Tarkovsky. In R. Altman (Ed.), &amp;lt;em&amp;gt;Sound Theory Sound Practice&amp;lt;/em&amp;gt; (pp. 235&amp;amp;ndash;248). New York: Routledge.&lt;br /&gt;
&lt;br /&gt;
Note that, depending upon the bibliographic style chosen in the WIKINDX&#039;s config.php, the results may contain HTML tags (as in the above example).  The key of each array member is the resource ID.&lt;br /&gt;
&lt;br /&gt;
WIKINDX may also be used to format a block of CMS text having appropriate replacement tags with in-text or footnote-style citations and an optional bibliography.  An example output from this might be:&lt;br /&gt;
&lt;br /&gt;
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis ligula lorem, consequat eget, tristique nec, auctor quis, purus. Vivamus  (Mayer &amp;amp; Moreno, 1998) ut sem. Fusce aliquam nunc vitae purus. Aenean viverra malesuada libero. Fusce ac quam. Donec neque. Nunc venenatis enim nec quam. Cras faucibus, justo vel accumsan aliquam, tellus dui fringilla quam, in condimentum augue lorem non tellus.  (Rittel &amp;amp; Webber, 1973) Pellentesque id arcu non sem placerat iaculis. Curabitur posuere  (Kullberg, 1991), pede vitae lacinia accumsan, enim nibh elementum orci, ut volutpat eros sapien nec sapien. Suspendisse neque arcu, ultrices commodo, pellentesque sit amet, ultricies ut, ipsum. Mauris et eros eget erat dapibus mollis. Mauris laoreet posuere odio. Nam ipsum ligula, ullamcorper eu, fringilla at, lacinia ut, augue. Nullam nunc.&lt;br /&gt;
&lt;br /&gt;
Kullberg, R. (1991). Dynamic timelines: Visualizing historical information in three dimensions. Unpublished master&#039;s thesis, Massachusetts Insititute of Technology.&lt;br /&gt;
Mayer, R. E., &amp;amp; Moreno, R. (1998). A split-attention effect in multimedia learning: Evidence for dual processing systems in working memory. Journal of Educational Psychology, 90(2), 312–320.&lt;br /&gt;
Rittel, R. W. J., &amp;amp; Webber, M. M. (1973). Dilemmas in a general theory of planning. Policy Sciences, 2(4), 155–169.&lt;br /&gt;
&lt;br /&gt;
See WIKINDX&#039;s README_CMS for further information and example PHP code.&lt;br /&gt;
&lt;br /&gt;
--[[User:Mark Grimshaw|Mark Grimshaw]] 01:27, 30 July 2007 (CDT)&lt;br /&gt;
&lt;br /&gt;
==Outline thoughts on integration...==&lt;br /&gt;
&lt;br /&gt;
1. Do we need to allowing a user already logged into a Moodle site to be seamlessly logged in to a wikindx? Or maybe just use the same login details between the two (like the way that Moodle.org and MoodleDocs works).  If necessary, something could be added to wikindx to enable this. In most cases though, with the right config settings, wikindx will allow any read only request without requiring login.&lt;br /&gt;
&lt;br /&gt;
2. Another issue is how to integrate the paper writing function of Wikindx into Moodle. What about use of the HTML editor? Could it be integrated some way with the Netpublish module? Imagine students or professors being able to use it to write academic papers and then publish those on the Moodle site.  Currently wikindx publishes papers solely to RTF.  It should be simple to publish to HTML since that&#039;s what the raw document is anyway (a matter of adding HTML header/footer, formatting citations and appending bibliographies -- most of this code is already in wikindx but not (yet) made available to the word processor).  Compared to other HTML editors, the only additional options wikindx offers in its version are buttons to import citations, metadata and insert footnotes.  All the rest (barring stats, timestamps, save etc.) are font/text formatting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note from DS: No, at present the Wikindx filter simply displays the text &amp;quot;wikindx:646&amp;quot; (for example). It&#039;s a very simple start and I hope that people with more knowledge of Wikindx will be able to modify it to extract the properly-formatted reference direct from Wikindx. If wikindx had a system whereby a certain URL call would supply the reference text in whatever style was configured for wikindx, this would be a good way to display the citation nicely within Moodle. Does such a call exist? I don&#039;t think so. Something like mywikindx.com/index.php?&#039;&#039;&#039;action=resourceGrabCitation&#039;&#039;&#039;&amp;amp;id=501 would be required.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note from JB: As the wikindx admin can set the default bibliographic style in the config, the filter will just present that style. The filter is simple but oh so useful! So when I type &#039;&#039;&#039;wikindx:1&#039;&#039;&#039; into my moodle installation, it creates an automatic link to http://www.baillie.org.uk/wikindx//index.php?action=resourceView&amp;amp;id=1&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note from MG: In wikindx, inserting a citation into metadata or the word processor involves clicking on an icon which opens a popup.  In this, there is a select box listing short entries of all available resources and some text fields for users to enter cited page numbers.  Perhaps something similar could be used in the moodle wikindx filter to avoid the hassle of having to look up the wikindx resource id before entering it into moodle.  This pop-up could also list the available citation/bibliographic styles on the wikindx allowing the user to select the style with which the citation should be formatted prior to insertion into moodle.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
4. Mark, your remarks in 2 have gotten me thinking. Although not everyone likes the Moodle HTML area editor that much, it still is the standard way of creating text in Moodle and perhaps a way of integrating Wikindx would be to add buttons for Wikindx to it, just like the kind described above in Wikindx&#039;s native editor. I needed to integrate a hieroglyph editor into my site and Janne Mikkonen helped me to add it through a button in the html editor that pops up a window, in which the student type the hieroglyphs they need, and then click a button to have them inserted back into the editor-similar to the way the insert image popup works. I would imagine something similar could be done with Wikindx. The advantage of this is that it would make Wikindx accessible anywhere within Moodle, rather than just as a separate module. You might also want a standalone module option whereby students could collaborate on creating bibliographies together.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note from MG: Adding the appropriate buttons would be my suggestion.  In wikindx, citations are added by the popup automatically adding something like&#039;&#039;&lt;br /&gt;
:&#039;&#039;[cite]146:22-23[/cite]&#039;&#039;&lt;br /&gt;
:&#039;&#039;where 146 is the resource ID in the database and 22-23 are the page nos. This can be added via a cite button or will be appended to an inserted quotation/paraphrase via the wikindx &#039;insert metadata&#039; button.  Footnotes (i.e. parenthetical thoughts as opposed to citation footnotes - WIKINDX does handle those footnotes/endnotes as well) are inserted via a button which encloses the inserted footnote in:&#039;&#039;&lt;br /&gt;
:&#039;&#039;[footnote]....[/footnote]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Exporting to RTF, the cite tags are substituted with the formatted citation marker (in-text or footnote/endnote), bibliographic information is extracted and appended to a bibliography and footnote tags are converted to RTF footnotes.  Of course, all HTML code (font/text formatting, tables, lists, images etc.) are converted to their appropriate RTF code too.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
5. Re the citation/bibliographic formatting, the PHP code for this has been extracted from wikindx and made available to other OSS apps at http://bibliophile.sourceforge.net (I think Aigaion and Bibliograph use it or are about to) so it may be easy enough for Moodle to use this too.  In fact doubly easy if moodle interfaces with a wikindx because the quickest way to set up the formatting engine is to provide data to it in exactly the same PHP associative array that wikindx natively expects.&lt;br /&gt;
&lt;br /&gt;
6. What capabilities are there in Wikindx at this time for different capabilities in using bibliographies? Can bibliographies be shared by a predefined group/all users? Can some people be given the ability to add to a bibliography while others can only use the bibilography? Can bibliography entries be required to have approval by some person before they are displayed to all? These would be nice features to have.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;MG: WIKINDX recognizes two types of bibliography; the master bibliography (MB) and user bibliographies (UB).  The MB holds the resources while UBs merely have references to resources from the MB.  Currently both the MB and UBs are readable by all users.  A UB is owned by a user and only he/she can add/delete references to resources.  All write enabled users can add to the MB.  Because I&#039;m aiming towards collaborative authoring in the word processor (SUWP), a long-standing feature to be implemented is to add user groups (i.e. research teams).  Then, the owner of a UB can add other users with write access to the UB and only those users can browse the UB.  Additionally, a user can make comments and musings private, shared with a group or public. Of course, a SUWP article can be shared among a group.  This hasn&#039;t been implemented yet -- I need to find someone familiar with wiki technology to help implement the collaborative authoring first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Wikindx]]&lt;/div&gt;</summary>
		<author><name>Geoffr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Wikindx&amp;diff=4830</id>
		<title>Wikindx</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Wikindx&amp;diff=4830"/>
		<updated>2007-09-21T18:26:37Z</updated>

		<summary type="html">&lt;p&gt;Geoffr: /* CMS Integration with WIKINDX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Notes on the possible integration of [http://wikindx.sourceforge.net/index2.html WIKINDX] with Moodle.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://wikindx.sourceforge.net/index2.html WIKINDX]is a free BiblioGraphic and quotations/notes management and article authoring system designed either for single use (on a variety of operating sytems) or multi-user collaborative use across the internet.&lt;br /&gt;
&lt;br /&gt;
Please also see the Moodle Discussion at http://moodle.org/mod/forum/discuss.php?d=23022&lt;br /&gt;
&lt;br /&gt;
==CMS Integration with WIKINDX==&lt;br /&gt;
&lt;br /&gt;
From MG:&lt;br /&gt;
WIKINDX 3.7 (released 29th July 2007) provides CMS &#039;hooks&#039; enabling any CMS using replacement tags or similar to include a range of WIKINDX output.  This output includes lists of resources selected and ordered by various parameters.&lt;br /&gt;
&lt;br /&gt;
Additionally, WIKINDX may be used to format a block of CMS text (containing the appropriate replacement tags) with either in-text or footnote-style citations and an appended bibliography.&lt;br /&gt;
&lt;br /&gt;
Finally, because the CMS hooks make use of WIKINDX ID numbers, WIKINDX (providing the option has been turned on in the user&#039;s Preferences) provides an interface to formulate the CMS replacement tag for a single WIKINDX resource and to interrogate the WIKINDX database for collection, creator, publisher etc. IDs.&lt;br /&gt;
&lt;br /&gt;
Once WIKINDX has been installed, the CMS scripter should read README_CMS.&lt;br /&gt;
&lt;br /&gt;
Still desired (but not absolutely necessary), is an interface to WIKINDX from within Moodle and design considerations for this are discussed below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From GR: Most of the capabilities discussed in this documentation have now been incorporated in the WIKINDX Bibliography Filter: http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=970&lt;br /&gt;
&lt;br /&gt;
Also see this discussion forum: http://moodle.org/mod/forum/discuss.php?d=76936&lt;br /&gt;
&lt;br /&gt;
==Wikindx filter for Moodle==&lt;br /&gt;
&lt;br /&gt;
From MG:&lt;br /&gt;
Dan&#039;s filter likely needs updating/altering in the light of WIKINDX 3.7.&lt;br /&gt;
&lt;br /&gt;
Dan Stowell has created a &amp;quot;Wikindx filter&amp;quot; for Moodle which allows you to cross-link to a wikindx entry by typing (for example) wikindx:646. The filter is in contrib CVS, named &amp;quot;filter_wikindx&amp;quot; or can be downloaded at http://download.moodle.org/download.php/modules/filter_wikindx.zip&lt;br /&gt;
&lt;br /&gt;
From MG:&lt;br /&gt;
Some design considerations for a moodle filter that enables a wikindx to be searched, a reference to be selected, page number(s) to be added and the in-text or footnote citation and full reference to be returned formatted to the user&#039;s requirements.  README_CMS in the WIKINDX install should be read in conjunction with this.  WIKINDX&#039;s config.php provides some initial CMS hook settings.&lt;br /&gt;
&lt;br /&gt;
1/ The Moodle filter needs to provide 3 basic functions:&lt;br /&gt;
:a) an icon in the HTML text editor that opens a pop-up,&lt;br /&gt;
:b) the pop up should provide a simple search/select interface to wikindx resources,&lt;br /&gt;
:c) once the selected wikindx resource has been inserted into the text, the moodle HTML editor text is saved and the filter sends the reference (and style and page number(s)) to wikindx for formatting and insertion into the moodle text.&lt;br /&gt;
&lt;br /&gt;
2/ Because what is supplied to the pop-up (see below) requires a connection to wikindx, the filter should have a config file for the wikindx database connection details.  wikindx 3.4 now allows admins to lock out read-only users so this config file may also have the option to add a wikindx username::password pair (I would not favour this though).&lt;br /&gt;
&lt;br /&gt;
3/ The search interface could be similar to the wikindx Quick Search interface less the ordering options (to save on space). [WIKINDX code (filling the pop-up)]&lt;br /&gt;
&lt;br /&gt;
4/ The results of a search should be displayed with multiple resources next to radio buttons, a select box to choose the formatting style and text boxes to enter page number(s).  Each radio button has a value that is the unique resource ID in the wikindx.  [WIKINDX code]&lt;br /&gt;
&lt;br /&gt;
5/ Once the appropriate resource has been selected and other details added, clicking on a &#039;process&#039; button will add the appropriate filter mark-up which &#039;&#039;may&#039;&#039; be something like:&lt;br /&gt;
:wikindx:34:12&lt;br /&gt;
:wikindx:56:34-35&lt;br /&gt;
&lt;br /&gt;
where the first number is the wikindx resource ID and the second number(s) is the page.  See README_CMS for instructions on how to add further parameters.&lt;br /&gt;
&lt;br /&gt;
6/ On displaying the moodle text, that markup is extracted and sent to the wikindx server (something like &#039;http://localhost/wikindx3/cmsprint.php?action=getResource&amp;amp;id=242&#039;) which then formats the requested resource and provides a string in return which would consist of a serialized/base64_encoded PHP multi-dimensional array which, when unpacked, would have something like the following (if APA for example):&lt;br /&gt;
::[13] =&amp;gt; Back, M., &amp;amp;amp; Des, D. (1996). Micro-narratives in sound design: Context and caricature in waveform manipulation. Retrieved March 12, 2004, from &amp;lt;a href=&amp;quot;http://www2.hku.nl/~audiogam/ag/articles/micronaratives.htm&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;http://www2.hku.nl/~aud&amp;amp;nbsp;...&amp;amp;nbsp;cles/micronaratives.htm&amp;lt;/a&amp;gt;.&lt;br /&gt;
::[54] =&amp;gt; Carr, D. (2003). Play dead: Genre and affect in silent hill and planescape torment. &amp;lt;em&amp;gt;Game Studies&amp;lt;/em&amp;gt;&amp;lt;em&amp;gt;, 3&amp;lt;/em&amp;gt;(1). Retrieved September 16, 2003, from &amp;lt;a href=&amp;quot;http://www.gamestudies.org/0301/carr/&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;http://www.gamestudies.org/0301/carr/&amp;lt;/a&amp;gt;. &lt;br /&gt;
::[2] =&amp;gt; Chion, M. (1992). Wasted words. In R. Altman (Ed.), &amp;lt;em&amp;gt;Sound Theory Sound Practice&amp;lt;/em&amp;gt; (pp. 104&amp;amp;ndash;110). New York: Routledge.&lt;br /&gt;
::[103] =&amp;gt; Chion, M. (1994). &amp;lt;em&amp;gt;Audio-vision: Sound on screen&amp;lt;/em&amp;gt; (C. Gorbman, Trans.) New York: Columbia University Press.&lt;br /&gt;
::[4] =&amp;gt; Truppin, A. (1992). And then there was sound: The films of Andrei Tarkovsky. In R. Altman (Ed.), &amp;lt;em&amp;gt;Sound Theory Sound Practice&amp;lt;/em&amp;gt; (pp. 235&amp;amp;ndash;248). New York: Routledge.&lt;br /&gt;
&lt;br /&gt;
Note that, depending upon the bibliographic style chosen in the WIKINDX&#039;s config.php, the results may contain HTML tags (as in the above example).  The key of each array member is the resource ID.&lt;br /&gt;
&lt;br /&gt;
WIKINDX may also be used to format a block of CMS text having appropriate replacement tags with in-text or footnote-style citations and an optional bibliography.  An example output from this might be:&lt;br /&gt;
&lt;br /&gt;
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis ligula lorem, consequat eget, tristique nec, auctor quis, purus. Vivamus  (Mayer &amp;amp; Moreno, 1998) ut sem. Fusce aliquam nunc vitae purus. Aenean viverra malesuada libero. Fusce ac quam. Donec neque. Nunc venenatis enim nec quam. Cras faucibus, justo vel accumsan aliquam, tellus dui fringilla quam, in condimentum augue lorem non tellus.  (Rittel &amp;amp; Webber, 1973) Pellentesque id arcu non sem placerat iaculis. Curabitur posuere  (Kullberg, 1991), pede vitae lacinia accumsan, enim nibh elementum orci, ut volutpat eros sapien nec sapien. Suspendisse neque arcu, ultrices commodo, pellentesque sit amet, ultricies ut, ipsum. Mauris et eros eget erat dapibus mollis. Mauris laoreet posuere odio. Nam ipsum ligula, ullamcorper eu, fringilla at, lacinia ut, augue. Nullam nunc.&lt;br /&gt;
&lt;br /&gt;
Kullberg, R. (1991). Dynamic timelines: Visualizing historical information in three dimensions. Unpublished master&#039;s thesis, Massachusetts Insititute of Technology.&lt;br /&gt;
Mayer, R. E., &amp;amp; Moreno, R. (1998). A split-attention effect in multimedia learning: Evidence for dual processing systems in working memory. Journal of Educational Psychology, 90(2), 312–320.&lt;br /&gt;
Rittel, R. W. J., &amp;amp; Webber, M. M. (1973). Dilemmas in a general theory of planning. Policy Sciences, 2(4), 155–169.&lt;br /&gt;
&lt;br /&gt;
See WIKINDX&#039;s README_CMS for further information and example PHP code.&lt;br /&gt;
&lt;br /&gt;
--[[User:Mark Grimshaw|Mark Grimshaw]] 01:27, 30 July 2007 (CDT)&lt;br /&gt;
&lt;br /&gt;
==Outline thoughts on integration...==&lt;br /&gt;
&lt;br /&gt;
1. Do we need to allowing a user already logged into a Moodle site to be seamlessly logged in to a wikindx? Or maybe just use the same login details between the two (like the way that Moodle.org and MoodleDocs works).  If necessary, something could be added to wikindx to enable this. In most cases though, with the right config settings, wikindx will allow any read only request without requiring login.&lt;br /&gt;
&lt;br /&gt;
2. Another issue is how to integrate the paper writing function of Wikindx into Moodle. What about use of the HTML editor? Could it be integrated some way with the Netpublish module? Imagine students or professors being able to use it to write academic papers and then publish those on the Moodle site.  Currently wikindx publishes papers solely to RTF.  It should be simple to publish to HTML since that&#039;s what the raw document is anyway (a matter of adding HTML header/footer, formatting citations and appending bibliographies -- most of this code is already in wikindx but not (yet) made available to the word processor).  Compared to other HTML editors, the only additional options wikindx offers in its version are buttons to import citations, metadata and insert footnotes.  All the rest (barring stats, timestamps, save etc.) are font/text formatting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note from DS: No, at present the Wikindx filter simply displays the text &amp;quot;wikindx:646&amp;quot; (for example). It&#039;s a very simple start and I hope that people with more knowledge of Wikindx will be able to modify it to extract the properly-formatted reference direct from Wikindx. If wikindx had a system whereby a certain URL call would supply the reference text in whatever style was configured for wikindx, this would be a good way to display the citation nicely within Moodle. Does such a call exist? I don&#039;t think so. Something like mywikindx.com/index.php?&#039;&#039;&#039;action=resourceGrabCitation&#039;&#039;&#039;&amp;amp;id=501 would be required.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note from JB: As the wikindx admin can set the default bibliographic style in the config, the filter will just present that style. The filter is simple but oh so useful! So when I type &#039;&#039;&#039;wikindx:1&#039;&#039;&#039; into my moodle installation, it creates an automatic link to http://www.baillie.org.uk/wikindx//index.php?action=resourceView&amp;amp;id=1&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note from MG: In wikindx, inserting a citation into metadata or the word processor involves clicking on an icon which opens a popup.  In this, there is a select box listing short entries of all available resources and some text fields for users to enter cited page numbers.  Perhaps something similar could be used in the moodle wikindx filter to avoid the hassle of having to look up the wikindx resource id before entering it into moodle.  This pop-up could also list the available citation/bibliographic styles on the wikindx allowing the user to select the style with which the citation should be formatted prior to insertion into moodle.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
4. Mark, your remarks in 2 have gotten me thinking. Although not everyone likes the Moodle HTML area editor that much, it still is the standard way of creating text in Moodle and perhaps a way of integrating Wikindx would be to add buttons for Wikindx to it, just like the kind described above in Wikindx&#039;s native editor. I needed to integrate a hieroglyph editor into my site and Janne Mikkonen helped me to add it through a button in the html editor that pops up a window, in which the student type the hieroglyphs they need, and then click a button to have them inserted back into the editor-similar to the way the insert image popup works. I would imagine something similar could be done with Wikindx. The advantage of this is that it would make Wikindx accessible anywhere within Moodle, rather than just as a separate module. You might also want a standalone module option whereby students could collaborate on creating bibliographies together.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note from MG: Adding the appropriate buttons would be my suggestion.  In wikindx, citations are added by the popup automatically adding something like&#039;&#039;&lt;br /&gt;
:&#039;&#039;[cite]146:22-23[/cite]&#039;&#039;&lt;br /&gt;
:&#039;&#039;where 146 is the resource ID in the database and 22-23 are the page nos. This can be added via a cite button or will be appended to an inserted quotation/paraphrase via the wikindx &#039;insert metadata&#039; button.  Footnotes (i.e. parenthetical thoughts as opposed to citation footnotes - WIKINDX does handle those footnotes/endnotes as well) are inserted via a button which encloses the inserted footnote in:&#039;&#039;&lt;br /&gt;
:&#039;&#039;[footnote]....[/footnote]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Exporting to RTF, the cite tags are substituted with the formatted citation marker (in-text or footnote/endnote), bibliographic information is extracted and appended to a bibliography and footnote tags are converted to RTF footnotes.  Of course, all HTML code (font/text formatting, tables, lists, images etc.) are converted to their appropriate RTF code too.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
5. Re the citation/bibliographic formatting, the PHP code for this has been extracted from wikindx and made available to other OSS apps at http://bibliophile.sourceforge.net (I think Aigaion and Bibliograph use it or are about to) so it may be easy enough for Moodle to use this too.  In fact doubly easy if moodle interfaces with a wikindx because the quickest way to set up the formatting engine is to provide data to it in exactly the same PHP associative array that wikindx natively expects.&lt;br /&gt;
&lt;br /&gt;
6. What capabilities are there in Wikindx at this time for different capabilities in using bibliographies? Can bibliographies be shared by a predefined group/all users? Can some people be given the ability to add to a bibliography while others can only use the bibilography? Can bibliography entries be required to have approval by some person before they are displayed to all? These would be nice features to have.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;MG: WIKINDX recognizes two types of bibliography; the master bibliography (MB) and user bibliographies (UB).  The MB holds the resources while UBs merely have references to resources from the MB.  Currently both the MB and UBs are readable by all users.  A UB is owned by a user and only he/she can add/delete references to resources.  All write enabled users can add to the MB.  Because I&#039;m aiming towards collaborative authoring in the word processor (SUWP), a long-standing feature to be implemented is to add user groups (i.e. research teams).  Then, the owner of a UB can add other users with write access to the UB and only those users can browse the UB.  Additionally, a user can make comments and musings private, shared with a group or public. Of course, a SUWP article can be shared among a group.  This hasn&#039;t been implemented yet -- I need to find someone familiar with wiki technology to help implement the collaborative authoring first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Wikindx]]&lt;/div&gt;</summary>
		<author><name>Geoffr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Wikindx&amp;diff=4829</id>
		<title>Wikindx</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Wikindx&amp;diff=4829"/>
		<updated>2007-09-21T18:25:24Z</updated>

		<summary type="html">&lt;p&gt;Geoffr: /* CMS Integration with WIKINDX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Notes on the possible integration of [http://wikindx.sourceforge.net/index2.html WIKINDX] with Moodle.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://wikindx.sourceforge.net/index2.html WIKINDX]is a free BiblioGraphic and quotations/notes management and article authoring system designed either for single use (on a variety of operating sytems) or multi-user collaborative use across the internet.&lt;br /&gt;
&lt;br /&gt;
Please also see the Moodle Discussion at http://moodle.org/mod/forum/discuss.php?d=23022&lt;br /&gt;
&lt;br /&gt;
==CMS Integration with WIKINDX==&lt;br /&gt;
&lt;br /&gt;
From MG:&lt;br /&gt;
WIKINDX 3.7 (released 29th July 2007) provides CMS &#039;hooks&#039; enabling any CMS using replacement tags or similar to include a range of WIKINDX output.  This output includes lists of resources selected and ordered by various parameters.&lt;br /&gt;
&lt;br /&gt;
Additionally, WIKINDX may be used to format a block of CMS text (containing the appropriate replacement tags) with either in-text or footnote-style citations and an appended bibliography.&lt;br /&gt;
&lt;br /&gt;
Finally, because the CMS hooks make use of WIKINDX ID numbers, WIKINDX (providing the option has been turned on in the user&#039;s Preferences) provides an interface to formulate the CMS replacement tag for a single WIKINDX resource and to interrogate the WIKINDX database for collection, creator, publisher etc. IDs.&lt;br /&gt;
&lt;br /&gt;
Once WIKINDX has been installed, the CMS scripter should read README_CMS.&lt;br /&gt;
&lt;br /&gt;
Still desired (but not absolutely necessary), is an interface to WIKINDX from within Moodle and design considerations for this are discussed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
From GR: Most of the capabilities discussed in this documentation have now been incorporated in the WIKINDX Bibliography Filter: http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=970&lt;br /&gt;
&lt;br /&gt;
Also see this discussion forum: http://moodle.org/mod/forum/discuss.php?d=76936&lt;br /&gt;
&lt;br /&gt;
==Wikindx filter for Moodle==&lt;br /&gt;
&lt;br /&gt;
From MG:&lt;br /&gt;
Dan&#039;s filter likely needs updating/altering in the light of WIKINDX 3.7.&lt;br /&gt;
&lt;br /&gt;
Dan Stowell has created a &amp;quot;Wikindx filter&amp;quot; for Moodle which allows you to cross-link to a wikindx entry by typing (for example) wikindx:646. The filter is in contrib CVS, named &amp;quot;filter_wikindx&amp;quot; or can be downloaded at http://download.moodle.org/download.php/modules/filter_wikindx.zip&lt;br /&gt;
&lt;br /&gt;
From MG:&lt;br /&gt;
Some design considerations for a moodle filter that enables a wikindx to be searched, a reference to be selected, page number(s) to be added and the in-text or footnote citation and full reference to be returned formatted to the user&#039;s requirements.  README_CMS in the WIKINDX install should be read in conjunction with this.  WIKINDX&#039;s config.php provides some initial CMS hook settings.&lt;br /&gt;
&lt;br /&gt;
1/ The Moodle filter needs to provide 3 basic functions:&lt;br /&gt;
:a) an icon in the HTML text editor that opens a pop-up,&lt;br /&gt;
:b) the pop up should provide a simple search/select interface to wikindx resources,&lt;br /&gt;
:c) once the selected wikindx resource has been inserted into the text, the moodle HTML editor text is saved and the filter sends the reference (and style and page number(s)) to wikindx for formatting and insertion into the moodle text.&lt;br /&gt;
&lt;br /&gt;
2/ Because what is supplied to the pop-up (see below) requires a connection to wikindx, the filter should have a config file for the wikindx database connection details.  wikindx 3.4 now allows admins to lock out read-only users so this config file may also have the option to add a wikindx username::password pair (I would not favour this though).&lt;br /&gt;
&lt;br /&gt;
3/ The search interface could be similar to the wikindx Quick Search interface less the ordering options (to save on space). [WIKINDX code (filling the pop-up)]&lt;br /&gt;
&lt;br /&gt;
4/ The results of a search should be displayed with multiple resources next to radio buttons, a select box to choose the formatting style and text boxes to enter page number(s).  Each radio button has a value that is the unique resource ID in the wikindx.  [WIKINDX code]&lt;br /&gt;
&lt;br /&gt;
5/ Once the appropriate resource has been selected and other details added, clicking on a &#039;process&#039; button will add the appropriate filter mark-up which &#039;&#039;may&#039;&#039; be something like:&lt;br /&gt;
:wikindx:34:12&lt;br /&gt;
:wikindx:56:34-35&lt;br /&gt;
&lt;br /&gt;
where the first number is the wikindx resource ID and the second number(s) is the page.  See README_CMS for instructions on how to add further parameters.&lt;br /&gt;
&lt;br /&gt;
6/ On displaying the moodle text, that markup is extracted and sent to the wikindx server (something like &#039;http://localhost/wikindx3/cmsprint.php?action=getResource&amp;amp;id=242&#039;) which then formats the requested resource and provides a string in return which would consist of a serialized/base64_encoded PHP multi-dimensional array which, when unpacked, would have something like the following (if APA for example):&lt;br /&gt;
::[13] =&amp;gt; Back, M., &amp;amp;amp; Des, D. (1996). Micro-narratives in sound design: Context and caricature in waveform manipulation. Retrieved March 12, 2004, from &amp;lt;a href=&amp;quot;http://www2.hku.nl/~audiogam/ag/articles/micronaratives.htm&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;http://www2.hku.nl/~aud&amp;amp;nbsp;...&amp;amp;nbsp;cles/micronaratives.htm&amp;lt;/a&amp;gt;.&lt;br /&gt;
::[54] =&amp;gt; Carr, D. (2003). Play dead: Genre and affect in silent hill and planescape torment. &amp;lt;em&amp;gt;Game Studies&amp;lt;/em&amp;gt;&amp;lt;em&amp;gt;, 3&amp;lt;/em&amp;gt;(1). Retrieved September 16, 2003, from &amp;lt;a href=&amp;quot;http://www.gamestudies.org/0301/carr/&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;http://www.gamestudies.org/0301/carr/&amp;lt;/a&amp;gt;. &lt;br /&gt;
::[2] =&amp;gt; Chion, M. (1992). Wasted words. In R. Altman (Ed.), &amp;lt;em&amp;gt;Sound Theory Sound Practice&amp;lt;/em&amp;gt; (pp. 104&amp;amp;ndash;110). New York: Routledge.&lt;br /&gt;
::[103] =&amp;gt; Chion, M. (1994). &amp;lt;em&amp;gt;Audio-vision: Sound on screen&amp;lt;/em&amp;gt; (C. Gorbman, Trans.) New York: Columbia University Press.&lt;br /&gt;
::[4] =&amp;gt; Truppin, A. (1992). And then there was sound: The films of Andrei Tarkovsky. In R. Altman (Ed.), &amp;lt;em&amp;gt;Sound Theory Sound Practice&amp;lt;/em&amp;gt; (pp. 235&amp;amp;ndash;248). New York: Routledge.&lt;br /&gt;
&lt;br /&gt;
Note that, depending upon the bibliographic style chosen in the WIKINDX&#039;s config.php, the results may contain HTML tags (as in the above example).  The key of each array member is the resource ID.&lt;br /&gt;
&lt;br /&gt;
WIKINDX may also be used to format a block of CMS text having appropriate replacement tags with in-text or footnote-style citations and an optional bibliography.  An example output from this might be:&lt;br /&gt;
&lt;br /&gt;
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis ligula lorem, consequat eget, tristique nec, auctor quis, purus. Vivamus  (Mayer &amp;amp; Moreno, 1998) ut sem. Fusce aliquam nunc vitae purus. Aenean viverra malesuada libero. Fusce ac quam. Donec neque. Nunc venenatis enim nec quam. Cras faucibus, justo vel accumsan aliquam, tellus dui fringilla quam, in condimentum augue lorem non tellus.  (Rittel &amp;amp; Webber, 1973) Pellentesque id arcu non sem placerat iaculis. Curabitur posuere  (Kullberg, 1991), pede vitae lacinia accumsan, enim nibh elementum orci, ut volutpat eros sapien nec sapien. Suspendisse neque arcu, ultrices commodo, pellentesque sit amet, ultricies ut, ipsum. Mauris et eros eget erat dapibus mollis. Mauris laoreet posuere odio. Nam ipsum ligula, ullamcorper eu, fringilla at, lacinia ut, augue. Nullam nunc.&lt;br /&gt;
&lt;br /&gt;
Kullberg, R. (1991). Dynamic timelines: Visualizing historical information in three dimensions. Unpublished master&#039;s thesis, Massachusetts Insititute of Technology.&lt;br /&gt;
Mayer, R. E., &amp;amp; Moreno, R. (1998). A split-attention effect in multimedia learning: Evidence for dual processing systems in working memory. Journal of Educational Psychology, 90(2), 312–320.&lt;br /&gt;
Rittel, R. W. J., &amp;amp; Webber, M. M. (1973). Dilemmas in a general theory of planning. Policy Sciences, 2(4), 155–169.&lt;br /&gt;
&lt;br /&gt;
See WIKINDX&#039;s README_CMS for further information and example PHP code.&lt;br /&gt;
&lt;br /&gt;
--[[User:Mark Grimshaw|Mark Grimshaw]] 01:27, 30 July 2007 (CDT)&lt;br /&gt;
&lt;br /&gt;
==Outline thoughts on integration...==&lt;br /&gt;
&lt;br /&gt;
1. Do we need to allowing a user already logged into a Moodle site to be seamlessly logged in to a wikindx? Or maybe just use the same login details between the two (like the way that Moodle.org and MoodleDocs works).  If necessary, something could be added to wikindx to enable this. In most cases though, with the right config settings, wikindx will allow any read only request without requiring login.&lt;br /&gt;
&lt;br /&gt;
2. Another issue is how to integrate the paper writing function of Wikindx into Moodle. What about use of the HTML editor? Could it be integrated some way with the Netpublish module? Imagine students or professors being able to use it to write academic papers and then publish those on the Moodle site.  Currently wikindx publishes papers solely to RTF.  It should be simple to publish to HTML since that&#039;s what the raw document is anyway (a matter of adding HTML header/footer, formatting citations and appending bibliographies -- most of this code is already in wikindx but not (yet) made available to the word processor).  Compared to other HTML editors, the only additional options wikindx offers in its version are buttons to import citations, metadata and insert footnotes.  All the rest (barring stats, timestamps, save etc.) are font/text formatting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note from DS: No, at present the Wikindx filter simply displays the text &amp;quot;wikindx:646&amp;quot; (for example). It&#039;s a very simple start and I hope that people with more knowledge of Wikindx will be able to modify it to extract the properly-formatted reference direct from Wikindx. If wikindx had a system whereby a certain URL call would supply the reference text in whatever style was configured for wikindx, this would be a good way to display the citation nicely within Moodle. Does such a call exist? I don&#039;t think so. Something like mywikindx.com/index.php?&#039;&#039;&#039;action=resourceGrabCitation&#039;&#039;&#039;&amp;amp;id=501 would be required.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note from JB: As the wikindx admin can set the default bibliographic style in the config, the filter will just present that style. The filter is simple but oh so useful! So when I type &#039;&#039;&#039;wikindx:1&#039;&#039;&#039; into my moodle installation, it creates an automatic link to http://www.baillie.org.uk/wikindx//index.php?action=resourceView&amp;amp;id=1&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note from MG: In wikindx, inserting a citation into metadata or the word processor involves clicking on an icon which opens a popup.  In this, there is a select box listing short entries of all available resources and some text fields for users to enter cited page numbers.  Perhaps something similar could be used in the moodle wikindx filter to avoid the hassle of having to look up the wikindx resource id before entering it into moodle.  This pop-up could also list the available citation/bibliographic styles on the wikindx allowing the user to select the style with which the citation should be formatted prior to insertion into moodle.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
4. Mark, your remarks in 2 have gotten me thinking. Although not everyone likes the Moodle HTML area editor that much, it still is the standard way of creating text in Moodle and perhaps a way of integrating Wikindx would be to add buttons for Wikindx to it, just like the kind described above in Wikindx&#039;s native editor. I needed to integrate a hieroglyph editor into my site and Janne Mikkonen helped me to add it through a button in the html editor that pops up a window, in which the student type the hieroglyphs they need, and then click a button to have them inserted back into the editor-similar to the way the insert image popup works. I would imagine something similar could be done with Wikindx. The advantage of this is that it would make Wikindx accessible anywhere within Moodle, rather than just as a separate module. You might also want a standalone module option whereby students could collaborate on creating bibliographies together.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note from MG: Adding the appropriate buttons would be my suggestion.  In wikindx, citations are added by the popup automatically adding something like&#039;&#039;&lt;br /&gt;
:&#039;&#039;[cite]146:22-23[/cite]&#039;&#039;&lt;br /&gt;
:&#039;&#039;where 146 is the resource ID in the database and 22-23 are the page nos. This can be added via a cite button or will be appended to an inserted quotation/paraphrase via the wikindx &#039;insert metadata&#039; button.  Footnotes (i.e. parenthetical thoughts as opposed to citation footnotes - WIKINDX does handle those footnotes/endnotes as well) are inserted via a button which encloses the inserted footnote in:&#039;&#039;&lt;br /&gt;
:&#039;&#039;[footnote]....[/footnote]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Exporting to RTF, the cite tags are substituted with the formatted citation marker (in-text or footnote/endnote), bibliographic information is extracted and appended to a bibliography and footnote tags are converted to RTF footnotes.  Of course, all HTML code (font/text formatting, tables, lists, images etc.) are converted to their appropriate RTF code too.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
5. Re the citation/bibliographic formatting, the PHP code for this has been extracted from wikindx and made available to other OSS apps at http://bibliophile.sourceforge.net (I think Aigaion and Bibliograph use it or are about to) so it may be easy enough for Moodle to use this too.  In fact doubly easy if moodle interfaces with a wikindx because the quickest way to set up the formatting engine is to provide data to it in exactly the same PHP associative array that wikindx natively expects.&lt;br /&gt;
&lt;br /&gt;
6. What capabilities are there in Wikindx at this time for different capabilities in using bibliographies? Can bibliographies be shared by a predefined group/all users? Can some people be given the ability to add to a bibliography while others can only use the bibilography? Can bibliography entries be required to have approval by some person before they are displayed to all? These would be nice features to have.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;MG: WIKINDX recognizes two types of bibliography; the master bibliography (MB) and user bibliographies (UB).  The MB holds the resources while UBs merely have references to resources from the MB.  Currently both the MB and UBs are readable by all users.  A UB is owned by a user and only he/she can add/delete references to resources.  All write enabled users can add to the MB.  Because I&#039;m aiming towards collaborative authoring in the word processor (SUWP), a long-standing feature to be implemented is to add user groups (i.e. research teams).  Then, the owner of a UB can add other users with write access to the UB and only those users can browse the UB.  Additionally, a user can make comments and musings private, shared with a group or public. Of course, a SUWP article can be shared among a group.  This hasn&#039;t been implemented yet -- I need to find someone familiar with wiki technology to help implement the collaborative authoring first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Wikindx]]&lt;/div&gt;</summary>
		<author><name>Geoffr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Wikindx&amp;diff=4828</id>
		<title>Wikindx</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Wikindx&amp;diff=4828"/>
		<updated>2007-09-21T18:24:21Z</updated>

		<summary type="html">&lt;p&gt;Geoffr: /* CMS Integration with WIKINDX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Notes on the possible integration of [http://wikindx.sourceforge.net/index2.html WIKINDX] with Moodle.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://wikindx.sourceforge.net/index2.html WIKINDX]is a free BiblioGraphic and quotations/notes management and article authoring system designed either for single use (on a variety of operating sytems) or multi-user collaborative use across the internet.&lt;br /&gt;
&lt;br /&gt;
Please also see the Moodle Discussion at http://moodle.org/mod/forum/discuss.php?d=23022&lt;br /&gt;
&lt;br /&gt;
==CMS Integration with WIKINDX==&lt;br /&gt;
&lt;br /&gt;
From MG:&lt;br /&gt;
WIKINDX 3.7 (released 29th July 2007) provides CMS &#039;hooks&#039; enabling any CMS using replacement tags or similar to include a range of WIKINDX output.  This output includes lists of resources selected and ordered by various parameters.&lt;br /&gt;
&lt;br /&gt;
Additionally, WIKINDX may be used to format a block of CMS text (containing the appropriate replacement tags) with either in-text or footnote-style citations and an appended bibliography.&lt;br /&gt;
&lt;br /&gt;
Finally, because the CMS hooks make use of WIKINDX ID numbers, WIKINDX (providing the option has been turned on in the user&#039;s Preferences) provides an interface to formulate the CMS replacement tag for a single WIKINDX resource and to interrogate the WIKINDX database for collection, creator, publisher etc. IDs.&lt;br /&gt;
&lt;br /&gt;
Once WIKINDX has been installed, the CMS scripter should read README_CMS.&lt;br /&gt;
&lt;br /&gt;
Still desired (but not absolutely necessary), is an interface to WIKINDX from within Moodle and design considerations for this are discussed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
From GR: Most of the capabilities discussed in this documentation have now been incorporated in the [WIKINDX Bibliography Filter http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=970]&lt;br /&gt;
&lt;br /&gt;
Also see this [discussion forum]http://moodle.org/mod/forum/discuss.php?d=76936&lt;br /&gt;
&lt;br /&gt;
==Wikindx filter for Moodle==&lt;br /&gt;
&lt;br /&gt;
From MG:&lt;br /&gt;
Dan&#039;s filter likely needs updating/altering in the light of WIKINDX 3.7.&lt;br /&gt;
&lt;br /&gt;
Dan Stowell has created a &amp;quot;Wikindx filter&amp;quot; for Moodle which allows you to cross-link to a wikindx entry by typing (for example) wikindx:646. The filter is in contrib CVS, named &amp;quot;filter_wikindx&amp;quot; or can be downloaded at http://download.moodle.org/download.php/modules/filter_wikindx.zip&lt;br /&gt;
&lt;br /&gt;
From MG:&lt;br /&gt;
Some design considerations for a moodle filter that enables a wikindx to be searched, a reference to be selected, page number(s) to be added and the in-text or footnote citation and full reference to be returned formatted to the user&#039;s requirements.  README_CMS in the WIKINDX install should be read in conjunction with this.  WIKINDX&#039;s config.php provides some initial CMS hook settings.&lt;br /&gt;
&lt;br /&gt;
1/ The Moodle filter needs to provide 3 basic functions:&lt;br /&gt;
:a) an icon in the HTML text editor that opens a pop-up,&lt;br /&gt;
:b) the pop up should provide a simple search/select interface to wikindx resources,&lt;br /&gt;
:c) once the selected wikindx resource has been inserted into the text, the moodle HTML editor text is saved and the filter sends the reference (and style and page number(s)) to wikindx for formatting and insertion into the moodle text.&lt;br /&gt;
&lt;br /&gt;
2/ Because what is supplied to the pop-up (see below) requires a connection to wikindx, the filter should have a config file for the wikindx database connection details.  wikindx 3.4 now allows admins to lock out read-only users so this config file may also have the option to add a wikindx username::password pair (I would not favour this though).&lt;br /&gt;
&lt;br /&gt;
3/ The search interface could be similar to the wikindx Quick Search interface less the ordering options (to save on space). [WIKINDX code (filling the pop-up)]&lt;br /&gt;
&lt;br /&gt;
4/ The results of a search should be displayed with multiple resources next to radio buttons, a select box to choose the formatting style and text boxes to enter page number(s).  Each radio button has a value that is the unique resource ID in the wikindx.  [WIKINDX code]&lt;br /&gt;
&lt;br /&gt;
5/ Once the appropriate resource has been selected and other details added, clicking on a &#039;process&#039; button will add the appropriate filter mark-up which &#039;&#039;may&#039;&#039; be something like:&lt;br /&gt;
:wikindx:34:12&lt;br /&gt;
:wikindx:56:34-35&lt;br /&gt;
&lt;br /&gt;
where the first number is the wikindx resource ID and the second number(s) is the page.  See README_CMS for instructions on how to add further parameters.&lt;br /&gt;
&lt;br /&gt;
6/ On displaying the moodle text, that markup is extracted and sent to the wikindx server (something like &#039;http://localhost/wikindx3/cmsprint.php?action=getResource&amp;amp;id=242&#039;) which then formats the requested resource and provides a string in return which would consist of a serialized/base64_encoded PHP multi-dimensional array which, when unpacked, would have something like the following (if APA for example):&lt;br /&gt;
::[13] =&amp;gt; Back, M., &amp;amp;amp; Des, D. (1996). Micro-narratives in sound design: Context and caricature in waveform manipulation. Retrieved March 12, 2004, from &amp;lt;a href=&amp;quot;http://www2.hku.nl/~audiogam/ag/articles/micronaratives.htm&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;http://www2.hku.nl/~aud&amp;amp;nbsp;...&amp;amp;nbsp;cles/micronaratives.htm&amp;lt;/a&amp;gt;.&lt;br /&gt;
::[54] =&amp;gt; Carr, D. (2003). Play dead: Genre and affect in silent hill and planescape torment. &amp;lt;em&amp;gt;Game Studies&amp;lt;/em&amp;gt;&amp;lt;em&amp;gt;, 3&amp;lt;/em&amp;gt;(1). Retrieved September 16, 2003, from &amp;lt;a href=&amp;quot;http://www.gamestudies.org/0301/carr/&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;http://www.gamestudies.org/0301/carr/&amp;lt;/a&amp;gt;. &lt;br /&gt;
::[2] =&amp;gt; Chion, M. (1992). Wasted words. In R. Altman (Ed.), &amp;lt;em&amp;gt;Sound Theory Sound Practice&amp;lt;/em&amp;gt; (pp. 104&amp;amp;ndash;110). New York: Routledge.&lt;br /&gt;
::[103] =&amp;gt; Chion, M. (1994). &amp;lt;em&amp;gt;Audio-vision: Sound on screen&amp;lt;/em&amp;gt; (C. Gorbman, Trans.) New York: Columbia University Press.&lt;br /&gt;
::[4] =&amp;gt; Truppin, A. (1992). And then there was sound: The films of Andrei Tarkovsky. In R. Altman (Ed.), &amp;lt;em&amp;gt;Sound Theory Sound Practice&amp;lt;/em&amp;gt; (pp. 235&amp;amp;ndash;248). New York: Routledge.&lt;br /&gt;
&lt;br /&gt;
Note that, depending upon the bibliographic style chosen in the WIKINDX&#039;s config.php, the results may contain HTML tags (as in the above example).  The key of each array member is the resource ID.&lt;br /&gt;
&lt;br /&gt;
WIKINDX may also be used to format a block of CMS text having appropriate replacement tags with in-text or footnote-style citations and an optional bibliography.  An example output from this might be:&lt;br /&gt;
&lt;br /&gt;
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis ligula lorem, consequat eget, tristique nec, auctor quis, purus. Vivamus  (Mayer &amp;amp; Moreno, 1998) ut sem. Fusce aliquam nunc vitae purus. Aenean viverra malesuada libero. Fusce ac quam. Donec neque. Nunc venenatis enim nec quam. Cras faucibus, justo vel accumsan aliquam, tellus dui fringilla quam, in condimentum augue lorem non tellus.  (Rittel &amp;amp; Webber, 1973) Pellentesque id arcu non sem placerat iaculis. Curabitur posuere  (Kullberg, 1991), pede vitae lacinia accumsan, enim nibh elementum orci, ut volutpat eros sapien nec sapien. Suspendisse neque arcu, ultrices commodo, pellentesque sit amet, ultricies ut, ipsum. Mauris et eros eget erat dapibus mollis. Mauris laoreet posuere odio. Nam ipsum ligula, ullamcorper eu, fringilla at, lacinia ut, augue. Nullam nunc.&lt;br /&gt;
&lt;br /&gt;
Kullberg, R. (1991). Dynamic timelines: Visualizing historical information in three dimensions. Unpublished master&#039;s thesis, Massachusetts Insititute of Technology.&lt;br /&gt;
Mayer, R. E., &amp;amp; Moreno, R. (1998). A split-attention effect in multimedia learning: Evidence for dual processing systems in working memory. Journal of Educational Psychology, 90(2), 312–320.&lt;br /&gt;
Rittel, R. W. J., &amp;amp; Webber, M. M. (1973). Dilemmas in a general theory of planning. Policy Sciences, 2(4), 155–169.&lt;br /&gt;
&lt;br /&gt;
See WIKINDX&#039;s README_CMS for further information and example PHP code.&lt;br /&gt;
&lt;br /&gt;
--[[User:Mark Grimshaw|Mark Grimshaw]] 01:27, 30 July 2007 (CDT)&lt;br /&gt;
&lt;br /&gt;
==Outline thoughts on integration...==&lt;br /&gt;
&lt;br /&gt;
1. Do we need to allowing a user already logged into a Moodle site to be seamlessly logged in to a wikindx? Or maybe just use the same login details between the two (like the way that Moodle.org and MoodleDocs works).  If necessary, something could be added to wikindx to enable this. In most cases though, with the right config settings, wikindx will allow any read only request without requiring login.&lt;br /&gt;
&lt;br /&gt;
2. Another issue is how to integrate the paper writing function of Wikindx into Moodle. What about use of the HTML editor? Could it be integrated some way with the Netpublish module? Imagine students or professors being able to use it to write academic papers and then publish those on the Moodle site.  Currently wikindx publishes papers solely to RTF.  It should be simple to publish to HTML since that&#039;s what the raw document is anyway (a matter of adding HTML header/footer, formatting citations and appending bibliographies -- most of this code is already in wikindx but not (yet) made available to the word processor).  Compared to other HTML editors, the only additional options wikindx offers in its version are buttons to import citations, metadata and insert footnotes.  All the rest (barring stats, timestamps, save etc.) are font/text formatting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note from DS: No, at present the Wikindx filter simply displays the text &amp;quot;wikindx:646&amp;quot; (for example). It&#039;s a very simple start and I hope that people with more knowledge of Wikindx will be able to modify it to extract the properly-formatted reference direct from Wikindx. If wikindx had a system whereby a certain URL call would supply the reference text in whatever style was configured for wikindx, this would be a good way to display the citation nicely within Moodle. Does such a call exist? I don&#039;t think so. Something like mywikindx.com/index.php?&#039;&#039;&#039;action=resourceGrabCitation&#039;&#039;&#039;&amp;amp;id=501 would be required.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note from JB: As the wikindx admin can set the default bibliographic style in the config, the filter will just present that style. The filter is simple but oh so useful! So when I type &#039;&#039;&#039;wikindx:1&#039;&#039;&#039; into my moodle installation, it creates an automatic link to http://www.baillie.org.uk/wikindx//index.php?action=resourceView&amp;amp;id=1&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note from MG: In wikindx, inserting a citation into metadata or the word processor involves clicking on an icon which opens a popup.  In this, there is a select box listing short entries of all available resources and some text fields for users to enter cited page numbers.  Perhaps something similar could be used in the moodle wikindx filter to avoid the hassle of having to look up the wikindx resource id before entering it into moodle.  This pop-up could also list the available citation/bibliographic styles on the wikindx allowing the user to select the style with which the citation should be formatted prior to insertion into moodle.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
4. Mark, your remarks in 2 have gotten me thinking. Although not everyone likes the Moodle HTML area editor that much, it still is the standard way of creating text in Moodle and perhaps a way of integrating Wikindx would be to add buttons for Wikindx to it, just like the kind described above in Wikindx&#039;s native editor. I needed to integrate a hieroglyph editor into my site and Janne Mikkonen helped me to add it through a button in the html editor that pops up a window, in which the student type the hieroglyphs they need, and then click a button to have them inserted back into the editor-similar to the way the insert image popup works. I would imagine something similar could be done with Wikindx. The advantage of this is that it would make Wikindx accessible anywhere within Moodle, rather than just as a separate module. You might also want a standalone module option whereby students could collaborate on creating bibliographies together.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note from MG: Adding the appropriate buttons would be my suggestion.  In wikindx, citations are added by the popup automatically adding something like&#039;&#039;&lt;br /&gt;
:&#039;&#039;[cite]146:22-23[/cite]&#039;&#039;&lt;br /&gt;
:&#039;&#039;where 146 is the resource ID in the database and 22-23 are the page nos. This can be added via a cite button or will be appended to an inserted quotation/paraphrase via the wikindx &#039;insert metadata&#039; button.  Footnotes (i.e. parenthetical thoughts as opposed to citation footnotes - WIKINDX does handle those footnotes/endnotes as well) are inserted via a button which encloses the inserted footnote in:&#039;&#039;&lt;br /&gt;
:&#039;&#039;[footnote]....[/footnote]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Exporting to RTF, the cite tags are substituted with the formatted citation marker (in-text or footnote/endnote), bibliographic information is extracted and appended to a bibliography and footnote tags are converted to RTF footnotes.  Of course, all HTML code (font/text formatting, tables, lists, images etc.) are converted to their appropriate RTF code too.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
5. Re the citation/bibliographic formatting, the PHP code for this has been extracted from wikindx and made available to other OSS apps at http://bibliophile.sourceforge.net (I think Aigaion and Bibliograph use it or are about to) so it may be easy enough for Moodle to use this too.  In fact doubly easy if moodle interfaces with a wikindx because the quickest way to set up the formatting engine is to provide data to it in exactly the same PHP associative array that wikindx natively expects.&lt;br /&gt;
&lt;br /&gt;
6. What capabilities are there in Wikindx at this time for different capabilities in using bibliographies? Can bibliographies be shared by a predefined group/all users? Can some people be given the ability to add to a bibliography while others can only use the bibilography? Can bibliography entries be required to have approval by some person before they are displayed to all? These would be nice features to have.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;MG: WIKINDX recognizes two types of bibliography; the master bibliography (MB) and user bibliographies (UB).  The MB holds the resources while UBs merely have references to resources from the MB.  Currently both the MB and UBs are readable by all users.  A UB is owned by a user and only he/she can add/delete references to resources.  All write enabled users can add to the MB.  Because I&#039;m aiming towards collaborative authoring in the word processor (SUWP), a long-standing feature to be implemented is to add user groups (i.e. research teams).  Then, the owner of a UB can add other users with write access to the UB and only those users can browse the UB.  Additionally, a user can make comments and musings private, shared with a group or public. Of course, a SUWP article can be shared among a group.  This hasn&#039;t been implemented yet -- I need to find someone familiar with wiki technology to help implement the collaborative authoring first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Wikindx]]&lt;/div&gt;</summary>
		<author><name>Geoffr</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Wikindx&amp;diff=4827</id>
		<title>Wikindx</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Wikindx&amp;diff=4827"/>
		<updated>2007-09-21T18:20:16Z</updated>

		<summary type="html">&lt;p&gt;Geoffr: /* CMS Integration with WIKINDX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Notes on the possible integration of [http://wikindx.sourceforge.net/index2.html WIKINDX] with Moodle.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[http://wikindx.sourceforge.net/index2.html WIKINDX]is a free BiblioGraphic and quotations/notes management and article authoring system designed either for single use (on a variety of operating sytems) or multi-user collaborative use across the internet.&lt;br /&gt;
&lt;br /&gt;
Please also see the Moodle Discussion at http://moodle.org/mod/forum/discuss.php?d=23022&lt;br /&gt;
&lt;br /&gt;
==CMS Integration with WIKINDX==&lt;br /&gt;
&lt;br /&gt;
From MG:&lt;br /&gt;
WIKINDX 3.7 (released 29th July 2007) provides CMS &#039;hooks&#039; enabling any CMS using replacement tags or similar to include a range of WIKINDX output.  This output includes lists of resources selected and ordered by various parameters.&lt;br /&gt;
&lt;br /&gt;
Additionally, WIKINDX may be used to format a block of CMS text (containing the appropriate replacement tags) with either in-text or footnote-style citations and an appended bibliography.&lt;br /&gt;
&lt;br /&gt;
Finally, because the CMS hooks make use of WIKINDX ID numbers, WIKINDX (providing the option has been turned on in the user&#039;s Preferences) provides an interface to formulate the CMS replacement tag for a single WIKINDX resource and to interrogate the WIKINDX database for collection, creator, publisher etc. IDs.&lt;br /&gt;
&lt;br /&gt;
Once WIKINDX has been installed, the CMS scripter should read README_CMS.&lt;br /&gt;
&lt;br /&gt;
Still desired (but not absolutely necessary), is an interface to WIKINDX from within Moodle and design considerations for this are discussed below.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
From GR: Most of the capabilities discussed in this documentation have now been incorporated in the [WIKINDX Bibliography Filter]http://moodle.org/mod/data/view.php?d=13&amp;amp;rid=970&lt;br /&gt;
&lt;br /&gt;
Also see this [discussion forum]http://moodle.org/mod/forum/discuss.php?d=76936&lt;br /&gt;
&lt;br /&gt;
==Wikindx filter for Moodle==&lt;br /&gt;
&lt;br /&gt;
From MG:&lt;br /&gt;
Dan&#039;s filter likely needs updating/altering in the light of WIKINDX 3.7.&lt;br /&gt;
&lt;br /&gt;
Dan Stowell has created a &amp;quot;Wikindx filter&amp;quot; for Moodle which allows you to cross-link to a wikindx entry by typing (for example) wikindx:646. The filter is in contrib CVS, named &amp;quot;filter_wikindx&amp;quot; or can be downloaded at http://download.moodle.org/download.php/modules/filter_wikindx.zip&lt;br /&gt;
&lt;br /&gt;
From MG:&lt;br /&gt;
Some design considerations for a moodle filter that enables a wikindx to be searched, a reference to be selected, page number(s) to be added and the in-text or footnote citation and full reference to be returned formatted to the user&#039;s requirements.  README_CMS in the WIKINDX install should be read in conjunction with this.  WIKINDX&#039;s config.php provides some initial CMS hook settings.&lt;br /&gt;
&lt;br /&gt;
1/ The Moodle filter needs to provide 3 basic functions:&lt;br /&gt;
:a) an icon in the HTML text editor that opens a pop-up,&lt;br /&gt;
:b) the pop up should provide a simple search/select interface to wikindx resources,&lt;br /&gt;
:c) once the selected wikindx resource has been inserted into the text, the moodle HTML editor text is saved and the filter sends the reference (and style and page number(s)) to wikindx for formatting and insertion into the moodle text.&lt;br /&gt;
&lt;br /&gt;
2/ Because what is supplied to the pop-up (see below) requires a connection to wikindx, the filter should have a config file for the wikindx database connection details.  wikindx 3.4 now allows admins to lock out read-only users so this config file may also have the option to add a wikindx username::password pair (I would not favour this though).&lt;br /&gt;
&lt;br /&gt;
3/ The search interface could be similar to the wikindx Quick Search interface less the ordering options (to save on space). [WIKINDX code (filling the pop-up)]&lt;br /&gt;
&lt;br /&gt;
4/ The results of a search should be displayed with multiple resources next to radio buttons, a select box to choose the formatting style and text boxes to enter page number(s).  Each radio button has a value that is the unique resource ID in the wikindx.  [WIKINDX code]&lt;br /&gt;
&lt;br /&gt;
5/ Once the appropriate resource has been selected and other details added, clicking on a &#039;process&#039; button will add the appropriate filter mark-up which &#039;&#039;may&#039;&#039; be something like:&lt;br /&gt;
:wikindx:34:12&lt;br /&gt;
:wikindx:56:34-35&lt;br /&gt;
&lt;br /&gt;
where the first number is the wikindx resource ID and the second number(s) is the page.  See README_CMS for instructions on how to add further parameters.&lt;br /&gt;
&lt;br /&gt;
6/ On displaying the moodle text, that markup is extracted and sent to the wikindx server (something like &#039;http://localhost/wikindx3/cmsprint.php?action=getResource&amp;amp;id=242&#039;) which then formats the requested resource and provides a string in return which would consist of a serialized/base64_encoded PHP multi-dimensional array which, when unpacked, would have something like the following (if APA for example):&lt;br /&gt;
::[13] =&amp;gt; Back, M., &amp;amp;amp; Des, D. (1996). Micro-narratives in sound design: Context and caricature in waveform manipulation. Retrieved March 12, 2004, from &amp;lt;a href=&amp;quot;http://www2.hku.nl/~audiogam/ag/articles/micronaratives.htm&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;http://www2.hku.nl/~aud&amp;amp;nbsp;...&amp;amp;nbsp;cles/micronaratives.htm&amp;lt;/a&amp;gt;.&lt;br /&gt;
::[54] =&amp;gt; Carr, D. (2003). Play dead: Genre and affect in silent hill and planescape torment. &amp;lt;em&amp;gt;Game Studies&amp;lt;/em&amp;gt;&amp;lt;em&amp;gt;, 3&amp;lt;/em&amp;gt;(1). Retrieved September 16, 2003, from &amp;lt;a href=&amp;quot;http://www.gamestudies.org/0301/carr/&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;http://www.gamestudies.org/0301/carr/&amp;lt;/a&amp;gt;. &lt;br /&gt;
::[2] =&amp;gt; Chion, M. (1992). Wasted words. In R. Altman (Ed.), &amp;lt;em&amp;gt;Sound Theory Sound Practice&amp;lt;/em&amp;gt; (pp. 104&amp;amp;ndash;110). New York: Routledge.&lt;br /&gt;
::[103] =&amp;gt; Chion, M. (1994). &amp;lt;em&amp;gt;Audio-vision: Sound on screen&amp;lt;/em&amp;gt; (C. Gorbman, Trans.) New York: Columbia University Press.&lt;br /&gt;
::[4] =&amp;gt; Truppin, A. (1992). And then there was sound: The films of Andrei Tarkovsky. In R. Altman (Ed.), &amp;lt;em&amp;gt;Sound Theory Sound Practice&amp;lt;/em&amp;gt; (pp. 235&amp;amp;ndash;248). New York: Routledge.&lt;br /&gt;
&lt;br /&gt;
Note that, depending upon the bibliographic style chosen in the WIKINDX&#039;s config.php, the results may contain HTML tags (as in the above example).  The key of each array member is the resource ID.&lt;br /&gt;
&lt;br /&gt;
WIKINDX may also be used to format a block of CMS text having appropriate replacement tags with in-text or footnote-style citations and an optional bibliography.  An example output from this might be:&lt;br /&gt;
&lt;br /&gt;
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis ligula lorem, consequat eget, tristique nec, auctor quis, purus. Vivamus  (Mayer &amp;amp; Moreno, 1998) ut sem. Fusce aliquam nunc vitae purus. Aenean viverra malesuada libero. Fusce ac quam. Donec neque. Nunc venenatis enim nec quam. Cras faucibus, justo vel accumsan aliquam, tellus dui fringilla quam, in condimentum augue lorem non tellus.  (Rittel &amp;amp; Webber, 1973) Pellentesque id arcu non sem placerat iaculis. Curabitur posuere  (Kullberg, 1991), pede vitae lacinia accumsan, enim nibh elementum orci, ut volutpat eros sapien nec sapien. Suspendisse neque arcu, ultrices commodo, pellentesque sit amet, ultricies ut, ipsum. Mauris et eros eget erat dapibus mollis. Mauris laoreet posuere odio. Nam ipsum ligula, ullamcorper eu, fringilla at, lacinia ut, augue. Nullam nunc.&lt;br /&gt;
&lt;br /&gt;
Kullberg, R. (1991). Dynamic timelines: Visualizing historical information in three dimensions. Unpublished master&#039;s thesis, Massachusetts Insititute of Technology.&lt;br /&gt;
Mayer, R. E., &amp;amp; Moreno, R. (1998). A split-attention effect in multimedia learning: Evidence for dual processing systems in working memory. Journal of Educational Psychology, 90(2), 312–320.&lt;br /&gt;
Rittel, R. W. J., &amp;amp; Webber, M. M. (1973). Dilemmas in a general theory of planning. Policy Sciences, 2(4), 155–169.&lt;br /&gt;
&lt;br /&gt;
See WIKINDX&#039;s README_CMS for further information and example PHP code.&lt;br /&gt;
&lt;br /&gt;
--[[User:Mark Grimshaw|Mark Grimshaw]] 01:27, 30 July 2007 (CDT)&lt;br /&gt;
&lt;br /&gt;
==Outline thoughts on integration...==&lt;br /&gt;
&lt;br /&gt;
1. Do we need to allowing a user already logged into a Moodle site to be seamlessly logged in to a wikindx? Or maybe just use the same login details between the two (like the way that Moodle.org and MoodleDocs works).  If necessary, something could be added to wikindx to enable this. In most cases though, with the right config settings, wikindx will allow any read only request without requiring login.&lt;br /&gt;
&lt;br /&gt;
2. Another issue is how to integrate the paper writing function of Wikindx into Moodle. What about use of the HTML editor? Could it be integrated some way with the Netpublish module? Imagine students or professors being able to use it to write academic papers and then publish those on the Moodle site.  Currently wikindx publishes papers solely to RTF.  It should be simple to publish to HTML since that&#039;s what the raw document is anyway (a matter of adding HTML header/footer, formatting citations and appending bibliographies -- most of this code is already in wikindx but not (yet) made available to the word processor).  Compared to other HTML editors, the only additional options wikindx offers in its version are buttons to import citations, metadata and insert footnotes.  All the rest (barring stats, timestamps, save etc.) are font/text formatting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note from DS: No, at present the Wikindx filter simply displays the text &amp;quot;wikindx:646&amp;quot; (for example). It&#039;s a very simple start and I hope that people with more knowledge of Wikindx will be able to modify it to extract the properly-formatted reference direct from Wikindx. If wikindx had a system whereby a certain URL call would supply the reference text in whatever style was configured for wikindx, this would be a good way to display the citation nicely within Moodle. Does such a call exist? I don&#039;t think so. Something like mywikindx.com/index.php?&#039;&#039;&#039;action=resourceGrabCitation&#039;&#039;&#039;&amp;amp;id=501 would be required.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note from JB: As the wikindx admin can set the default bibliographic style in the config, the filter will just present that style. The filter is simple but oh so useful! So when I type &#039;&#039;&#039;wikindx:1&#039;&#039;&#039; into my moodle installation, it creates an automatic link to http://www.baillie.org.uk/wikindx//index.php?action=resourceView&amp;amp;id=1&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note from MG: In wikindx, inserting a citation into metadata or the word processor involves clicking on an icon which opens a popup.  In this, there is a select box listing short entries of all available resources and some text fields for users to enter cited page numbers.  Perhaps something similar could be used in the moodle wikindx filter to avoid the hassle of having to look up the wikindx resource id before entering it into moodle.  This pop-up could also list the available citation/bibliographic styles on the wikindx allowing the user to select the style with which the citation should be formatted prior to insertion into moodle.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
4. Mark, your remarks in 2 have gotten me thinking. Although not everyone likes the Moodle HTML area editor that much, it still is the standard way of creating text in Moodle and perhaps a way of integrating Wikindx would be to add buttons for Wikindx to it, just like the kind described above in Wikindx&#039;s native editor. I needed to integrate a hieroglyph editor into my site and Janne Mikkonen helped me to add it through a button in the html editor that pops up a window, in which the student type the hieroglyphs they need, and then click a button to have them inserted back into the editor-similar to the way the insert image popup works. I would imagine something similar could be done with Wikindx. The advantage of this is that it would make Wikindx accessible anywhere within Moodle, rather than just as a separate module. You might also want a standalone module option whereby students could collaborate on creating bibliographies together.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note from MG: Adding the appropriate buttons would be my suggestion.  In wikindx, citations are added by the popup automatically adding something like&#039;&#039;&lt;br /&gt;
:&#039;&#039;[cite]146:22-23[/cite]&#039;&#039;&lt;br /&gt;
:&#039;&#039;where 146 is the resource ID in the database and 22-23 are the page nos. This can be added via a cite button or will be appended to an inserted quotation/paraphrase via the wikindx &#039;insert metadata&#039; button.  Footnotes (i.e. parenthetical thoughts as opposed to citation footnotes - WIKINDX does handle those footnotes/endnotes as well) are inserted via a button which encloses the inserted footnote in:&#039;&#039;&lt;br /&gt;
:&#039;&#039;[footnote]....[/footnote]&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Exporting to RTF, the cite tags are substituted with the formatted citation marker (in-text or footnote/endnote), bibliographic information is extracted and appended to a bibliography and footnote tags are converted to RTF footnotes.  Of course, all HTML code (font/text formatting, tables, lists, images etc.) are converted to their appropriate RTF code too.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
5. Re the citation/bibliographic formatting, the PHP code for this has been extracted from wikindx and made available to other OSS apps at http://bibliophile.sourceforge.net (I think Aigaion and Bibliograph use it or are about to) so it may be easy enough for Moodle to use this too.  In fact doubly easy if moodle interfaces with a wikindx because the quickest way to set up the formatting engine is to provide data to it in exactly the same PHP associative array that wikindx natively expects.&lt;br /&gt;
&lt;br /&gt;
6. What capabilities are there in Wikindx at this time for different capabilities in using bibliographies? Can bibliographies be shared by a predefined group/all users? Can some people be given the ability to add to a bibliography while others can only use the bibilography? Can bibliography entries be required to have approval by some person before they are displayed to all? These would be nice features to have.&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;MG: WIKINDX recognizes two types of bibliography; the master bibliography (MB) and user bibliographies (UB).  The MB holds the resources while UBs merely have references to resources from the MB.  Currently both the MB and UBs are readable by all users.  A UB is owned by a user and only he/she can add/delete references to resources.  All write enabled users can add to the MB.  Because I&#039;m aiming towards collaborative authoring in the word processor (SUWP), a long-standing feature to be implemented is to add user groups (i.e. research teams).  Then, the owner of a UB can add other users with write access to the UB and only those users can browse the UB.  Additionally, a user can make comments and musings private, shared with a group or public. Of course, a SUWP article can be shared among a group.  This hasn&#039;t been implemented yet -- I need to find someone familiar with wiki technology to help implement the collaborative authoring first.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Wikindx]]&lt;/div&gt;</summary>
		<author><name>Geoffr</name></author>
	</entry>
</feed>