Question pages

Question pages

by Mario Abbondati -
Number of replies: 1

It's my first time using lesson activity. When I add a multiple choise question page, the answers are centered, rather then aligned with the question text. In the case of fill in the vlanks question page, all contents are centered, and in the essay question page, the answer field is aligned to the right. Is there a way to keep everything left-aligned?


Average of ratings: -
In reply to Mario Abbondati

Re: Question pages

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

Hello Mario,

The only possible solution is to add some CSS rules in your site's theme settings. Of course you need to be the admin of your site (or persuade your admin to make those changes for youwink).

Let's suppose your Moodle site is using the default Boost theme (if using a different theme, then replace Boost with your theme's name in the instructions below)

  1. Go to Dashboard / Site administration / Appearance / Themes / Boost
  2. Click the Advanced Settings tab
  3. In the Raw initial SCSS box, add the following CSS rule:
    #page-mod-lesson-view .fcontainer *, *::before {
        box-sizing: content-box;
    }

This will align everything in the lesson questions to the left. Please be aware that adding this CSS rule may have unwanted effects in other parts of your Moodle site, so be careful!

I am attaching 3 screenshots showing the result (all question text is left-aligned).

---------------------------------------------------------

---------------------------------------------------------