Dangerous bug in Moodle

Just discovered a dangerous bug in the Moodle essay question template.

About the essay question edit screen

When you write an essay question in Moodle, there are a couple of different boxes on the form:

The question goes in the top. Then you have the “General response” (something the student usually can see when the results are released). Then the “Response Template,” which can be used for including text you want to appear in the answer box as soon as the question loads for the student (e.g. text like “Type your essay here”). And finally a grader box, where you can include tips for the grader (this shows up on the grading screen right above the student’s answer.

The problem

The bug involves the Response Template box: text entered there is difficult to delete. In particular, the fact that this box is empty on the “edit question” screen ‘’‘doesn’t mean the previous content is not being shown to the student’‘’.

I discovered this by accident: I had accidentally entered the grader tips into the response template box. When I realised my mistake, I went back and deleted the content of all the template boxes (by either “cutting”—i.e. <ctl>+x—or copying—<ctl>-c and then back spacing the text away).

But when I previewed the questions, the response template content was still showing up in the answer box, ‘’‘even though it was not visible in the template form box on the edit screen’‘’.

The solution

To solve this you need to do the following:

  1. go to the top left corner of the response box (that is probably where your cursor will start if the box has no visible content)
  2. holding down <shift>, move your cursor to the right, the way you would if you wanted to highlight existing content.
  3. delete the “highlighted text” (in fact, you won’t see any and your cursor won’t travel because there is no text visible in the box) by hitting the <bacspace> key.
  4. type in a few spaces to provide new, meaningless, content for the response template.
  5. save the question.

When you preview the question, the content of the answer box should just be the spaces you entered. I assume (but haven’t checked) that you can then go in and remove the spaces.

Discovered this ust before an exam went live. Whew!

tags: , , , ,


Get every new post delivered to your Inbox

Join other followers: