## Quiz

### Why does moodle permit an empty question?

Why does moodle permit an empty question?

When making up quizzes, I often type the question in the label (which is required) and then copy paste it to the question.  If I forget to copy the label into the question, it lets me save the question without complaining.  Rarely, this empty question makes it into a student quiz assignment.

Why doesn't moodle check that there is some text in the question box?

Using Moodle 2.3

Average of ratings: -
Re: Why does moodle permit an empty question?

There was a thought that people might want to create a quiz where the questions are printed on paper, and students just type the answers into Moodle.

However, I am not sure I really believe that, so perhaps the time has come to make question text a required field.

Would anyone object if we did that?

Average of ratings:Useful (2)
Re: Why does moodle permit an empty question?

Guess that makes sense but I wonder how many people do that.  I wouldn't mind forgoing that "paper option" myself.  If others object, it might be nice to have a mode toggle that would either permit or not permit empty questions on the category level (at least while editing).

I don't know how those using paper could ensure that the paper question matched the moodle answer since question editing is made in a separate location than the quiz activity and since quiz question order can be scrambled.  The existing behavior would be beneficial to those who want to assign questions from texts without rewriting the questions themselves, which is what I have been doing.

Average of ratings: -
Re: Why does moodle permit an empty question?

I have one teacher that distributes questions on paper, but he indicates the question number in the question text field.  I do not see a problem making it required.

Average of ratings:Useful (1)
Re: Why does moodle permit an empty question?

OK, so this is MDL-13382. In the last 5 years it has attracted 0 votes, so that is hardly a strong mandate for doing anything. Still, that is the place to vote now.

Average of ratings:Useful (1)
Re: Why does moodle permit an empty question?

Thanks Tim.  I voted for it. Guess its not a big deal.  It would seem that at least the number of the question on paper being answered should be included for paper tests.  Its not too hard to remember to copy the label text to the question.  Just adds a few steps to every question (say in comparison to letting the question and the label be optionally the same).

Average of ratings: -
Re: Why does moodle permit an empty question?

I can certainly see a scenario for having questions with empty question text.

Description question containing e.g. a reading text and some instructions, followed by a number of MCQ questions consisting of statements about that text, all on a single page. It would be redundant to have to enter the same question text in all those MCQ questions, i.e. "Select the statement which best corresponds to the contents of the reading text".

So Tim, please do not make question text a required field. Keep things as they are.

Joseph

Average of ratings: -
Re: Why does moodle permit an empty question?

I am with Joseph.

I find very disturbing the fact that some Moodle users want to remove a feature used by some other Moodle users just because they don't use it and so they see it as pointless.

If questiontext become mandatory all questions with an empty questiontext will become invalid. Why would you make other people's questions invalid ? Of course when re-editing the question they just have to enter a non breaking space, but why would they have to do that just because you think that such questions should not exist ?

Each time I edit a file resource created some years ago, Moodle absolutely want me to put something in the Description field. I find this silly. I don't use this field, the name is enough for my needs. By just because someone has decided Description is mandatory I am forced to copy and paste the name in the description or type something.

Of course not exactly the same problem but IMHO if a field is not absolutely necessary for the program to operate it should not be made mandatory.

Average of ratings: -
Re: Why does moodle permit an empty question?

It would seem to be good to be able to set what fields (of those that are not absolutely necessary for function) are mandatory at a site and class level. That would seem to solve both problems.

Average of ratings: -
Re: Why does moodle permit an empty question?

I think that is a little bit hard-line Jean-Michel and Joseph.

We know that the fact that question text is optional does lean some people to accidentally omit it. (That is where this thread started.)

Suppose we could determine that almost nobody makes use of the theoretical possiblity that you can leave question text blank. Then making it a required field would save some peopel from silly mistakes, and would inconvenience almost no-one, so it would be the right thing to do. You could even make the upgrade script convert empty question texts to a non-breaking space, so questions did not become invalid.

At the very least, it is worth having a reasonable discussion about this, without shooting people down.

Average of ratings: -
Re: Why does moodle permit an empty question?

@Jean-Michel, thank you for your support.

@Jean-Michel and Tim, please note that inserting a non-breaking space in a required field will not satisfy the "non-empty requirement". I've tried it.

Tim "... the fact that question text is optional does lead some people to accidentally omit it"

Well, that's too bad. The fact that some users are not careful enough is no reason to remove a feature which is useful to other (more careful) users. And I don't feel I am "shooting people down" by expressing that opinion.

Joseph

Average of ratings: -
Re: Why does moodle permit an empty question?

Further to my previous post, please note that, when Adding questions to a Quiz, any question with an empty question text is clearly marked in the list of Quiz questions. So there is no excuse for  Quiz creators to miss that condition.

Joseph

Average of ratings:Useful (1)
Re: Why does moodle permit an empty question?

Additionally external software like Examview, TestGen, Blackboard can produce questions with an empty text (if I remember well one of them does produce match questions that all have an empty text).

So if empty questiontext are one day forbidden in Moodle, it will be necessary to modify some import formats to ensure a default questiontext is added during import to these questions or the import will fail.

Average of ratings: -
Re: Why does moodle permit an empty question?

That red highlight seems to be a good design.  I wonder if the OP can come up with another feature along that line - making sure the user knows that the question is empty.  (What some UI designers call visibility.)

(BTW a dialog asking "are you sure?" generally isn't what I'm talking about, because people click "yes" almost reflexively.)

Average of ratings: -
Re: Why does moodle permit an empty question?

Thanks.  I hadn't noticed that feature in the quiz creation. On version 2.3, the warning isn't red so it would be easier to miss, especially if the warning is [Empty qu] which is possible with certain layouts.  In any case, if Moodle is going to automate checking the label, at least it should permit automatic checking for empty questions if a user wants such checking.

After hearing opposing viewpoints, I think we all agree that keeping empty questions is useful for some.  What I'd like to hear agreement on is a setting to avoid accidental empty questions at the point of question creation, not just when the question is added to a quiz.

Average of ratings: -
Re: Why does moodle permit an empty question?

Hi Tim,

Just noticed that if I create a question with only an image in the question text, the Quiz editing interface also displays the [Empty question text] warning. I have to agree that an image is not "text", but on the other hand we may argue that since it contains an image, the "question text" field is not empty.

Would you consider removing that [Empty question text] message if the question text field contains just anything (text, image, media, etc.) i.e. it is not empty?

Joseph

Average of ratings: -
Re: Why does moodle permit an empty question?
And I don't feel I am "shooting people down" by expressing that opinion.

There is a big difference between discussing user interface design and going after people personally.  To me, this sounds more like "shooting people down" than discussing the best user interface for Moodle:

I find very disturbing the fact that some Moodle users want to remove a feature used by some other Moodle users just because they don't use it and so they see it as pointless.

Since there's no mention of user interface elements anywhere, and repeated comments about the person who mentioned the concern, some might see that as not so much a discussion of user interface design as it is a personal attack.

That comment about "shooting people down" might also reference the following.  Do you think this is about the interface, or are most of these words about the people involved in the discussion?:

Why would you make other people's questions invalid ? Of course when re-editing the question they just have to enter a non breaking space, but why would they have to do that just because you think that such questions should not exist ?

Maybe calling people sloppy will be productive:

Well, that's too bad. The fact that some users are not careful enough is no reason to remove a feature which is useful to other (more careful) users.

Is that how you talk to people face to face at work, attacking their motives because they aren't familiar with your use case?

Average of ratings: -
Re: Why does moodle permit an empty question?

Well explained Ray. We should also note that Joseph is Particularly Helpful Moodler, who has made many positive contributions to this forum over the years. We all slip up sometimes, and we can all always learn to improve.

Now, in other parts of this thread, the discussion is moving in more productive directions, so let us continue there.

Average of ratings: -
Re: Why does moodle permit an empty question?

Hello Ray,

Some of your quotations are from my posts, not Joseph's one.

If I have been rude to anybody, I apologize this was not my intention.

You must also take into account the fact that as a french math teacher, it's not always easy to find the right words to express my thinking in English .

As long as it is still possible to create, edit or import questions with empty questiontext, Tim's solution is fine for me.

Average of ratings:Useful (1)
Re: Why does moodle permit an empty question?

Thanks Tim.  I really didn't think of being able to have an empty question as a feature but as a flaw in the system.  That is why I started the thread.  I didn't intend to threaten to remove a "feature."

I couldn't even imagine a situation where a blank question was even desirable.  I thank you for pointing it out.  I do wonder however, that if a quiz is not carefully crafted not to let the questions be asked in a random way (which is a possible quiz behavior), the quiz would have to be thrown out after the entire quiz is given which is much more disruptive than a student noticing that a question is blank.

Yes, I agree that questions should be carefully checked but I think that a preference switch (at least during question bank construction) would be helpful.  Another quirk is that a gift file import does not require the label.  The question automatically becomes the label.  That would solve the problem as far as I am concerned.  Why stop the question from being saved just because it is missing a label?   It should stop the question from being saved if both the label and the question text are empty.  If the label is empty, it could copy the question as a label.  If the question is empty, a switch could either check or not check for a question flaw.

I would like the ability to edit one field without copy and pasting the same thing to the other field.  As it is now, it requires less work to create some tests in gift format and import.

Average of ratings: -
Re: Why does moodle permit an empty question?

One major aspect of usability is to make it hard to screw up.  If nobody ever had an empty question on purpose, if it was always an accident, it would be good to adjust the UI to make that error difficult or impossible.  That's neither "removing a feature" nor is it "just because you don't use it".   Lack of that kind of input validation isn't a feature or anything else, it's the lack of something.  The proposal was to ADD a check, not to remove anything.  The proposal wasn't to add validation "because I don't enter empty questions", but to add validation if empty questions made no sense, if they were not useful to anyone.  A reasonable response is to say "I find empty questions to be useful", not to

Have you ever noticed on some bathroom stalls they have a little shelf or hook that folds down so you can set your package down, but you can't open the door with the hook down?  It may seem a strange design, but it's on purpose - you can't accidentally leave your item in the stall.   Similarly, on some ATM machines you have to retrieve your card before it'll give up the cash.  That way, you can't accidentally leave your card in the slot. That's called a "forcing function" and it's good design - when you can be sure that what you're preventing is something the user didn't actually intend to do.

Average of ratings:Useful (1)
Re: Why does moodle permit an empty question?

So, one option would be:

1. When you edit an existing question with a blank question text, there is no warning if you leave the queistion text blank.

2. When you create a new question with a blank question text, the first time you submit the question, you get a validation error:

Warning! you have not entered any question text. (If you inteded to leave the question text blank, then just ignore this warning and click Submit again.)

[ ] do not show this warning again.

Average of ratings: -
Re: Why does moodle permit an empty question?

1 & 2 are OK.  That would solve the accidental blank.  A better possiblility (for me) would be if the warning could be a radio choice or Option button dialog like"

Warning you have not entered question text.  Choose your action.

Button1:  Yes I meant it to be empty. Save and continue

Button 3:  Please copy the label as the question and save.

Button 3 could save a lot of CTRL+A followed by CTRL+C followed by CTRL+V when the question is created in the label.

A similar dialog for a missing label could be nice offering to copy the question text as the label.

Average of ratings: -
Re: Why does moodle permit an empty question?

I did not explain clearly. I am imagining that the warning I gave will be displayed on the editing form, just about the question text field, so there is no need to have button 2, 'Return to editing'.

I don't really want ot encourage question text as question name. I think people should give meaningful names to questions to help classify them, so you will still have to copy and paste if that is what you want.

Average of ratings: -
Re: Why does moodle permit an empty question?

Tim "I don't really want to encourage question text as question name. I think people should give meaningful names to questions to help classify them, so you will still have to copy and paste if that is what you want."

+1

Average of ratings: -
Re: Why does moodle permit an empty question?

"people should give meaningful names to questions to help classify them"

I use categories to categorize questions.  I use question labels to know what I am adding specifically to the quiz.  (I might have written the question weeks earlier). Only the labels show up on the quiz assembly sheet.  So I have migrated toward using much of the question text in the label.  Only the person making the quiz gets to see the label anyway so its not like I'm giving anything away to the student prior to the quiz.

Your configurable warning message was enough though if policies discourage using the question as the label.

Average of ratings: -
Re: Why does moodle permit an empty question?

Douglas "Only the labels show up on the quiz assembly sheet."

Wrong. See attached screenshot. Really, question labels and question text are meant to hold different information. But the choice is yours.

Joseph

Average of ratings:Useful (1)
Re: Why does moodle permit an empty question?

Thanks again Joseph for the correction.  However, while short labels reveal more of the question, none of my settings reveal much of the question on the assembly sheet.

I spend most of my time in the question bank.  I am sure that only the labels show up there, not any part of the question.  So a quick scanning of the current status of questions created in the moodle test bank does not reveal much of the content unless the label is pretty specific or unless you preview the question.  When considering which questions haven't been added yet to the test bank, it would be helpful to be able to see the questions already there.  Perhaps you could give a suggestion on that but I guess I'm off topic on this thread.

Average of ratings: -
Re: Why does moodle permit an empty question?

Douglas "I spend most of my time in the question bank.  I am sure that only the labels show up there, not any part of the question."

Wrong again. Just check the Show question text in question list check box.

Joseph

Average of ratings:Useful (1)
Re: Why does moodle permit an empty question?

Thanks again for the correction.  I had completely missed those checkboxes. Perhaps I can start to use the labels in a different manner now that I can view the text of the question without too much effort.  I need to check more carefully at my available options on each page.

Average of ratings: -
Re: Why does moodle permit an empty question?

Tim "[ ] do not show this warning again."

If user checks that box, where would this "preference" be saved and for how long? I mean, just for the current session or else?

Joseph

Average of ratings: -
Re: Why does moodle permit an empty question?

It would be a user preference, so stored forever. (get_/set_ user_preference in code terms).

Average of ratings:Useful (1)
Re: Why does moodle permit an empty question?

Each time I edit a file resource created some years ago, Moodle absolutely want me to put something in the Description field. I find this silly. I don't use this field, the name is enough for my needs. By just because someone has decided Description is mandatory I am forced to copy and paste the name in the description or type something.

Jean-Michel,

I am with you on this one. I find the madatory Description field very annoying. Why it is mandatory is beyond me.

Tzvi

Average of ratings: -
Re: Why does moodle permit an empty question?

This can be turned off by the site administrator.  Its in Site Administration > Plugins > Activity Modules > File.

That was a source of constant annoyance for me also until I found the setting.

Average of ratings:Useful (2)
Re: Why does moodle permit an empty question?

Cool! Thank you so much  Joshua.

Tzvi

Average of ratings: -