Conditional Branches, Rating scales and Required questions

Conditional Branches, Rating scales and Required questions

by Hal MacLean -
Number of replies: 3

Hi all - using Moodle 3.10

We have a situation where a questionnaire has conditional branching, and within that we have rating scales with multiple lines (think of how you'd ask for feedback on a course with different tutors delivering it, and how you want to ask many things about the tutor). 

When we create the 'branching', add a rating scale question within that branch and set it as 'required', it is able to be skipped... i.e. it is not following the 'required' setting. The respondent can simply navigate to the next page instead of being forced to answer.

It works as it should if it is not within a 'branch', but as soon as we apply a 'parent' question then it can be skipped - despite having a red star. 

I'm curious to know if this is a 'known issue' or an 'undocumented feature'... or if we are just doing something wrong! 

Any thoughts?


Average of ratings: -
In reply to Hal MacLean

Re: Conditional Branches, Rating scales and Required questions

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Hal,
I confirm your findings. This is indeed a bug. I have reported it at https://github.com/PoetOS/moodle-mod_questionnaire/issues/415

EDIT.- Hal, if you are confident to hack your Questionnaire plugin, I have provided a simple fix here: https://github.com/rezeau/moodle-mod_questionnaire/commit/1e374453760b5df814a50e02dc03b5c0a5d1a8ff
In reply to Joseph Rézeau

Re: Conditional Branches, Rating scales and Required questions

by Hal MacLean -
Thanks for that - always good to find them, but boy do I wish that bug wasn't there! Still, at least it'll help someone else in the future if the bug is patched.

Any ideas on how I might proceed with this for now? I guess rebuild those questions and use alternative question types!
In reply to Hal MacLean

Re: Conditional Branches, Rating scales and Required questions

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Instead of the Rate question type you could use the Check boxes. I've tried and it does work as expected if set as required, even inside a Branching Questionnaire.