Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: Controlling the order in which assessment rules are evaluated

Controlling the order in which assessment rules are evaluated 5 years 5 months ago #62748

  • wabrit
  • wabrit's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 17
  • Karma: 0
I have a survey with a number of question groups that is assessment enabled.

I have some assessment rules which are based on overall (Total) score, and others which are based on individual question group score.

I want the survey taker to see the assessment triggers thus:

<assessment rule trigger matching overall total score>
[<assessment rule trigger matching individual question group scores>]*

e.g.

"You scored very low on this safety assessment. Some things to remember are:

* Don't walk in front of buses.
* Never stick your finger in an electric socket."

Where the opening paragraph is triggered by a rule on the total score, and the bullets are triggered by rules on individual sections.

I can certainly get multiple rules to fire, but I can't see a way to "order" my rules so that the output is guaranteed to look exactly how I want. In the above examples I might get the bullets followed by the introductory paragraph.

Another thing I would like to do is impose a limit on how many rules will fire e.g. if I have per-question group assessment rules each of which can trigger a bulleted list item like in the example above, then I might want to say "stop after n rules have fired" so that the list does not become too long.
The administrator has disabled public write access.

Controlling the order in which assessment rules are evaluated 5 years 5 months ago #62756

  • TMSWhite
  • TMSWhite's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 758
  • Thank you received: 84
  • Karma: 37
In the short-term, perhaps someone can propose a JavaScript-based work-around.

Longer term, once these user patches are done and incorporated, you would have complete flexibility in using assessment results to tailor the output, even including a "stop after n rules have fired"-type functionality.
The administrator has disabled public write access.

Controlling the order in which assessment rules are evaluated 5 years 5 months ago #62766

  • tpartner
  • tpartner's Avatar
  • Online
  • LimeSurvey Team
  • Posts: 6574
  • Thank you received: 1477
  • Karma: 579
Yeah, I'm sure we can sort this out with JavaScript.

wabrit, does the Total assessment message always show last in your tests?

Can you attach a sample survey to test?
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.
Time to create page: 0.204 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form