Moodle SWF Activity Module developer preview

SWF Activity ModuleOK, this is going to be a very techie post as it’s aimed exclusively at developers who are interested in integrating Flash and Moodle. If you’ve never written a line of computer code, then this article will most probably bore you to death!

What is the SWF Activity Module?

The SWF Activity Module deploys Flash learning applications as activities in Moodle courses. It uses standards compliant XHTML 1.0 Strict embed code and leverages SWFObject 2.2. For Moodle users, especially non-developers, it’s a quick, easy, reliable, and mostly importantly, non-techie method of embedding Flash.

What’s the developer preview?

I’ve just uploaded a two-part installer package to the SWF Activity Module project site on Google Code. The first part, like any other Moodle activity module, performs the installation in Moodle and acts as the user interface. The second part is the Flash Remoting service library which handles communication between Flash and Moodle. The particular implementation of this is AMFPHP. This package is a developer preview. It has not been extensively tested, has not been proven to be stable and is not intended for installation on public servers.

What does it do?

So far, the activity module does the following:

  • Installation
  • Backup and restore
  • Creates and manages SWF Activity Module instances
  • Creates and manages grade items in Moodle’s grade book
  • Custom grade reports

The Flash Remoting service library does the following:

  • Establishes fast, lightweight, powerful two-way communication between Flash learning applications and Moodle
  • Handles user authentication, capabilities and permissions
  • Allows Flash learning applications to push and retrieve grades and user data in Moodle’s grade book
  • Allows Flash learning applications to retrieve user data such as avatars, VoIP client IDs, groups, etc. to facilitate social networking and web communication between learners and teachers

Accurately track learners’ activities while on-line

The custom grade reports are particularly interesting because they provide a much asked for function in Moodle activities, namely tracking the amount of time that learners spend on activities accurately. The problem at the moment is that Moodle can only record the time elapsed between requests sent to the server while learners are using a module. Between server requests, Moodle can’t tell whether a user was studying or if they went for a tea break, either way the elapsed time logged is the same. Since Flash learning applications run on learners’ computers, they can track mouse, keyboard, camera and microphone actions over any given period of time. If a learner goes for a tea break, mouse, keyboard, camera and microphone actions stop and Flash learning applications can take this into account, for example, by discounting inactive time. I had to create the custom grade reports because Moodle has no provision for this kind of user data.

Open up Moodle to more web services

The SWF Activity Module is far more than we’ve come to expect from Flash based learning interactions. The Flash Remoting gateway opens up Flash and Moodle to a wide range of 3rd party web services. Here’s a few possibilities to consider:

  • Deploy web conferencing clients that use open VoIP and chat protocols. Here’s an example of an existing project could be leveraged.
  • Deploy Flash clients that leverage Google Wave’s open protocol, when it goes fully public, for real-time multimedia collaborative projects.
  • Consume map, video, search and data services from providers such as Google and Yahoo!
  • Or any combination of protocols and services for media-rich, collaborative learning interactions. The sky’s the limit.

How can I use the developer preview?

This is where I need your help. I’d like this module to be tested in as many environments as possible except, of course, public servers so if you are a developer and have a development server with Moodle installed, this is where you can help. Installation instructions are included in the developer preview package and the Flash Remoting gateway comes pre-configured for Moodle. There’s also a sample “Grade Pusher” Flash application that simply pushes grades into Moodle’s grade book. Please try it out on your development servers and let me know if you encounter any problems with it.

The SWF Activity Module is proud to be open-source.