OU blog

Personal Blogs

Moodle 2.2 - Show descriptions

Visible to anyone in the world

I made a screencast about a new feature I wrote that will be part of Moodle 2.2.

Moodle already has the ability to write descriptions for a resource (link, file, ...) or activity (forum, ...), but these display on a separate screen. Using this new feature, you can choose to display descriptions directly under the link on the course main page.

View the screencast on screencast.com.

Thanks to Moodle HQ - Eloy (code review), Martin (approval, suggestions), Helen (suggestions, wording), Sam Hemelryk (testing). Also to Tim for helping with communication while I was away. And a few other people were involved as well - see the issue MDL-27001 for full details.

A bit of background about this feature - we particularly need it at the OU because in our 1.9 system we had the 'resourcepage' module which let people create pages with lists of files and links for students - and those files and links could have descriptions. Moving to 2.x, we replaced resourcepage with a new 'subpage' module - this lets you do a similar thing, but the key is that it now uses completely standard Moodle resources and activities, just like the course main page. So we had a problem when converting a course from one to the other: the descriptions disappeared. Ooops. Now it should be okay. smile

You could achieve something similar already by adding labels in all over the place, but the spacing is wrong (the system doesn't know your label is supposed to 'go with' the thing above it, compared to other labels that don't, so the space between is too much) and it's a pain if you ever have to move items (as you now have to move both the link and the label below it).

So, I think the feature should be useful for lots of people - not just us.

And by the way, using this feature doesn't reduce performance when viewing the course page, because when you turn on this option the descriptions are stored in the course 'modinfo' cache.

Permalink Add your comment
Share post


very useful!

Hi Sam -this is excellent! It has long been a confusion for people who add descriptions only to find they don't appear on the main page -and as you say, using a label is not a perfect solution. Thanks for this smile

New comment

It's a bit irritating that you have to manually change the display option from 'automatic' to 'open'.

Can't we just make 'automatic' more intellitent, so that when the description is displayed on the course page, it uses 'open'?

New comment

I like the new feature. Just a thought: Would it be possible to have the description showing up on mouse-over? Users would still be able to get the information without a click, but the description would not add to a longer page or what is sometimes called scroll of death?