The E-Learning Journey

The structure of learning in the classroom is very important. At the start of a lesson we review previous learning and declare objectives, we differentiate to enable each student to achieve their best, and at the end of a session we consolidate the learning which has taken place. Such structure helps to guarantee that our learners remember what they’ve been taught.

Such considerations are just as important for e-learning. Whatever platform or tool you are using it is important to ensure that content meets certain standards. Over the next few articles I will be exploring the structure of e-learning.

Break it up

In the classroom we are used to teaching in lessons or sessions. These lessons build up to a complete curriculum over which the learner will hopefully build an understanding of a given topic.

We all understand the need to break learning down in this way in the classroom, and it applies to e-learning just as strongly. An e-learning course may well need to be broken down into many lessons or modules.

Navigation and presentation of these modules can be handled in many ways depending on the tools you are using, however as a rule it is essential that a learner can see when they have achieved or completed any one module.

What is a lesson?

At this point it might be fair to pose the question “what is a lesson?”

Once again the answer can be found in our real world teaching methods where we are encouraged to identify learning objectives for a each session, and to ensure that students are aware of them throughout that session.

Learning objectives are effectively way-points on a learner’s journey and they give structure to a lesson. A learner with clear visibility of their objectives knows that as they tick off a learning objective they are progressing on their journey.

E-learning modules should be broken down into objectives in a similar way, with around three learning objectives identified at the start of a module. These should ideally be visible throughout the learning and updated so that the learner can see their progress.


There are obvious benefits to teaching with such a structure, but there are also hidden advantages which are specific to e-learning, some of which I will be covering in future articles:

  • It is easier to track your learners’ progress on both an individual and group basis.
  • Gamification of learning progress (such as user achievements and points) is much easier to implement.
  • It becomes possible to craft content which is applicable across multiple programmes where there are shared learning objectives.
  • Content becomes more manageable, you can more easily measure the impact on learners and swap out modules to improve a whole course.

Why strategy matters in e-learning

Over the years I’ve been involved in many implementations and re-implementations of learning tools or platforms. It’s a great opportunity to start afresh and reinvigorate an e-learning offering, but these efforts can only go so far in delivering the desired results.

What’s missing?

It’s convenient to think that by implementing a new e-learning tool you can resolve the problems your learners and trainers are experiencing, but in reality these tools are only a part of the picture.

To give an analogy: if a school was unpopular with it’s students and failing to meet its benchmarks, the chances are that the problems go beyond the school building or the architecture of a particular classroom.

It’s essential to take a step back and think about a wider e-learning strategy; that is to consider how you will be engaging your learners and empowering your trainers to achieve the results you want.

A wider strategy

An effective strategy for e-learning will be borne out of considering your objectives:

What kind of learners are you wanting to support? What is the best way to engage with those people?

When do you want your learners to work through your materials, and where will they be doing it?

How long do they need to stay engaged for, and what kind of impact are you hoping to have on them?

What metrics do you need to measure the effectiveness of the learning?

How will the learning experience be further developed and tailored? What will drive this process?

By answering these and similar questions you’ll begin to appreciate that there are certain workflows which suit your requirements better than others.

To give an obvious example; if you want to encourage a workforce to do reflective development outside of the office you need to ensure that the learning is available in a platform-independent format which is publicly accessible, and you may only need information about how frequently each user has accessed the system.

Content builds experiences

With this understand of how you want learners to work with the system you are now starting to get an idea of what the new system is going to look like. There’s just one big hurdle left… content.

If your content isn’t currently engaging, the chances are that just putting it in a slightly different format on a new system isn’t going to change anything.

In our example from earlier, you may have a great mechanism that supports reflective learning outside of the office, but if it takes 4 hours for a learner to achieve a learning objective the chances are the learners will do that whilst they’re being paid for it.

Consider your content. Is it user-friendly? Is it varied enough to keep them engaged? Is it relevant enough to them? How does its format support your initial objectives?

Also consider your trainers. Are they getting the information they need about the learning that has taken place? Do they find it easy enough to manage the content and improve on what’s there? Are they aware of your strategy and taking steps to meet your objectives?

If the answer to any (or all) of the above  is “no” (or “I don’t know”) then the chances are you need to consider what should change before you proceed. How could the content be formed? Who is going to improve or replace the content? How are they going to do it, and what are they going to need?

And finally…

The points above will inform your decision about what system to work with in the future. Whatever you choose, it needs to fit into and support this wider strategy, and in turn that strategy needs promotion and enforcement to ensure the success of your new e-learning tools.

Delegated Transactions with $DB

For the last couple of days I have been working on a new plugin called “MIS Enrolment” which allows you to connect to records on an external database and then enrol users onto a Moodle course based upon their participation within that programme. The enrolment method works by allowing teachers to create an abstract “link” between their course on Moodle and their programmes held by MIS.

Enrol MIS Instance
Teacher’s admin panel for linking their Moodle courses to MIS “programmes”

This creates a many to many relationship between Moodle courses and MIS programmes and will allow teachers to easily enrol both staff and students onto the correct courses based upon the records held by an organisation’s MIS. More information to come on this over the next few weeks!

For now I am revisiting an old problem which I originally dealt with in my first month of developing for Moodle 2. In order to get this enrolment method working effectively we have to create and maintain an internal copy of the data from MIS. Normally you could just truncate (wipe clean) your records and insert them again from source, but in this case I need to compare and check:

  • What records already exist? Do they need updating?
  • What records are new? They will need inserting!
  • What records are missing from MIS? They will need archiving!

And when you are looping through 10,000 records or more this can all result in a great many individual inserts, selects and deletions. So how can you maximise the efficiency of all this? This time round I am making use of delegated transactions in Moodle to handle the bulk of database inserts.

The mechanism effectively defers all the transactions with a database to one large transaction at the end of a process. As a result you can save lots of memory and significantly reduce execution time because your script isn’t constantly waiting on the database to return some data.

For comparison I tried inserting my test participation data of 9483 new records. Using the standard DB functions the script took 47 seconds to execute, working at a steady 202 transactions per second. By comparison the delegated transaction took just 10 seconds to handle exactly the same data inserts, an effective rate of 948 inserts per second.

If you are working with large datasets on Moodle I would definitely suggest checking this functionality out as part of your project!

Backwards compatible collapsible forms

If you are lucky enough to be running Moodle 2.5 the chances are you will have encountered the wonderful new collapsible forms. I’m really excited to get these onto our production server as they remove the user fear factor which can result from displaying a form with too many options

Collapsible Form Sections

If you are coding a new Moodle form and you want to take advantage of this, the sections can be collapsed or expanded like this:

$mform->addElement('header', 'generalsection', 'General Header');
$mform->setExpanded('generalsection', false);

Great! But what about if you want this form to work with Moodle 2.4 or earlier? The best solution to this is just to check that the setExpanded method exists within the mform class, and then to wrap your code with an if statement.

$mform->addElement('header', 'generalsection', 'General Header');
if(method_exists($mform, 'setExpanded')){

Hope that helps someone out there!

Making Moodle’s forms less intimidating.

Forms in Moodle have always been a bit lacklustre. Whenever I am training staff on how to use them I have to admit that the forms “look scary but are mostly irrelevant” when adding new modules or editing course settings. Gladly this is all set to change with the upgrade to Moodle 2.5.

For those of you who haven’t looked into this too closely I should explain that Moodle uses a class called MForm to make it really easy to build forms in Moodle. These forms are then rendered in a pretty standardised way. In Moodle 2.5 these forms have been streamlined to hide the superfluous settings within an expandable tab by default

I had been looking at the possibility of writing a YUI module to take these mform pages and give them a tabbed format which highlights sections with required fields. But with these improvements it may be possible to do this with just CSS.

I will keep posting about my progress, but it occurs that there are a few difficulties which I am going to have to think about fairly carefully:

  1. MForms are not used everywhere that you would expect. For example when editing the settings on the front page of Moodle I was suprised to find that it presents itself without any fieldsets and without the standard mform classes.
  2. MForms are used where you wouldn’t expect. Right the way through the course import process the pages are dynamic mforms in two columns making the styling look slightly out of place.
  3. Not all required fields are required. By which I mean that you can create a completely useless instance of the “File” resource, but really we want the attached file to be highlighted to the user as a priority. Somehow this has been overcome in the new version of Moodle, but I’m not sure how dependable that is.

Hopefully I will be able to come up with a non-invasive solution for tabbed forms in Moodle!