Remove question box

Re: Remove question box

by Dominique Bauer -
Number of replies: 0
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello Manh,

If you are the administrator and want to remove or edit the question box for your entire site, you should modify the PHP files and I'll let the others explain how to do it.

If you are a teacher, do not have access to site administration and want to remove or edit the question box in your own quizzes, you can easily do this with CSS in a <style> tag. Note that the 'Atto HTML' editor will automatically delete the <style> tag and everything it contains. You must use the 'Plain text area' editor to keep the <style> tag and the CSS it contains. If you use the 'Atto HTML' editor, you could achieve the same thing using a Java script, but it works somewhat differently.

Using the 'Plain text area' editor, simply add the following code to the very beginning of the HTML code for any question:

<style>
div.que .info {
  display: none;
}
<style>

This will remove all the question boxes on a quiz page. If, for example, you want to remove only the first question box (note that the count starts at '0'), use:

<style>
div.que:nth-of-type(1) .info {
  display: none;
}
<style>

This is very quick and incomplete information. You need to know CSS, check the source code and inspect the quiz page using the Developer Tools (F12 on Google Chrome).

Don't hesitate to ask any other questions.