Issue Details (XML | Word | Printable)

Key: MDL-19077
Type: New Feature New Feature
Status: Open Open
Priority: Critical Critical
Assignee: Tim Hunt
Reporter: Tim Hunt
Votes: 0
Watchers: 4
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Implement the theme engines proposal

Created: 06/May/09 12:25 PM   Updated: 03/Sep/09 01:18 PM
Return to search
Component/s: Themes
Affects Version/s: 2.0
Fix Version/s: 2.0

File Attachments: 1. Text File blocks_output.patch (102 kB)
2. Text File theme_engine_infrastructure.patch (44 kB)
3. Text File themes_cleanup.patch (96 kB)
4. Text File work_in_progress.patch (98 kB)

Issue Links:
Dependency
 
Relates
 

Participants: Dan Poltawski, Eloy Lafuente (stronk7), Frank Ralf, Thomas Hanley and Tim Hunt
Security Level: None
Affected Branches: MOODLE_20_STABLE
Fixed Branches: MOODLE_20_STABLE

Sub-Tasks  All   Open   
 Sub-Task Progress: 


 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Frank Ralf added a comment - 09/May/09 01:35 AM
Hi Tim,

I have just stumbled over this website http://realworldstyle.com that provides CSS layouts with 2 or 3 columns, header and footer, which even work with NN4 (I'd call that robust...).

hth
Frank


Thomas Hanley added a comment - 21/May/09 10:44 PM
Hi Tim,

Maxdesign are pretty reliable with regard to web standards and accessibility.

http://maxdesign.com.au/presentation/page_layouts/

The CSS-discuss list also has alot of info on this, presented in a table showing solutions that are both fixed and fluid. It also shows browser support:

http://css-discuss.incutio.com/?page=ThreeColumnLayouts

~thomas


Tim Hunt added a comment - 17/Jun/09 07:57 PM
The attached patch (theme_engine_infrastructure.patch) implements most of http://docs.moodle.org/en/Development:Theme_engines_for_Moodle%3F

It does not yet implement any actual rendering methods to replace the ones in weblib. However it does implement all the renderer_engine infrastructure, and a working template renderer.

There are unit tests, and PHP doc comments, which hopefully show how it works.

(Note, while the template renderer does work, it probably does not have very good performance. Consider it an interesting proof-of-concept until it has had extensive testing.)

Code reviews and comments welcome. I would like to commit this tomorrow, and then move on to re-implementing all the weblib print_... functions as moodle_core_renderer methods.


Dan Poltawski added a comment - 17/Jun/09 11:17 PM
Wow, i've reviewed the code and i've learnt bits of php magic I didn't know existed! The only thing I can add is to point out two comment typos:

taking the frist one
Render the template for a gives method


Tim Hunt added a comment - 25/Jun/09 08:38 PM
Attach my current work in progress as a backup.

Tim Hunt added a comment - 26/Jun/09 05:10 PM
OK, another big chunk checked in.

Tim Hunt added a comment - 30/Jun/09 09:21 PM - edited
Another work-in-progress patch (themes_cleanup.patch).

This one cleans up how themes are initialised, and how the theme CSS is processed.

The bit I would really like someone to review before tomorrow morning is the change I have made to themes styles.php files. Is this a good idea. (Make sure you also look at the code in deprecated lib to keep old themes working.)

I plan to test this a bit more tomorrow, then commit it.


Tim Hunt added a comment - 01/Jul/09 01:57 PM
The work in themes_cleanup.patch is now committed.

Tim Hunt added a comment - 08/Jul/09 08:45 PM
Another big work-in-progress patch. (blocks_output.patch)

This moves blocks output into the theme layout.php file, and deletes it from everywhere else.

Not quite complete. quiz, lesson and resource module need a bit more work. custom_corners_core_rendererer::block also needs to be updated.

At the moment, the diffstat is about -500 lines of code.


Tim Hunt added a comment - 09/Jul/09 06:26 PM
OK, that huge patch committed. By the end it was -900 lines.

I know blocks editing is broken, and there is a bit to clean up in lesson, quiz and resource.


Eloy Lafuente (stronk7) added a comment - 06/Aug/09 06:04 PM
Note: I've changed:

public function heading($text, $level, $classes = 'main', $id = '')

to:

public function heading($text, $level = 2, $classes = 'main', $id = '')

so, level is now optional and defaults to 2.

Commented in HQ chat.