Welcome, Guest
Username: Password: Remember me

TOPIC: Controlling the order in which assessment rules are evaluated

Controlling the order in which assessment rules are evaluated 3 years 3 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.

Re: Controlling the order in which assessment rules are evaluated 3 years 3 months ago #62756

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
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.

Re: Controlling the order in which assessment rules are evaluated 3 years 3 months ago #62766

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4270
  • Thank you received: 803
  • Karma: 368
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.113 seconds
Donation Image