Posts made by Urs Hunkler

Picture of Core developers

@ Look, the point is that switching the Moodle user interface to use templates would be a very big change, both conceptually and in terms of the amount of work that someone would have to do to implement it.

Whom do you tell? I did this work for the unodo lab site. And I know about the huge benefit - also from practice.

@ And it would not just just require work on the core Moodle code, it would also require changes in every third-party plugin.

With a clever refactoring strategy this change can be done in small steps. Only the parts that must work with templates need to be changed. On the unodo lab site template built pages work together with "old-fashioned" pages. On that site you see that in the "Basic round" design template built and "old-fashioned" pages coexist nicely - users wont notice any difference. Only in the "Flexible" design several pages look odd. The refactoring process can take as much time as needed and can be done in small steps.

@ And at the moment, Moodle works very well, for a lot of people.

I would rewrite this sentence: And in the moment, Moodle works good enough for a lot of people. For many people it doesn't.

And I don't talk about theory - it's daily work reality.

Picture of Core developers

And another one smile

@ At the moment, and without re-reading them all again, I would summarise the arguments given so far in favour of templates as: "Templates are a good solution for a large class of systems. For example they work well in Drupal." I agree that both those statements are true, but they do not say much about Moodle.

That is one aspect. Another very important aspect is flexibility. When I need to react on certain project specific demands Moodle needs to offer the flexibility to solve the task. If it doesn't I need to implement a minor solution. Or I need to hack Moodle core with all implications on updates.

That's inconvenient for customers concerning updates or inconvenient for the learners when the specific needs are not fulfilled.

I heavily argue against the "One size fits all" approach. Reality has often enough proven that the flexible approach helps much better. For the learners benefit.

Picture of Core developers

@ You could also try showing us how the templates for some common parts of Moodle might look. Some (quite challenging) examples would be course/view.php, mod/quiz/view.php, mod/quiz/attempt.php and mod/quiz/edit.php. The last three are naturally quite close to my heart.

Ask Martin D. I had sent him a rewritten course. By the way - he never answered sad

Picture of Core developers

Tim, thank you for your long answer.

I'll split my answers into several posting - with one aspect each.

@ I am struggling to see the connection between usability and templates.

Usability is much about functionality presented on the page and the place where a certain link/button or similar is presented on the page. To change these aspects you need to change the XHTML structure of the page - and that is the template when you have a template system.

@ View VC does all the UI in templates, so to do that, I of course had to edit the template; but then I also had to hack the PHP code, in order to make that information available to the template. So, in that one example, templates did not help at all.

Right, you only can change the presentation of existing elements or leave those elements out not needed in the specific use case. Most template engines offer the ability to add content when needed. So you should be able to add the content without hacking core functions.

@ every aspect of the interface is controllable by the templates in the theme

The templates in the theme override the core templates. Only changes go into the theme templates. When you want core changes you change the core templates.

@ someone expending a lot of effort could make a theme that didn't suffer from usability problems. However, that is only one theme.

Often you don't need a lot of effort to solve usability issues in certain use scenarios. In my daily work I don't need to solve basic Moodle usability issues. I need to solve some usability issues related to certain tasks in the very specific learning environment. If I would propose this special fix you would ask what the general use for Moodle might be. Here we are stuck. The client can't solve her special usability issue because Moodle is not flexible enough.

@ the alternative approach is for developers to fix the usability problems by fixing the PHP code.

In your argumentation you sketch an ideal world. When you check the Moodle Tracker you will find many proposals I have made to fix interface issues - many have never been solved. Or you will find issues where I wanted to optimize Moodle code and I asked for help because I was stuck. Many have never been answered. Moodle core developers have restricted resources and interface design and usability are not in the focus.

So your scenario that core developers are the only ones who can make Moodle work better is an illusion. Moodle needs to offer more flexibility that people working with Moodle can solve their issues themselves. And not by hacking PHP code with the implication to take care with every update.

That is one mayor reason why I argue for templates. When I am able to change the XHTML in the template without hacking core PHP code I can solve many issues within specific use scenarios easily.

There is no reason why these changes should not go back to Moodle core when they are of general interest. Your implication that the possibility to change the specific learning environment hinders Moodle from evolving in general I need to reject.. I suspect the opposite will be the case.

For example: When I propose templates you ask for examples. When someone optimized Moodle in a certain use case you have the example. But to be able to create working examples Moodle needs to be more flexible. Looks like a vicious circle.

Picture of Core developers

Hi Frank,

yep, another mayor argument for separating program logic and page view and then using templates is the opportunity to enhance usability.

Moodle with it's "One size fits all" approach offers all options the developers can think about to present and/or handle pages in the form the Moodle developers have decided. With templates in opposite usability experts and visual designers can decide how to present content and which parts of the given functionality users need in a certain context without hacking core code.

In the Moodle forums usability is definitely a topic. Discussions about usability solutions are seldom. Why not hand usability decisions over to communication and usability experts?

A well organized page with not more than the needed buttons can easily be presented to users with templates. Page content and button/links are all generated - in the template only the useful elements are freely arranged.

  • Study what your users need and what confuses them in your learning environment
  • Arrange the content as needed on the page
  • Display only those buttons/links users need - leave out the not needed and then confusing elements

In short - be able to use learning material/quizzes etc. in ways the Moodle developers never could think about. Not "One size fits all" but individually optimized pages for a superior user experience can be the result.

Did I mention that Moodle will benefit from templates in many ways?