Using score as a dependency

Using score as a dependency

by tim st.clair -
Number of replies: 0
Picture of Plugin developers
I'd like to be able to use the score/value of a previous question response as a dependency for subsequent questions. E.g. show a question if you scored X or above on a previous response.  I had been thinking of having extra score options representing less than, equal or greater than, and a score value enabled when one of those options is selected.

idea about score layout

I can emulate this with some question types (e.g. choice, choices, yesno, etc) by using multiple optional dependencies on each possible answer. This is not currently possible on the Rate question type (which is primarily where I want to use it). I can emulate a rate question using multiple radio button questions but it's not possible to display multiple questions in a table like the Rate does.

I also looked into extending Rate to list all options (e.g. question+choice+degree) but the database doesn't have anywhere to store the extra context value needed to select a rank degree (and listing mulltidimensional data isn't great in a select box, as shown below). I shoehorned some code into the plugin/db to give it a go but it's not pretty.

multidimensional data in a select box

If I wanted a question or label to appear because in my Rate I selected any item above 2 in a 1-5 scale for any of 5 answer choices, I'd have to add 20 optional dependencies. If I wanted a question to appear because I chose a degree above 2 in all choices in the parent question, then I'm stuffed, whereas if the degrees had a value (score) and choices summed the scores, I could at least figure out the value meant that certain degrees had all been selected. Hence the need for a score.
Average of ratings: -