Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

In survey stats - show mean score of previously submitted responses

  • tammo
  • tammo's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
3 years 5 months ago #223416 by tammo
Just wondering: why does one have to add .sgqa? Or are there also other additions?

Tammo


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
3 years 5 months ago #223428 by DenisChenu

Just wondering: why does one have to add .sgqa? Or are there also other additions?

Tammo
 
Because we don't have clean way to get column name by question code.

For my plugins : i do this gitlab.com/SondagesPro/coreAndTools/getQ...surveyCodeHelper.php

But for core : we need to construct a real Question type object before.
See github.com/LimeSurvey/LimeSurvey/blob/16...onCodeHelper.php#L33

If i construct a system to get 113X23x12 by qcode , and it was accepted in core : it's not before 2024 ;)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
  • baybug
  • baybug's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 5 months ago #223862 by baybug
Hi - I really appreciate your help - I am now trying to give the survey participant feedback in the end message. However, it does not seem like the functions are working on that part of the survey. It prints the syntax instead of calculating the average score of previous responses.

The function I inserted:
The average score is {'[SCORE.nb]'}

When I do this. It simply prints verbatim "{'[SCORE.nb]'}" in the feedback instead of the actual number.

Do you think there is a way to resolve this?
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
3 years 5 months ago #223866 by DenisChenu
@baybug : i'm lost …
else getStatInSurvey never work on end page…

1. What LimeSurvey version you use
2. With getStatInSurvey [SCORE.nb] give the number of numerci answers in SCORE question from other respondant. I don't understand what you want.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 5 months ago #223905 by tpartner

However, it does not seem like the functions are working on that part of the survey.

Try enabling public statistics. I seem to remember that in some older versions this kept the session alive into the end page.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
3 years 4 months ago #223957 by DenisChenu

However, it does not seem like the functions are working on that part of the survey.

Try enabling public statistics. I seem to remember that in some older versions this kept the session alive into the end page.
 
With getStatInSurvey : it never work ;)
Must be reported as a new feature.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
  • baybug
  • baybug's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 4 months ago #224287 by baybug
Thanks for the input - I have tried enabling public statistics for the specific questions. The results are still not fed into the "End message" text section.

Anyone know how to store the results of the functions in a way that enables them to be recalled at the "End message" display of the survey? (as I mentioned it just prints the function and not result - contrary to what it does when I use the function in the survey).
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 months ago #224289 by holch
Write the result of the formula into an equation type question and then display the result of this Equation type question in the end message, rather than posting the formula directly and see what happens (not tested).

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 months ago #224290 by Joffm
You should provide your survey as lss export.

Then we know which variables you use.

There is a workaround with a small javascript snippet:
Create a question of type "short text" (let's call it "Q1") with this script (or similar)
Code:
<script>
$(document).on('ready pjax:scriptcomplete',function(){
        // Identify this question
        var thisQuestion = $('#question{QID}');
// Fill the array
       $('input[type=text]', thisQuestion).val( {'[SCORE.moy2]'} );  // Or whatever
       $('#question{QID}').hide();
   });
</script>

In the end message you may refer to this question
The mean of the scores is: {Q1}


 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu, baybug
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 months ago - 3 years 4 months ago #224292 by Joffm

Write the result of the formula into an equation type question and then display the result of this Equation type question in the end message, 

Doesn't work.

See here (the first line is with my solution, the second with an equation)
 

You see, I am playing around with the new function "leastfilled".

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 years 4 months ago by Joffm.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
3 years 4 months ago #224293 by DenisChenu
Time to ask a statSum and and statSumIf function ;)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 months ago #224296 by holch
Strange, just ran a survey and {TOKEN} and {SAVEDID} worked, didn't test with an equation question though.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose