OER Exchange client
| OER Exchange client | |
|---|---|
| Type | Local plugin |
| Set | N/A |
| Downloads | https://marketplace.moodle.com/plugins/local_oerclient |
| Issues | https://github.com/adamjenkins/moodle-local_oerclient/issues |
| Discussion | https://marketplace.moodle.com/plugins/local_oerclient |
| Maintainer(s) | Adam Jenkins (WiseCat) |
The OER Exchange client connects an ordinary Moodle site, such as a school's or a teacher's own site, to an OER Exchange: a separate Moodle site that holds a shared catalogue of open educational resources. Teachers can share a course or a single activity to the Exchange under an open licence, browse and search the Exchange's catalogue without leaving their own site, and import courses and activities from it. In Moodle the plugin is called OER Client.
See OER Exchange for the bigger picture: how the Exchange site works, how resources are published and moderated, and the other plugins of the platform.
Installation
Install the plugin from the Moodle plugins directory, or download the ZIP file and follow Installing plugins. The files go in the folder local/oerclient. The plugin supports Moodle 5.0 to 5.3.
- The site needs an Exchange to connect to: a Moodle site with the OER Exchange plugin (local_oerexchange) installed, whose administrator approves your site.
- Cron must run. A share is built and uploaded by a background task, so without cron a share stays queued.
- Optionally add the OER Exchange client block, a Dashboard block that shows recent shares and the newest resources on the Exchange.
Connecting the site to an Exchange
The plugin has its own category, Site administration > Plugins > Local plugins > OER Client, with two pages: General settings and Register with the Exchange. Connecting is done once per site.
- In General settings, enter the Exchange URL (the base URL of the Exchange site) and click Save changes.
- Open Register with the Exchange, enter a Contact email and click Register this site. This sends a request to the Exchange; it does not give access yet. The page then says Registration pending approval, with the site id that the Exchange assigned, and Site id in the settings is filled in automatically.
- An administrator of the Exchange approves the request. The site token is then emailed to the contact address.
- Paste the token into Site token in General settings and save. Register with the Exchange now says Registered and active.
Until the site is registered and approved, the plugin's pages show the message This site is not yet registered (or not yet approved) with an OER Exchange.
Settings

In Site administration > Plugins > Local plugins > OER Client > General settings:
- Exchange URL: the base URL of the OER Exchange site.
- Site id: assigned by the Exchange on registration, and set automatically by the Register with the Exchange page.
- Site token: the web service token emailed to you after the Exchange administrator approves the site.
- Accept invalid TLS certificates (development only): accept any TLS certificate from the Exchange, including self-signed and expired ones. Off by default. Never turn it on for a production site: an attacker on the network could then read every token the plugin sends.
- Allow an Exchange on a private network address (development only): skip Moodle's outbound-request checks (the cURL blocked hosts and allowed ports in HTTP security) for connections to the Exchange, so that an Exchange on a private or local address can be reached. Off by default. Never turn it on for a production site.
- Show licence codes in capitals: show a resource's licence code as CC-SA-4.0 rather than cc-sa-4.0 when browsing and previewing the catalogue. On by default. It changes the display only: the licence is stored, sent and compared exactly as received.
Linking your Exchange account
Registration connects the two sites. Each teacher who wants to share also links their own account on this site to a personal account on the Exchange, so that their shares are published in their name. This is done once.
- Go to the client's start page,
/local/oerclient/index.php(titled OER Client). If you try to share before linking, Moodle takes you there with the message Link your personal Exchange account first. - Click Link my Exchange account.
- On the Exchange, log in to your account there. The Exchange asks you to confirm the link with your site: click Link my account.
- You come back to your site with the message Your account is now linked to the Exchange. From then on, the start page shows the number of the Exchange account you are linked to.
The Exchange account is separate from your account on your own site. Browsing and importing don't need a linked account; sharing does.
Sharing a course or activity

You need the capability local/oerclient:share in the course (teachers and managers have it by default) and a linked Exchange account.
- Open the course, click More in the course navigation, and choose Share to OER Exchange. To share a single activity, open the activity, click More in its navigation, and choose Share to OER Exchange there.
- Fill in the form:
- Title: filled in with the course or activity name.
- Summary: what the resource is and who it is for (required).
- Language: filled in with the language you are using Moodle in.
- Tags (comma-separated).
- Licence: one of the licences that the Exchange currently accepts. The list comes from the Exchange and is decided by its administrator. The licence with the code cc-sa-4.0 (Creative Commons ShareAlike 4.0) is preselected when the Exchange accepts it. See also Licences.
- Click Share it.
If the Exchange accepts no licence at all, or it can't be reached and the site has never received a licence list from it, the form is not shown and a message explains why. If the Exchange can't be reached but a list was confirmed earlier, the form uses that list and says when it was last confirmed.
The share is built in the background. The plugin makes a backup of the course or activity with user data excluded (no enrolments, grades, submissions or posts), uploads it to the Exchange, and the Exchange publishes it. If the site's backup defaults force user data into every backup (Include enrolled users locked on in Site administration > Courses > Backups > General backup defaults), sharing is refused instead.
The sanitising removes user records, not names written inside the content, so read through what you share. If you share the same course or activity again later, the existing catalogue entry on the Exchange is updated instead of a new one being created.

After you click Share it, the Share status page shows how far the share has got, and updates without reloading: queued, building a sanitized backup, uploading to the Exchange, then published or failed (with the error). If it takes much longer than expected, the page says so; usually this means cron is not running.
For a published share, the page shows what the Exchange holds: First published, Last updated, On the Exchange (Visible in the catalogue or Hidden), Downloads and Imports. If the Exchange rejected the latest upload, the page shows the Exchange's reason.
- View on the Exchange opens the resource's page on the Exchange.
- Update the shared copy uploads the course or activity again as it is now and replaces the copy on the Exchange. The catalogue entry, its link and its reviews stay as they are.
- If the activity that was shared no longer exists on your site, the page says so instead of offering the update.
The OER Exchange client block lists recent shares on the Dashboard and links to their status pages.
Browsing the Exchange

Browse OER Exchange (/local/oerclient/browse.php, linked from the client's start page and from the OER Exchange client block) searches the Exchange's catalogue from your own site. Any logged-in user except the guest user can open it.
- Type in the search box and click Search. You can filter by Type: Course, Activity or Data resource.
- Each card shows the resource's cover image, title, creator (Created by …), a short summary, its licence code and a View on the Exchange link.
- Click a title to open the resource's preview.
Previewing and importing

The preview page shows the resource's cover image, creator, licence and summary, and:
- Required plugins: every plugin the resource needs, marked installed here or not installed — will be skipped. Activities whose plugin is missing on your site are left out of the import.
- Structure preview: the sections and activities in the resource.
Under Import this resource, click Import:
- A course is imported into a new course in the site's default course category. You need local/oerclient:import and Moodle's moodle/course:create at site level.
- An activity is added to the course you choose in Import into course. The list shows the courses you are enrolled in where you have local/oerclient:import.
- A data resource (for example a glossary or question bank file) is not imported. Its preview shows a Download button instead.
The import runs a normal Moodle restore. Because the content was written on another site, the import removes scripts and other unsafe HTML from activity descriptions and page content, and hides what it imported from students: a new course is hidden, and activities added to an existing course are hidden in that course. Importing an activity never changes the visibility of the course itself. If the restore precheck fails, you see an error and nothing is left half-imported.
The imported copy is your own. Later changes on the Exchange don't reach it; import again if you want a newer version.
After the import

The import ends on the Import complete page, with a checklist headed Before you use this with students, check:
- activity due dates and the course start date, which came from the original course;
- any names, institutions or contact details in the activity content;
- visibility: the imported course or activities are hidden from students until you make them visible;
- grade items and grading scales.
Go to course opens the course. Most open licences require attribution, so keep the creator's name and a link to the resource where your students and colleagues can see it.
Capabilities
- local/oerclient:share (Share a course or activity to the OER Exchange): shows Share to OER Exchange in a course and its activities, and lets the user share them. Allowed for Teacher and Manager by default. Sharing publishes the course in a catalogue under an open licence, so you may want to restrict it to a role your institution controls.
- local/oerclient:import (Import a resource from the OER Exchange): import a resource into a course. Allowed for Teacher and Manager by default. It carries an XSS risk, like Moodle's own restore capabilities, because it restores a backup made on another site.
The Register with the Exchange page needs moodle/site:config. See Capabilities and Managing roles.
Privacy
The plugin stores, for each user:
- the link to their Exchange account: their user id on the Exchange and the web service token used to act for them there;
- a record of each share: the course or activity, title, summary, language, tags, licence, status and any error;
- a record of each import: the resource and version on the Exchange, and the course it was imported into.
Only what a teacher shares leaves the site: the backup with user data excluded, the details typed on the share form, and their Exchange account identity. Nothing is shared automatically. The plugin implements the Moodle privacy API, so this data can be exported and deleted through the site's data requests (see Privacy). Deleting a user removes their account link, and deleting a course removes the share and import records for that course.
Troubleshooting
- Share to OER Exchange is missing: you need local/oerclient:share in the course. The item is in the More menu, not a tab of its own.
- This site is not yet registered (or not yet approved) with an OER Exchange: finish the steps in Connecting the site to an Exchange, including the site token.
- A share stays queued: check that cron is running (see Scheduled tasks).
- This site's backup defaults force user data to be included in every backup: unlock Include enrolled users in the general backup defaults (see Backup settings).
- You do not have permission to import into any course: you need local/oerclient:import in at least one course you are enrolled in.