Posts made by David Scotson

Regarding the HTML in course/renderer.php, I'm a bit confused about how that can be overridden by themes.

I'm currently trying to do this in 2.4, where some of the renderer functions already exist. And while I can override these functions, my version is never called because the specific course format (e.g. topics) doesn't inherit from my renderer, it inherits from the core version. How can you actually change anything in course/renderer.php and not have it overwritten by subclasses?

Moodle in English -> Resource types -> MP4 video files

by David Scotson -
What is expected to happen if you upload an .mp4 video file to Moodle 2.3?

I was kind of expecting something along the lines of Croc Kamen's Video for Everybody:

http://camendesign.com/code/video_for_everybody/test.html

where it tries to use the video tag and if that fails it falls back to using Flash.

Instead I seem to be getting different code sent to different browsers, sometimes using Quicktime, sometimes using Flash and sometimes using Video, but I can't figure out what the logic is behind what it chooses.





Average of ratings: -
Ah, I thought you were referring to the color-picker screenshot where the items were laid out in a 3x4 grid rather than in a vertical column.



Is that the right bug you linked to? The rather haphazard collection of different forms HTML in Moodle is an issue I'd like to see fixed (I think I've filed a few bugs on it myself) but I'm not sure I see the link to grids and/or pagelayouts.

Do you mean adopting the Bootstrap grid like you've used on your Tiny Theme? (https://github.com/lazydaisy/tiny-bootstrap-project/blob/master/layout/default.php) That is, the use of classes like .container, .row, .span3 to divide the page up in to sections? It's a good idea, but again I don't see why you wouldn't want that everywhere, rather than just the admin or reports sections. Certainly I'm using it everywhere.
Bootstrap 3 allows you to use the standard bootstrap grid system to have more than one form control on the same line, but it re-arranges them into a vertical list for use on phone size devices (as the general grid system does for any content).

However, I don't see how this (or anything like it) can be done cleanly without making changes to core parts of Moodle that create the forms.

Moodle in English -> Themes -> Course renderers in 2.4

by David Scotson -
So I'm looking at the renderers for the course formats in 2.4.

Changing the functions in the topic renderer works as expected, however my class (theme_bootstrap_renderers_format_topics_renderer) inherits from format_topics_renderer, which in turn inherits from format_section_renderer_base. There is also a renderer for that (so theme_bootstrap_renderers_formate_section_renderer_base) however since the topic renderer doesn't inherit from my renderer, but directly from the core class it would seem (and I have to admit this is confusing enough that I'm not sure) that regardless of what changes I make to the base renderer, I'm at the mercy of the core renderers if they decide to override any of these classes, which means I need to override in each of the course formats rather than doing it once in the base class.

Is that how it's supposed to work or am I doing something wrong?
Average of ratings: -