Moodle Fonts - Help Required.

Moodle Fonts - Help Required.

by Daniel Goodhead -
Number of replies: 3

Dear All,

I have been asked to change all the fonts for all the courses on our Moodle site. We have roughly 30 or 40 courses which in the grand scheme of things I know is small, but all the same I am cringing at the idea of having to go into each course manually and changing the font within the HMTL editor.

Does anyone know a way using php I can say set all the courses we have to have the same font and font size.

Any help with this would be greatly appreciated.

Many Thanks,

Dan.

Average of ratings: -
In reply to Daniel Goodhead

Re: Moodle Fonts - Help Required.

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Well, you may be able to do this using CSS in your theme.

Alternatively, you might be able to do some search-and-replace in the database to strip styling from content, so only the stying in your theme is used. That is potentially dangerous.

Or you could write a Moodle filter to strip styling in content when it is output.


For the future, you could customise the HTML editor using the admin screens, to prevent users from explicitly setting font sizes in content using the editor.
In reply to Tim Hunt

Re: Moodle Fonts - Help Required.

by Daniel Goodhead -

Hi Tim,

Thanks for your quick response, which method would you recommend as the easiest/safest way to go about this? and could I have a little more depth as to how to go about this.

Many Thanks,

Dan.

In reply to Daniel Goodhead

Re: Moodle Fonts - Help Required.

by ben reynolds -
Speaking as an educational administrator, I have to say the request to change font sizes seems to have come from an ill-educated educational administrator tongueout

I suspect you are going to have some fairly strange outcomes if you have tables or equations or images wrapped by text.

Is your requester aware that font size in a browser can be changed by hitting ctrl and plus or minus?

I think I would check with some of the builders of those courses to see what kinds of trouble you might have.