Which question type to use for getting answers for 2 variables

Which question type to use for getting answers for 2 variables

by Sudhir Singhal -
Number of replies: 11
In some questions, the user has to give answer values for 2 variables.
For example, see the question image below:
In the above case, which question type is to be used so that it can take care of all the possible variations in typing the answers?
like a=105, b=75, or a=105 and b=75, or b=75 and a=105
or a= 105 degree, b=75 degree
In which answer type, all the answers with spaces and without spaces and sequence of a and b are taken care of. 
Or do we need to give all the possible variations as the correct answers?
Or best option I can think of is giving two placeholders as answer inputs, like:
a = ____    b = ____
I know only 'Formula question type' for giving two answer placeholders, but I think there can be another possible way also.
I request other members to share how they create such questions. 

Average of ratings: -
In reply to Sudhir Singhal

Re: Which question type to use for getting answers for 2 variables

by Sudhir Singhal -
The above option might be very common and simple but I am not able to figure it out.
I thought many users must be already using such kinds of questions.
Can anyone suggest some proper way of taking two or more answer inputs in a numeric or a short answer question?
In reply to Sudhir Singhal

Re: Which question type to use for getting answers for 2 variables

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

You could use the excellent Embedded Answers (Cloze) question type, maybe also with the REGEXP question type plugin. But these are not quite suitable for your problem because what matters are the values 105 and 75, not whether there is a space or a comma between the two values.

You could use the Numerical question type, but if you are already familiar with the Formulas question type, why not use it. This is, in my opinion, the best type of question for your problem.

You can try the following question at https://dynamiccourseware.org/course/view.php?id=78&section=84➚. The question in Moodle XML format is also attached below.

MoodleForum_20230724_1652.png

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

Re: Which question type to use for getting answers for 2 variables

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
I have enjoyed your response, Dominic. In your example, what happens if the student types an "o" instead of a "0," or an "I" instead of a "1"?

I have also thought about using a multiple-choice question for this problem, creating around six answers, such as:
1. a=105, b=75
2. a=105, b=25
3. a=30, b=120
4. a=45, b=75
etc.

One can get even fancier using a calculated multi-choice question. A multiple-choice question avoids mistyped characters.

Do you see any particular issues using a multiple-choice question?
In reply to Rick Jerz

Re: Which question type to use for getting answers for 2 variables

by Sudhir Singhal -
Dear Rick,

According to my understanding, in the above-given example, Dominique used the answer type as Number, so it won't take alphabets as inputs.
As you suggested we could have used MCQ also. There is no issue with it. But in some questions, I don't want to give answer options. I want to check if the student is able to understand the question properly or not and let them solve it without any answer hint.
As you know we have to give mixed types of questions in assessments. All questions can not be MCQ only.
In reply to Sudhir Singhal

Re: Which question type to use for getting answers for 2 variables

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Yes, I understand.

However, if a student understands the problem and solves it, they will immediately pick the correct answer. If students don't understand, they must go through a learning process to check every choice. I would give around six to eight choices. In the end, the unsure student might have been given more opportunities to learn.

In the past, I enjoyed giving problems like this via paper exams. Then I was able to see students' wrong answers which help me build MCQs.

Yes, I understand some of the philosophical issues. I am just offering an idea that is easy to implement. For these kinds of problems, I actually prefer calculated-multichoice question types, since they cause students who "cheat" even more work to cheat. When they discuss the answers with a friend, they say "Hey, your possible answers are different than mine."
 
Calculated multichoice question types have been standard in Moodle for many years.  I once gave a presentation about using them at a Moot.  This was prior to Moodle 4, so I need to redo this video to bring it current (not sure what, if anything, has changed... except versioning."
 
In reply to Dominique Bauer

Re: Which question type to use for getting answers for 2 variables

by Sudhir Singhal -
Thanks Dominique,

With your input, it's become easy for me to decide. I am also comfortable with the Formula question type. The cloze question type is also a good second option, which I miss to think earlier.
With this example, I noticed that it is not necessary to define the variable always for such fixed cases, and we can get the input without adding placeholders in the question text area. Actually, I didn't try this earlier.
Here I like to know one more thing, if we want to have both inputs in one line, then we need to add the placeholders in the question text area only or can we do it by some settings in the part section?

REGEXP question-type plugin seems interesting to learn. I will explore it. If you have made any example or use case of it, kindly share the link.
In reply to Dominique Bauer

Re: Which question type to use for getting answers for 2 variables

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

If you put both angles in the same part, students must give both correct answers to get a point. If you put the angles in different parts, each angle is marked separately. Personally I would use two parts but that's up to you.

I don't think it makes a big difference to students in this particular case, but you can put the answer boxes on the same line by formatting a little. See the example below.

MoodleForum_20230724_2327.png

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

Re: Which question type to use for getting answers for 2 variables

by Sudhir Singhal -
I agree in this case, it does not matter if the answer is one line or two lines.
I will use two parts only to grade both answers. I just wanted to have them in line.
In both examples, you used two parts, so this is precisely what I wanted to have.

In the feedback, there is option: Show the number of correct responses once the question has finished.
I am not able to judge how it works, if I put the tick mark or remove it, there is no difference in the feedback. In which case it was used?
In reply to Dominique Bauer

Re: Which question type to use for getting answers for 2 variables

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

Rick,

As always, you bring up some very interesting points.


...what happens if the student types an "o" instead of a "0," or an "I" instead of a "1"?

The Formulas question instantly shows invalid input with a red flag. Note that it still allows submitting invalid answers.

MoodleForum_20230724_2333.png


The Calculated and Simple Calculated questions indicate an invalid entry only when submitted, with the message "You must enter a valid number." They do not allow submitting invalid answers.

MoodleForum_20230726_0944.png


It is easy to improve the answer box for entering a numeric value by adding the attribute type="number", which has the effect of immediately blocking any invalid character. For example, in the following Formulas question, you cannot type an "o" instead of a "0," or an "I" instead of a "1". Thus, invalid answers are simply not possible.

MoodleForum_20230726_0945.png

You can try the above question at https://dynamiccourseware.org/course/view.php?id=78&section=84➚. The question in Moodle XML format is also attached below.



Do you see any particular issues using a multiple-choice question?

No. Each type of question has its strengths and weaknesses. Whether one or the other is used depends on several factors, including the many different aspects of the problem at hand and probably also on the preferences of the teacher.

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

Re: Which question type to use for getting answers for 2 variables

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Read "The Calculated and Simple Calculated questions indicate an invalid entry only when trying to submit, i.e. when clicking the 'Check' button, ..."
Average of ratings: Useful (1)
In reply to Dominique Bauer

Re: Which question type to use for getting answers for 2 variables

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Thanks for your continued thoughts, and your hard work, Dominique.

I would not use the "Calculated" or "Calculated simple" question types.  I prefer the "Calculated multichoice" question type.

I forget, is the Formulas question plugin compatible with the Mobile Moodle App?