Category Archives: Work

Fez repository plugin for Moodle

I have been writing a plugin for the Moodle Repository API that can now browse and search records in a Fez digital repository. Here’s the simple configuration, using the RMIT Research Bank as an example public access Fez repository:

Fez repository settings

To set up the Fez repository plugin in Moodle, simply give it the URL of your Fez repository, and how many records per page you want.

And here you can see that the plugin can browse communities, collections and records just like any other repository plugin:

Fez repository collections

The collections available in this Fez repository.

Fez repository search results

Fez repository search results and the record listing of a collection are displayed with the same interface.

Fez repository record

Selecting a record works as expected - including the title, author, date created and date modified metadata.

So far, it only supports using external files, and the resulting links are links to the Fez record view, not the attached files. This also means that you still have to add the title and description manually, even though that metadata is present in the metadata of the files presented by the repository plugin! I hope to somehow fix this with work on MDL-32130 on the Moodle bug tracker.

Citing Fez repository documents in Moodle

Today I wrote a text filter for Moodle 2.2 which will help Moodle teachers and admins cite documents from a Fez digital repository. Fez is a digital repository written by University of Queensland library staff for the university’s digital assets and for use as an open access research repository.

The best fit in Moodle for a digital repository such as Fez would be through a repository plugin, but the Moodle repository API assumes that you only want either a file, or a URL. I think there’s room for the API to be able to return a snippet of HTML as well – of an appropriately formatted link to the document in question. For instance, it would not be enough to simply present a URL, such as

Link to a document

it would instead be really nice to be able to have the repository plugin return a <div> element, with a formatted citation, such as:

Taylor, William (2005) (FAB_15_2_095) Lest We Forget: the Shrine of Remembrance, its redevelopment and the heritage of dissent. Fabrications : The Journal of the Society of Architectural Historians, Australia and New Zealand, 15 2: 95-112.

This would also apply to other repositories – it would be nice if the Flickr, Picasa and YouTube repository plugins could return a thumbnail of the image or video instead of just the URL. Until that happy day arrives however, we can use a filter instead. After installing the filter, we tell it which Moodle content formats we would like it to parse, and the base URL for our Fez repository:

Fez text filter settings in Moodle

Fez text filter settings in Moodle

Then, in our content, we insert a search term or a Fez document PID into a placeholder using double curlies, e.g.

Inserting a Fez document into Moodle content

Inserting a Fez document into Moodle content using a placeholder.

Which when we save, and have the Fez filter enabled, will produce a nicely presented citation:

Fez document citation in Moodle

A Fez document citation displayed in Moodle.

It would not be very difficult to convert this into a repository plugin that simply returns the URL to the document, or to extend or clone this filter to talk to other digital repositories, such as EPrints, DSpace or Fedora.

TODO: add a setting to control how many search results you want to display.