Posts made by David Scotson

FYI: I found out what these mean while discussing a separate issue.

The files are later processed by Javascript. These marking are basically comments. They mean, don't change this classname, as it's looked for later in the javascript.
Average of ratings: Useful (1)
No problem,

some discussions from the MoodleMoot over in Ireland the other day seem to suggest your tool is going to be adopted into core. That'll really help with the development of new themes. I'd love to see it expand to cover each and every renderer in Moodle. I think of it as a visual unit test.

cheers,

dave

Moodle in English -> Themes -> Theme test course -> Re: Theme test course

by David Scotson -
It's not exactly what you're asking for but there's a tool built into Moodle that will generate test data. It warns you only to use it on test sites, and it's slightly broken (I think you have to deselect Quiz and Workshop to get it to work). I think it's at:

admin/tool/generator/index.php

There's also the Totare Element Library, add-on which shows lots of elements of Moodle (forms, tables) and how they look under a theme.
Average of ratings: Useful (2)

Moodle in English -> Themes -> Sending old IE users to Base theme?

by David Scotson -
Is anyone using Moodle's ability to detect the user agent and send different themes to different browsers to provide a fallback for users of IE6 or 7?

I'm wondering if there's any performance impact for the people who get the "main" theme, and whether anyone has modified the Base theme to pop up a little explanation of why they've been sent to the alternative theme.
Average of ratings: -

Moodle in English -> Themes -> Bootstrap 3 progress -> Re: Bootstrap 3 progress

by David Scotson -
Hi Alfonso,

what you describe is the approach I started with, except I used LESS rather than SASS (partly because Bootstrap itself uses LESS and partly because there was a PHP port of the compiler that I could build into Moodle). Indeed I still use this technique in my Bootstrap Renderers project for any part of Moodle that I've investigated and found can't (yet) be updated with renderers. Even for the stuff I've rewritten the renderers for I still compile from LESS on-the-fly as that allows you to radically re-theme just by changing a few variables.

This thread covers a lot of this ground from when I was just starting with renderers and had just converted to using LESS:
https://moodle.org/mod/forum/discuss.php?d=208162

But even with the benefit of LESS that rapidly became an unmanageable mess. I spent more time working around my own workarounds and Moodle's existing CSS than I did improving things. That's why I started the more radical Bootstrap Renderers project which ditches all existing Moodle CSS and attempts to do as much as possible with stock, unchanged Bootstrap CSS and Moodle renderers to fix the HTML to conform to Bootstrap rather than vice versa.

I have compromised slightly in that rather than just leave the unrenderable stuff completely broken I've more recently started to patch those up using the old LESS import techniques (as long as it doesn't interfere with the other work too much). This was because the radical approach worked so suprisingly well that I thought I could actually get a usable theme out of it. The most widespread examples of un-re-rendererable content are forms and tables, though there are hundreds of tiny things hardcoded throughout Moodle:

https://github.com/ds125v/moodle-theme_bootstrap_renderers/blob/master/style/moodle/forms.less

https://github.com/ds125v/moodle-theme_bootstrap_renderers/blob/master/style/moodle/tables.less

I've also been trying to document (and file bugs) about clashes between current Moodle and Bootstrap CSS. This "undo" file has shrunk since I started using renderers to fix the core code myself instead of just work around them (though older versions are still in github).

https://github.com/ds125v/moodle-theme_bootstrap_renderers/blob/master/style/moodle/undo.less

There's currently some talk about getting a Bootstrap theme into 2.5. I'm just about to update the various bugs I filed so hopefully these could reconsidered in that light and simply be fixed once and for all rather than being worked around constantly (and not always 100% effectively) by themers. Originally, I just renamed the Bootstrap classes, but diverging from upstream Bootstrap became far more work than simply rewriting Moodle.

And that, in a nutshell, is why I started this Bootstrap Renderers project. I have my own internal theme that I don't want to take too far away from core, and Bas Brands has a Bootstrap based theme for general use which again isn't doing anything too crazy with renderers. One or two people can't rewrite the whole front end of Moodle alone. It's just too big a job, even if you leverage Bootsrap and related tech. But, at the end of the day, the rather archaic front-end HTML in Moodle needs to get fixed. That's why Amy Groshek and others have been pushing for a styleguide and consistent, modern markup (https://moodle.org/mod/forum/discuss.php?d=216519#p942848).

I'm hopeful that by showing what's possible with Bootstrap Renderers that people might think it's easier just to adopt the widely used, battle-tested conventions from Bootstrap for this purpose and then I wouldn't need any renderers, since all the stuff I need would be in core and getting properly QA'd. Unfortunately I think there's still a general feeling that "themes" are just frivolous decoration rather than a tricky software engineering challenge and so people often underestimate the difficulty.

Currently getting a Bootstrap based theme into Moodle 2.5 is the big priority. Your experience with Moodle and Bootstrap would be welcomed in the bug (https://tracker.moodle.org/browse/MDL-38016). My own goal here is on getting the standard Bootstrap CSS included with a Moodle theme that is QA'd by Moodle core. I think if that happens then the core and themes could evolve together and get much better, very quickly, particularly so if the community all work together on this. At the moment a crazy amount of energy is being wasted on working around things in core Moodle as if they're set in stone.