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

TOPIC: Sum of all assessment values

Sum of all assessment values 2 years 6 months ago #103128

  • camargo
  • camargo's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
I would like to know if it's possible to sum all of the question's assessment values.

The form has 62 questions, so the sum() function with every name will be quite large.

I currently have this in mind:
sum(GR610727.valueNAOK, GR610728.valueNAOK, ..., GR610787.valueNAOK, GR610788.valueNAOK)

Is there a better way?

Thanks
Last Edit: 2 years 6 months ago by camargo. Reason: Found some answers and fixed the question
The administrator has disabled public write access.

Sum of all assessment values 2 years 6 months ago #103132

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9293
  • Thank you received: 1327
  • Karma: 384
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.
The following user(s) said Thank You: camargo

Sum of all assessment values 2 years 6 months ago #103135

  • camargo
  • camargo's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
Thanks, but what about the sum of every value?

I really need to put every single question id inside the SUM function or there is another way?
The administrator has disabled public write access.

Sum of all assessment values 2 years 6 months ago #103138

  • Ben_V
  • Ben_V's Avatar
  • Offline
  • Platinum Lime
  • Posts: 1798
  • Thank you received: 440
  • Karma: 110
Hi,

at the end of your survey:
1) create a new group with a numerical question ("score")
2) paste the following snippet in the source of this question:
<script type="text/javascript">
jQuery(document).ready(function() {
$('body').hide();
$(".numeric:eq(0) input.text").val("{assessment_CURRENT_TOTAL}"); //!\ assessment_CURRENT_TOTAL all  uppercase
document.limesurvey.submit();
});
</script>

conditions:
a) Disable the internal XSS filter at the admin section (global settings -> security )
b) Set your survey presentation "group by group" or "question by question"
c) Respect all settings required for assessment use as described in the manual
Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
All LS releases => bit.ly/1VMuTDu | 2.06lts => bit.ly/1Qv44A1
Demo surveys => bit.ly/20NW9V8 (already included in /docs/demosurveys)
Last Edit: 2 years 6 months ago by Ben_V.
The administrator has disabled public write access.
The following user(s) said Thank You: camargo

Sum of all assessment values 2 years 6 months ago #103210

  • Ben_V
  • Ben_V's Avatar
  • Offline
  • Platinum Lime
  • Posts: 1798
  • Thank you received: 440
  • Karma: 110
You may follow this similar discussion :)
Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
All LS releases => bit.ly/1VMuTDu | 2.06lts => bit.ly/1Qv44A1
Demo surveys => bit.ly/20NW9V8 (already included in /docs/demosurveys)
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.387 seconds
Imprint                   Data Protection Statement                  Revocation information and revocation form