Thursday, August 16, 2012

Extend the functionality of OUWiki in Moodle 1.9.x by adding links to its interface

The BEST thing about Moodle is that it is Open Source and written in PHP. That means absolute heaven for the programmer within the Teacher or Educator. Ah! To be able to modify code to suit your needs. Pure joy indeed.

Figure 1. The OUWiki - A great collaboration tool!

One of the BEST collaboration tools in Moodle is the Wiki. In fact, the standard Moodle Wiki has been enhanced by the boffins at the Open University, United Kingdom and we are blessed with the OUWiki.  With the OUWiki, we have a Moodle resource that allows students to not only build a webpage asynchronously, but also to annotate their work for others to read. As Sam Marhall pointed out in this post:

"The big new feature is annotation which is intended to replace comments. Comments were a nice idea but didn't work with students - they put things in comments instead of editing the page as they should (either too timid or just didn't know which was appropriate), and it was also too complicated for them. So if you choose, you can get rid of 'em. Instead you can have annotation. Annotation lets the teacher add 'red pen' notes to a wiki page and lock it, so as to give feedback when marking a wiki page."

Lesson Objective
In this post, I want to show you how you can add more links into OUWiki's interface. Clicking on a link will bring you to your intended URL or open a new tab for the destination webpage. It's actually pretty easy.

Learning Outcomes
At the end of this post, you will be able to customise your OUWiki so that more hyperlinks can be added to it. You will be able to extend the functionality of your Wiki. You will be able to take your OUWiki from here:

Figure 2. The OUWiki menu items 
to here:

Figure 3. Adding a new menu hyperlink to the menu list - done!

And from here:

Figure 4. A wikipage with a section.
to here:

Figure 5. A menu hyperlink added in the section (duplicated in the main menu)

Do you notice, in the last two screenshots, that you can even have the same link on the menu list of an OUWiki Section?

Now isn't this interesting? Not convinced, huh? Okay, well how about if I told you that you could have a link to, let's say, a Youtube video that will open up in a new tab. Or perhaps a Dictionary website that opens as a pop-up window for your students to refer to? Or how about opening up a webpage like that checks your text for grammar errors and suggests corrections like Now would you be interested?

Now that we have the obligatory academic stuff stated upfront, let's get on with the job.

Step 1 - Edit the ouwiki.php file of the mod/ouwiki/lang/en_utf8 subfolder.  Make sure you back it up first!

Figure 6. The /mod/ouwiki/lang/en_utf8/ouwiki.php file where various string code exist.

Step 2 - Insert in a new statement link like $string['checkyourwritingforerrors']='Check your writing for errors';
Figure 7. Adding a new string variable inside the mod/ouwiki/lang/en_utf8/ouwiki.php file.

Step 3 - Save the file and FTP it back to your server. You're halfway there!

Step 4 - Edit the main ouwiki.php inside the /mod/ouwiki folder. Make sure you back it up first!

Figure 8. The /mod/ouwiki.php main code.

Step 5 - Go to line 854 and then insert the code

$result.='<a href="The URL of your website or webpage" target="_new">'.

For example,

$result.='<a href="" target="_new">'.

Step 6 - Save your ouwiki.php file and FTP it back to your server.

Step 7 - Test your wiki page.

By the way, if you want to implement the cool grammar check which was linked to in this hack, you can surf to or your can send an E-mail to Below are two examples of in action. Each input text contains deliberate errors. Watch how the grammar check function of the website responds.

Figure 9. Grammar checking page that can be integrated
 into your Moodle production site.

And here's another test on the same website. This time with a more comprehensive text input and correction output.
Figure 10. Another more complete example of how a
grammar checking page that can be integrated
 into your Moodle production site.
The brains behind this Grammar-Check integrated into your Moodle site is Nicholas Walker of Montreal, Quebec, Canada. You can send him a shout E-mail to if you need more information from him on how to integrate a grammar checker into your Moodle site or non-Moodle website. Disclaimer: I did not receive any incentives for posting the above information in this post. I am doing this as a service as an IT-savvy educator, to advance global educational quality through Moodle resources.

That's all, FOLKS!

Until we meet the next time asynchronously, happy Moodling!
Frankie Kam
Melaka (soon to be in Petaling Jaya), Malaysia

P.S., to read how to use OUWiki, I highly recommend this webpage from San Jose City College.

If you like this post or site
a small donation would be nice but would last only a day,
otherwise leaving a comment (or a compliment) below will last me a month!

1 comment:

  1. Hi Frankie,
    I have just made an interesting discovery about this hack into OUWiki. It turns out that if you update your OUWiki and select "no comment system," the link to the autocorrection page disappears.

    What this means is that teachers can control the timing of the feedback. This level of control will likely seem a big plus to teacher trying to implement a process writing approach. Process writing is where the student completes a draft of an assignment, receives feedback on the draft, responds to the feedback and then submits a final draft. Turning the "Check your writing for errors" on after the first draft is due for a limited period, and then off during the redrafting might be one way that the teacher ensures only finished rough drafts receive feedback.

    This is NOT how I teach and believe it is worthwhile to revise while you write, but some teachers may appreciate the extra control selecting "no comment system" affords.

    Best wishes,


Ratings and Recommendations by outbrain