Questionmark's Open Assessment Platform

MediaWiki

Embedding an assessment into a MediaWiki page is possible provided the correct extension has been installed and configured. MediaWiki uses extensions to extend the basic functionality that is offered. In this case, we will be adding an extension that easily allows us to include an iFrame in a wiki page. To start embedding assessments you will need to carry out the steps covered in this article:

  • Install and configure the extension
  • Use the extension to add an iFrame containing an assessment

Installing and configuring the extension

The extension you need to install and configure to add iFrames is the Website in iFrame extension. You can download the extension from the mediawiki.org site below:

Click the download link and download the websiteFrame.php file. Once you have downloaded this file follow the steps below to install and configure the extension:

Please note you will need access to the system files for your MediaWiki installation to successfully install this extension via FTP (or other remote access) or physical access to the computer where MediaWiki is installed.)

  1. Copy the websiteFrame.php file in to the extension folder for MediaWiki. The location for this will usually be something similar to: /www/wiki/extensions
  2. Locate and edit the LocalSetting.php page in the MediaWiki root folder
  3. Add the following lines of code to the end of the file and save the changes:
    /* websiteFrame extension */
    include ("extension/websiteFrame.php");

You will now be able to use the iFrame extension on your MediaWiki site. You should be aware that any editor of your wiki can add iFrames to pages with this extension.

Using the iFrame extension to add an assessment

Once the extension and been installed and configured it is easy to add an iFrame to your wiki page. To do this on a page where you want to add an iFrame:

  1. Click the Edit tab.
  2. Insert the following code in the text-box:

    <websiteFrame>
    website=website URL
    name=string
    align=top,middle,bottom,left,right
    height=number
    width=number/percentage
    border=number
    scroll=yes,no,auto
    longdescription=long descrption URI
    </websiteFrame>

    ...where:
    • website URL is the URL for your Questionmark assessment
    • string is the name you want to use to refer to the iFrame
    • top,middle,bottom,left,right is the location where you would like to align the iFrame
    • number is the height you would like to apply to your iFrame in pixels
    • number/percentage is the width you would like to apply to your iFrame in pixels or percentage of page
    • number is the thickness of the border your would like to show
    • yes,no,auto is if you would like show/hide scroll bars within your iFrame
    • long description URI is a long description of the URL used in the iFrame
  3. Click Save Page.