Formula Question - Blank Answers Causing Zero Marks

Formula Question - Blank Answers Causing Zero Marks

by Alexandra Trovato -
Number of replies: 14

Hello!

I hope that someone can help me with an issue I am having in Moodle for a formula type question. I am fairly new to this type of question and have minimal coding experience.

I have attached a 1-part question with three blanks within the part. I cannot separate the question into different parts because the third blank will award part marks based on the student responses in blank 1 and 2. The issue I am having is that if a student leaves any blank in the question empty, the question will automatically default to awarding zero marks (this has been the case with other questions I am working on).

For example:

  • Blank 1 student inputs correct answer, Blank 2 student inputs incorrect answer, Blank 3 student inputs incorrect answer - the student should get 1 out of 3 marks for the first answer and this works
  • Blank 1 student inputs correct answer, Blank 2 student inputs incorrect answer, Blank 3 student inputs nothing (leave the space empty) - the student should get 1 out of 3 marks for the first answer; however, this does not work and the student is awarded zero marks
I know I can work around this by having instructions to put in a random value in the blanks to get part marks but I would really prefer not to rely on the students reading those instructions.

Any help would be greatly appreciated! Thank you!

We are running version 3.8.3.



Average of ratings: -
In reply to Alexandra Trovato

Re: Formula Question - Blank Answers Causing Zero Marks

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

Here is what I suggest:

  • Question behavior: Adaptive mode, so students can answer the questions one at a time.
  • Place the three questions in three separate parts.
  • Create two invisible answer boxes in the third part.
  • Using a little JavaScript, when students answer the third question, the first two answers are copied into the invisible answer boxes in the third part.
I also modified your third question to one with radio buttons.

Here is the result:



You can try it out here ↗.

Would you agree to have your question placed as an example on the moodleformulas.org site?

Average of ratings: Useful (1)
In reply to Dominique Bauer

Re: Formula Question - Blank Answers Causing Zero Marks

by Alexandra Trovato -

Hi Dominique,

Thank you so much for your assistance. I'll try this out and see if I can apply it to some of my other questions that are also having this issue! And yes, I am definitely okay with it being placed as an example. Hopefully it can assist someone else smile.

Thanks again!

In reply to Dominique Bauer

Re: Formula Question - Blank Answers Causing Zero Marks

by Alexandra Trovato -

Hi Again Dominique,

I've been going over your solution and trying to duplicate for myself and it does work great. Unfortunately, for all the other questions I have to do I'm not sure I have the capacity to implement this solution. I just wanted to confirm that there is no way to keep it the question in one part and tell Moodle to ignore the blanks? If you could let me know, I would appreciate it. Thank you again for your time.

Alex

In reply to Alexandra Trovato

Re: Formula Question - Blank Answers Causing Zero Marks

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

In the settings of your original quiz, if you simply set "Question behaviour" to "Interactive with multiple tries", students will have to put an answer in each input field before they can check their answers. Would this solve the problem you raised in your original post?
In reply to Dominique Bauer

Re: Formula Question - Blank Answers Causing Zero Marks

by Alexandra Trovato -

Hi Dominique,

Unfortunately it is an exam so I would prefer for them to not be bale to check their answers.

In reply to Alexandra Trovato

Re: Formula Question - Blank Answers Causing Zero Marks

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
No problem, the possibility for students to check their answers depends only on "Review options" in the quiz settings.
In reply to Dominique Bauer

Re: Formula Question - Blank Answers Causing Zero Marks

by Alexandra Trovato -
Hi Dominique,

I can try that. I foresee a few issues though:

1. The students may run out of time on a question and forget to press "check" in which case it will cut off the part marks for the question.
2. The student will press check and then want to go back and change answer (although I could give them more than one attempt if they don't actually get to check). If that is the case I fear the check might be confusing.

If it comes to it, I can always tell them to input -1 for everything they don't know.

Thanks!
In reply to Alexandra Trovato

Re: Formula Question - Blank Answers Causing Zero Marks

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

... I'm not sure I have the capacity to implement this solution.

I'm sure you do. If you were able to understand grading variables and criterion so well, you will quite easily figure out the few lines of JavaScript required. If you get stuck, don't hesitate to ask for help.

In reply to Dominique Bauer

Re: Formula Question - Blank Answers Causing Zero Marks

by Alexandra Trovato -

Hi Dominique,

Thanks again for your help. I ended up trying to do this one question again along side your work and was able to come up with this (with some help). Main difference is I used classes. I thought that I would upload it here in case you were interested. Now hopefully I have time to do all the other questions before the exam!

Thank you again!

In reply to Dominique Bauer

Re: Formula Question - Blank Answers Causing Zero Marks

by Stephen Nulty -

Wouldn't it just be easier, if this is on github, to just allow an answer box to spit out a special character that is parsed to mean the box is empty?

I understand that it would affect the various input types number/numerical/formula etc, but if the answer is a list, shouldn't it just be some if statement change ,that rather than throwing an exception, it just says this is fine.


I have a similar issue where I'd like the students to input an interval of real numbers, [a,b] say or a set {a,b}, as an answer, and theres dropdown boxes for the types of brackets and two input boxes for the numbers.

Now there's four parts to this question, so four of these types of inputs, and with this suggestion it needs to be split into 16 separate inputs rather than the manageable four. 

Then lets say I would like the order to be unimportant for the input when the answer is a set, that is when dropdown 1={, and dropdown 2=}, now I have to go and learn javascript and learn how to make a bunch more invisible input boxes to deal with this?

I don't think it this is really fair (if this is the norm of the question type), to push a lot more extra work on the question creators this way. What I take from this is basically, use another question type... Or a simpler option, adding a sentence like "If you want attempt marks for this question, don't leave answer boxes empty" to the question.

I do appreciate though, that you given examples which show what is possible. If I have time, I will sit down to see what you're doing in the example on the moodleformulas page, and see if I can understand/learn about javascript and what's being used.

In reply to Stephen Nulty

Re: Formula Question - Blank Answers Causing Zero Marks

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Hello Alexandra and Stephen,

I understand that my workaround may seem complicated to you. But this is only a workaround and I am not claiming that it is the best solution.

Another solution is that I modify the Formulas question. Since the question code is rather complex and because the repercussions of such a change must be carefully analyzed, I hesitate to do so at this time.

Perhaps the best solution for you now would be to set the quiz settings to "Interactive with multiple tries". This way, a clear message ("Please put an answer in each input field.") is displayed if the students do not enter all the answers. If they don't know an answer, they can enter "0" or any other value. When they have entered all the values, they will be marked appropriately for their correct answers.
Average of ratings: Useful (1)
In reply to Dominique Bauer

Re: Formula Question - Blank Answers Causing Zero Marks

by Stephen Nulty -
Hi Dominique,

Thanks for the reply. I appreciate the workaround, I've been trying to apply it for my own question in order to avoid the students losing marks for the attempt.

However I'm in a very similar situation in that it's supposed to be a single attempt graded quiz; it's something I've been requested to make, and I don't really have control over how the continuous assessment works, I'm just making the questions.

I've seen this exact question pop up two years ago as well, https://moodle.org/mod/forum/discuss.php?d=369438 and it seems it still as relevant an issue today.

If we compare the options at present:
1) leave things the way they are.
Positives: nobody's old questions are at risk of breaking;
Negatives: You can't really use the flexibility of parts to its fullest potential. It is extremely convenient to align multiple inputs in a part, using the grading variables and grading criteria to assess multiple parts, but it's completely ignored if one input is empty. The workarounds are definitely more complicated to replicate the same output and assessment, using html to manually align boxes (the formatting of which I'm finding gets completely messed up for instance when a wrong answer is submitted) and using javascript to mimic the functionality of multiple inputs in a part over several parts.

2) Edit the repository to allow empty inputs to be dealt with:
Positives: now parts with multiple inputs don't have to worry about an empty input messing up the grading. Could add in a special comparison ==:specialcharacter: or function isempty() if the teacher wanted to deal with empty inputs in a special way. Avoids the need to try to align things with html and use workarounds with javascript;
Negatives: It might mess up old questions, where people relied on students getting zero if their input was empty. If implemented in such a way that basic comparisons == >< etc worked with the empty character, not an issue. It might mess up questions which used javascript workarounds previously. Overall, could be difficult to implement, and to make sure it doesn't misbehave with another aspect of the question type.
In reply to Stephen Nulty

Re: Formula Question - Blank Answers Causing Zero Marks

by Stephen Nulty -

Just as an example of another issue that I've run into. Let's say it was an interactive quiz type, where the students can have multiple attempts and it told them if they were right wrong etc.


Once I split a question into multiple parts, and manually align them with <div display...> so that they appear nicely (first image), the feedback completely destroys the layout (second image).

I now would need to look into how to manually place the feedback elsewhere, and I'm not sure where to begin with that for instance. 

One workaround, inevitably leads to four more workarounds needed. (I should probably just post this as an issue on the github page I suppose, to generate further discussion there as opposed to cluttering up things here)

Attachment Screen Shot 2020-10-09 at 11.48.05.png
Attachment Screen Shot 2020-10-09 at 11.48.23.png
In reply to Stephen Nulty

Re: Formula Question - Blank Answers Causing Zero Marks

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

... it's supposed to be a single attempt graded quiz

If you want to say that students are only allowed one try at the question, set the quiz to "Interactive with multiple tries" and in the question settings and under "Multiple tries" set "Penalty for each incorrect try" to 100%. This way, students will have only one try at the question.