font size

font size

by * Ewelina * -
Number of replies: 9

My question is:

Can I change font size in quiz? I know, that I can do this in "questions", but I can't change it in "answers".
My platform will be about hebrew language. Font in quiz can't be so small, becouse we can't see the differents between letters. Złość

Please help me.

Average of ratings: -
In reply to * Ewelina *

Re: font size

by Gustav W Delius -
There are several things you can do, depending on how frequently you want to use larger fonts:
  1. If you want to use larger fonts on every page you visit then you can change the font size in your browser and tell your students to do the same.
  2. If you want to use larger fonts on every Moodle page then you can change your theme to use a different default font size.
  3. If you want to change to font size on every question or every answer on Moodle then you can change the font size in your theme specifically for questions or answers (thanks to Urs the styling of individual aspects of the question formatting is now possible in Moodle 1.6).
  4. If you want to change the font size only in individual answers then you can change the font size by including the style information directly in the answer.
If you tell me which one you are most interested in then I will tell you the details of how to do it.
In reply to Gustav W Delius

Odp: Re: font size

by * Ewelina * -

I want to change fonts only in "answers" in my quiz.
I've version 1.5 now. Should I update my moodle?
Now I can't do this in my theme :/
I try to change it in "fw_fonts.css", but there I can only change fonts on every page. I can't do this separate - only for "answers".

In reply to * Ewelina *

Re: Odp: Re: font size

by Gustav W Delius -
Yes, changing fonts only in answers is possible only in the upcoming Moodle 1.6 (which has not yet been beta tested, so don't use it on a production server yet). In Moodle 1.6 the answer area of a question is inside a div with class ablock so that if you add

.question .ablock {
      font-size: 18pt;
}

to the styles_fonts.css file in the standard theme then the answers will be printed in 18pt size.

In Moodle 1.5 you would have to surround each of your answers explicitly with something like <div style="font-size: 18pt;"> ..... </div>.
In reply to * Ewelina *

Re: Odp: Re: font size

by Joseph Rézeau -
Picture of Core developers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Eveline,

You do not say which type of questions your quizzes consist of. Anyway, the following workaround works for MCQ questions.

If you are using the formal white theme, in file fw_fonts.css, at the end, add this line:

#mod-quiz-attempt table table table table td {font-size:2em;}

The result is shown in attached screen shot. Of course you can use any font-size unit and size you like. I am using ems here because I prefer relative units rather than fixed ones.

I hope that helps,

Joseph

PS the screen shot comes from my own orange chocolate theme, where quiz answers are left-aligned rather than right-aligned as in standard Moodle themes. BTW, right-alignement is something which many Moodle users seem to be against. Let's hope it disappears from version 1.6 altogether!

Attachment Image1.jpg
In reply to Joseph Rézeau

Odp: Re: Odp: Re: font size

by * Ewelina * -
Thank You. Now - everything's OK   ^ _ ^  I've to back to school smile
In reply to Gustav W Delius

Re: font size

by Diane Salamone -

Gustav,

Could you please tell me how to change the default font size for my theme.  I am not a programmer in any respect, so please keep that in mind.

I appreciate your help!

Thanks, Diane

In reply to Diane Salamone

Re: font size

by Joseph Rézeau -
Picture of Core developers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Diane,
If you want to change font size in your theme for the whole of a Moodle site - not just for a quiz - then you'd stand a better chance of getting an answer by
a. posting your message in the Themes forum
b. mentioning which moodle theme you are actually using (standard, other theme, straight out of the distribution or customized, etc.)
Joseph
In reply to Diane Salamone

Re: font size

by Gustav W Delius -
Dear Diane,

let's assume you are using the standard theme. Then in the subdirectory theme/standard/ you will find a file styles_fonts.css. If somewhere in that file you add

div {
font-size:20px;
}

then you will find that the size of fonts is increased everywhere.

Then of course you will very quickly decide that you want it larger in some places and not in others and immediately you are drawn into learning more about CSS. The amount of control you have over the appearance of the Moodle pages is fun. You should then look into playing with the chameleon theme which lets you change things interactively.