Large space in short answer Moodle questions

Large space in short answer Moodle questions

by Josep Mencion Seguranyes -
Number of replies: 10

Hi everyone,

I work with Moodle version 3.8, and I am creating a Moodle course, and I see that in my questionnaires, in the short answer questions, I get a very large blank space between the space after the answer space, like a big frame, which is annoying if you want to show many questions. Would you know how to remove it?

Thank you very much,

Josep

foto1


Average of ratings: -
In reply to Josep Mencion Seguranyes

Re: Large space in short answer Moodle questions

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
See point 3 here https://docs.moodle.org/38/en/Short-Answer_question_type#Question_set-up for how you can control the placing and the size of the box.
Average of ratings: Useful (3)
In reply to Tim Hunt

Re: Large space in short answer Moodle questions

by Josep Mencion Seguranyes -
Thank you very much for your helping, but by reading point 3, I don't achieve to control the size of the box, because the box I want to control is the blue, which has a large height.
In reply to Josep Mencion Seguranyes

Re: Large space in short answer Moodle questions

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

Hello Josep,

You have to allow for: 

  • the space required for: 
    • the [Check] button,
    • messages such as ''Please enter an answer",
  • the height of the question block on the left.

So I don't think this space should be removed.

You may or may not find it looks better if you remove the light blue background by adding the following to your site's CSS or to the question text of any question on a page (for the latter, use the plain text editor):

<style>
div.que .formulation {
  background-color: #FFF;
}
</style>
Average of ratings: Useful (1)
In reply to Dominique Bauer

Re: Large space in short answer Moodle questions

by Josep Mencion Seguranyes -
Hi!
Thank you very much for your quick answer, but I have seen in different Moodle versions how short answers had a normal height, as in this image link:
So I think that a manner to modify that height should exist, I don't know if modifying any CSS file or if you know.
Thank you very much!
Best wishes,
Josep
In reply to Josep Mencion Seguranyes

Re: Large space in short answer Moodle questions

by Josep Mencion Seguranyes -
And this large space only appears on short answer questions, not for example on cloze questions, or multiple choice questions.
Thank you very much,
Best wishes,
Josep
In reply to Josep Mencion Seguranyes

Re: Large space in short answer Moodle questions

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

May it is obvious, but I don't see what ordinary setting (question behaviour, review options, appearance) will give you what you want. Maybe someone else sees it.

Or maybe they are using a different theme from Boost. Or maybe they are applying further CSS.

Can you give more specific references to those "different Moodle versions" ?
Average of ratings: Useful (1)
In reply to Dominique Bauer

Re: Large space in short answer Moodle questions

by Josep Mencion Seguranyes -
Hello Dominique,

That's true, I checked it and there's no option on Moodle, I think it must be a code "mistake". My Moodle version is 3.8.3 and there's no modification, and I am using the Boost theme (the classic one).

I don't know if this is a problem which I only perceive, but I realised that this also happens with other Moodle installations.

Thank you very much,

Best wishes,

Josep
In reply to Dominique Bauer

Re: Large space in short answer Moodle questions

by Josep Mencion Seguranyes -
Another example is this one:
this is not my moodle 
(This is not my Moodle, is a screenshot from Internet). 

I have tried changing my theme, and the space given is the same, and I was wondering to remove that large space, but I don't know if this is a general or a particular problem. Anyway, I think there should be a way to modify that height. 

But I have made a discovering: this only happens when the text is not so long, because, for example, when the text the question has a minimum lenght, this margin is removed. It seems like the box had a minimum height. 
This is my screenshot:
this is my moodle (a cloze test)
Thank you very much,
Best wishes,
Josep
In reply to Dominique Bauer

Re: Large space in short answer Moodle questions

by Josep Mencion Seguranyes -
Oh! From the Firefox inspecting tool, I've discovered that by disabling the option "display: box", that space is removed. The problem is that I don't know now how to remove this completely and definitely from my CSS template. 

Do you think you could help me do this?

Thank you very much, I attach a screnshot!

Best wishes,

Josep

.
In reply to Dominique Bauer

Re: Large space in short answer Moodle questions

by Josep Mencion Seguranyes -
Hi!
Thank you all very much for your help, I've definitely achieved it. I had to edit the code on /public_html/theme/boost/style/moodle.scss
Searching .clearfix, where it shows "display: block;", I removed the word "block", and the problem is now solved.
The unique problem now, I don't understand why, is that my "brand" theme color has been changed to the default blue one, and I don't know how to change it, because even I do, it remains being the same.
Another time, thank you very much,
Best wishes,
Josep