The Case for Moodle Templates

February 18, 2009 • 8 Comments

I spent a couple hours last night designing a theme for Moodle, only to realize that it’s probably not possible without altering the Moodle core code.

Altering the core code is not something one should do since a.) future upgrades will overwrite any core code changes that you make, and b.) core code changes are not very friendly if you wish to share/sell your theme to other users. Therefore, as one of a small handful of Moodle theme designers, I’d like to help Urs make the case for Moodle templates.1

Let me start by showing you the theme that I’ve designed.

tough_source

There is nothing particularly mind-blowing about this design, but it does have subtle problems that are simply not possible with the way Moodle is currently coded.

Here’s a simple graphic that should illustrate the limitation:

Default Moodle theme layout

So, basically, (without using hacks) all Moodle themes must:

  1. support three columns.
  2. have a header that is directly above all three columns.
  3. have a footer that is directly below all three columns.

Thus, all Moodle sites are damned to continue looking (as one recent client put it) “Moodley.”

Here’s what I propose as an alternative:

Give the Moodle theme folder access to rewrite the layout of course formats and index.php. While I would like even more access to the Moodle layout, this would seem to be a reasonable start.

This would allow for any number of different Moodle layouts. Here are just the most basic I could think of in a matter of minutes:

moodlethemeidea1Standard Moodle layout sans layout table so that the right column can be extended to the top of the page and the header can be floated to the left.

moodlethemeidea2Same as above with the left column to the right of the content. This gives some amount of authority to the course content over the sideblocks.

moodlethemeidea3No left column at all. Why couldn’t Moodle recognize when a theme only included one sideblock column and only include vertical movement options?

moodlethemeidea4This is a layout I’ve thought about before that would make sense if you wanted to give priority to your course navigation and content blocks and wanted to downplay (but still keep visible) the more social blocks (messaging, tags, etc.).

I realize that my argument is purely cosmetic, and that my examples (with the possible exception of the last one) don’t necessarily prove that there is an educational necessity for this change, but some attention has to be paid to how inflexible Moodle is from a design standpoint.

I’m interested in hearing your thoughts.

  1. There are currently two discussions to follow on this issue on Moodle.org: The first post (which I discussed earlier this month) is in the General Developers forum. The second, and currently most active, is in the Themes forum.

8 Comments

  1. Dan R wrote:

    Patrick, this seems like a vast improvement and would offer the kind of design flexibility that would, as you say, help to break the instantly recognisable Moodliness of the current theme technique.

  2. Great proposal! I’m all for more layout options.

    How extensive of a code rewrite would your solution require? How does this compare to how other sites are themed (WordPress, Drupal, etc.)?

  3. I’m not a programmer, so I can’t say how much work will actually be involved in making templates available to Moodle themes. However, from what I’ve gleaned from other conversations on Moodle.org, it will be quite an extensive undertaking. For this reason, there’s some arguing back and forth.

    How Moodle templates will look in the end is still quite up for debate. We’ll have to just wait and see.

  4. [...] sérias limitações e trava o trabalho dos designers de interface. Veja esse artigo sobre o desenvolvimento de temas para o Moodle, que acaba sendo uma ótima análise sobre a estrutura do sistema em si. O artigo foi escrito por [...]

  5. Stephen wrote:

    In addition to working with Moodle, I do a lot of work with Joomla as well. I’d love to see a templating schema/system much like the one you’d find in Joomla. Flexibility in defining regions and sections and where there are located in the final output really does go a long way toward a useful separation of content from format. It opens up possibilities for creating templates optimized for Section 508 delivery or formatting conent for mobile devices like iPhones. Heck, the system is so flexible, there are even Websites what will build the framework on the fly for you (http://www.joomlatemplatebuilder.com/template-builder.php).

  6. ¿Cómo puedo eliminar la zona donde aparece el nombre del sitio?. No quiero que aparezca en el tema de un curso.

  7. Hello Carlos,

    This is not the place to request support for Moodle. I recommend that you submit your issue to the support forums at http://moodle.org.

  8. Stephen wrote:

    I agree, it is some what disheartening the limitations to designing for aesthetics and usability in Moodle. If a templating structure such as the one mentioned for Joomla, or better yet, like Wordpress, was implemented I believe there would be alot more happy people using Moodle.

Leave a Comment




Feel free to use the following tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>