Formatting True/false questions

Formatting True/false questions

by Ronald Vyhmeister -
Number of replies: 15

RIght now the true-false questions shows the true-false answers in a single line centered below the question. I'd like them to show up vertically on the left. Is there a simple solution to this?

Average of ratings: -
In reply to Ronald Vyhmeister

Re: Formatting True/false questions

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

With recent versions of Moodle, True/False answers are actually displayed vertically on the left.

Formulas_20210811_2034.png

In reply to Dominique Bauer

Re: Formatting True/false questions

by Ronald Vyhmeister -

OK... I think it's my bad... it's the True-false questions within a lesson that are placed centered on a single line.. not a simple true/false question in a quiz... Any ideas?

In reply to Ronald Vyhmeister

Re: Formatting True/false questions

by S G -
Hi Ronald, I guess the experts can suggest better solutions if you could include a screenshot of the issue you are facing.

Meanwhile, this is my rudimentary - non-technical 2 cents :

The default behavior of HTML elements is to get left aligned. If anything is getting center or right aligned, it is doing so because there is some CSS which is specifying the center / right alignment.

If you right-click on the elements that are the issue; and choose the 'inspect' option, the element and the styles that associate with it will be visible in the inspection windows.

Once you have identified the specific elements, you can just write a simple CSS to left align them (or override the CSS that is causing them to center align) and add the CSS into the additional HTML or the them additional CSS boxes.

You will not have to edit the core-code of the installation; so the CSS will not get overwritten when you upgrade Moodle.

Perhaps if you could upload a screen-shot of the element, the experts can point out what would be the appropriate CSS to use.

Also, expanding on what @Dominique has noted, the alignment is probably being caused by the CSS from the theme you are using; so mention the theme name as well.
In reply to S G

Re: Formatting True/false questions

by Ronald Vyhmeister -
Thanks July for the feedback... this is using the standard "classic" theme, without modifications... It would seem that there would be consistency between the quiz T/F questions and the lesson T/F questions.
In reply to Ronald Vyhmeister

Re: Formatting True/false questions

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

@Ronald,

It's extremely easy to achieve what you want, by using a MCQ question instead of the TRUE/FALSE question.

In reply to Ronald Vyhmeister

Re: Formatting True/false questions

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Can a moderator please move this discussion to the Lesson forum where it belongs?
In reply to Joseph Rézeau

Re: Formatting True/false questions

by Ronald Vyhmeister -
Thank you all for your assistance! The MCQ solution works for new questions, but the script fixes all those questions already in the system... Amazing community!
Average of ratings: Useful (1)
In reply to Ronald Vyhmeister

Re: Formatting True/false questions

by Ronald Vyhmeister -
I now need to do the same with a Multichoice question... so I thought that changing the True/False string in the JS would allow me to do the same (in the lesson)... but it does not solve the problem. The Multichoice answers show vertically, but aligned in the center... which is a slightly different problem. Is there an easy way to make these items left-aligned and not centered?

Thanks!
In reply to Ronald Vyhmeister

Re: Formatting True/false questions

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Please provide a screenshot showing your problem.
In reply to Joseph Rézeau

Re: Formatting True/false questions

by Ronald Vyhmeister -
Sorry... Here you go. We would like the options aligned left. Again, this is within a lesson.

Thanks for any feedback.

In reply to Joseph Rézeau

Re: Formatting True/false questions

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Just moving this to the Lesson forum as requested by Joseph...
Average of ratings: Useful (1)