OERu MediaWiki to WordPress Snapshot Toolchain

One of the OERu's most compelling technological capabilities is the set of internally developed open source tools that allow us to automatically transform and inject a collection of MediaWiki content on WikiEducator (usually in form of micro-courses) making up a course into a mobile-friendly, easy-to-navigate WordPress site, usually situated on OERu's Course WordPress Multisite implementation.

How it works

Educators, usually working with one of our OERu partner institutions, can assemble the materials (either written by them or recruited from existing OERs on Wikieducator) into an "outline" which references all the content in one place. If they want to make the course available (either a cohort-based group or a "rolling" enrolment, either affiliated with their institution or under the OERu banner) they can do so either on a subsite on OERu's WordPress instance or some other WordPress, for example one hosted by their institution.

MediaWiki Widget

The process of linking an outline to a WordPress site and pushing a "snapshot" of the course content outlined to the WordPress site is remarkably simple. First, the author of the outline page includes a one line MediaWiki template or "widget" - which is managed by the open source OERu MediaWiki plugin (written in PHP, like the rest of MediaWiki) developed by Jim Tittsler - that will look something like this (usually in one line, expanded here for clarity):

{{ #widget:Snapshot |
url=http://course.oeru.org/shortcode/ |
logo=https://wikieducator.org/images/f/f1/MyInstitutionLogo.png |
link=http://oeru.org/oeru-partners/my-institution-profile/}}

This defines

  • the URL of the WordPress site, using the "shortcode" the educator has defined for that course (like the institution's course code),
  • a logo image to display at the bottom of each page of the WordPress course site to identify the relevant institution, and
  • the link to which a user will be sent if they click on the logo.

There is a handy instruction page for the widget if you want a bit more detail.

Course Snapshot Script

When the page containing this template is saved, the resulting page will have a "Request snapshot" button at the top of it (see attached screenshot). Clicking this will popup a modal dialog box into which the user will be asked to enter their login and password for an admin user on the listed WordPress site (either multisite or stand-alone implementation).

If the WordPress site in question accepts these credentials, a new Snapshot task is added to WikiEducator's task list, handing over control to Jim's rather clever open source Course Snapshot script which runs in the background, and checks the task list ever minute or two. When it identifies as snapshot request, it uses the outline page and WikiEducator's API to grab all the relevant content automatically, and it builds a structured data archive (in a variant of XML) which, when completed, is imported directly into a WordPress site via WordPress' XMLRPC capabilities, replacing any existing content.

Note: the default export format used by the Course Snapshot script is a WordPress-importable data object, however for historical reasons, it also has the ability to generate (more manually at this stage) a static, internally linked HTML version of the content.

WordPress Mobile-Friendly Course Site

The resulting WordPress course site uses the OERu-created open source mobile-friendly Course WordPress theme - see the sample page screen shot. Each page includes a link back to the original page in WikiEducator from which it was generated - see sample page screen shot with the link identified. Also see the sample image of the same page as it would look on a mobile device with a narrower (lower pixel resolution) screen width.

Note: anyone can copy an outline page written by someone else and use it as the starting point for assembling their own version of the course - they will, however, have to have admin rights on the target WordPress site (and log in to it to initiate the process) protecting any existing snapshot sites from being overwritten by someone else's course content.

More examples

Here's a list of some of the currently available course outlines on WikiEducator with corresponding links to the "rendered" WordPress courses so you can see what it looks like.

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
CAPTCHA
1 + 4 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.
Are you the real deal?