Moodle 1.9 Header Changes

Moodle 1.9 Header Changes

by Patrick Malley -
Number of replies: 5
The standard theme swaps out:



for

<?php print_container_start(true, '', 'header-home'); ?>


Can someone (perhaps Urs) explain why the change?

And, will my themes built on 1.8 infrastructures be missing something if I do not make this change?

I ask because themes using this method are not backward compatible with past Moodle versions.
Average of ratings: -
In reply to Patrick Malley

Re: Moodle 1.9 Header Changes

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Yeah I'm not happy about this change in standard/header.html.

It all about adding support for things like custom_corners, but this is one file where I think we do not need it. MDL-12221 is the bug.

(It won't affect 1.8 themes used in 1.9, but it would affect 1.9 themes being used in 1.8)

I'd like to take this out of standard. Urs, can you comment?
In reply to Patrick Malley

Re: Moodle 1.9 Header Changes

by Urs Hunkler -
Picture of Core developers

Patrick, please read my whole comment under MDL-12221.

One aspect about backwards compatible themes:

1.9 themes can't ever be really compatible to 1.8 because several CLASS names have changed from 1.8 to 1.9.

+1 to implement the enhancement (compatibility arguments not really count).

Different themes for 1.8 and 1.9 are necessary to follow these differences. In these different versions you may also implement the small header changes for 1.9.

@Martin The need for consistent container handling has been brought to recognition with the work on the custom_corners theme. Inconsistency and hacks have not been an issue for many developers until now. I have already been struggling with several Moodle pages due to this inconsistency in the past. I am glad that Petr is working on a solution.

In reply to Urs Hunkler

Re: Moodle 1.9 Header Changes

by Patrick Malley -
I guess I just expected that some CLASSES would be added and that others would be deleted. What logic necessitates changing CLASSES?

I'm all for updating my themes for the newest version, and I wholeheartedly support the work that is being done to make themes like custom_corners possible. I just think that creating a situation in which users must select this theme, but not that theme, due to compatibility issues is a move in the wrong direction (from a logistics and development point-of-view).
In reply to Patrick Malley

Re: Moodle 1.9 Header Changes

by Urs Hunkler -
Picture of Core developers

Patrick, why CLASS names have changed I don't know. I saw some changes when I checked the differences from 1.8 to 1.9 CSS code.

What I know is that Petr is going to implement a new version of print_container handling. There will be no more need to use print_container in the themes.

It will still be better to use print_container to avoid some automatically activated internal hacks but you don't need to.

In reply to Urs Hunkler

Re: Moodle 1.9 Header Changes

by Patrick Malley -
I love the addition of custom_corners and welcome any changes that make it possible. I will certainly create themes that utilize custom_corners, but am glad to hear that it's not a change that will be necessary. Thanks for the clarification.

PS - will the differences be published when 1.9 is released, or is it possible to see these change reports sooner?