Welcome to the LimeSurvey Community Forum

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

Saving Assessment scores to survey database

More
12 years 1 month ago #74129 by giankuka
Replied by giankuka on topic Saving Assessment scores to survey database
Ok now I solved the problem about the email; now i would like to have this "sum(TA1.valueNAOK, TA2.valueNAOK)/2" in the statistics. Is It possible?
The topic has been locked.
More
12 years 1 month ago #74131 by Ben_V
Hi,
Probably you just have to expand the advanced settings of your question and tick the checkbox:
'Show in public statistics'

Ben

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
12 years 1 month ago #74239 by Mazi

giankuka wrote: Ok now I solved the problem about the email; now i would like to have this "sum(TA1.valueNAOK, TA2.valueNAOK)/2" in the statistics. Is It possible?

The equation question type isn't supported by the statistics module yet, see bugs.limesurvey.org/view.php?id=5754

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
More
12 years 1 month ago #74281 by giankuka
Replied by giankuka on topic Saving Assessment scores to survey database

tpartner wrote: You can use the {ASSESSMENT_CURRENT_TOTAL} placeholder to access the assesssment total from previous pages.

The following will load a short-text input with the {ASSESSMENT_CURRENT_TOTAL} and hide it where:
11111 = survey ID
22 = group ID
33 = question ID

Code:
<script type="text/javascript" charset="utf-8">
 
  $(document).ready(function(){
 
    $('#answer11111X22X33').val('{ASSESSMENT_CURRENT_TOTAL}');  
    $('#question33').hide();
  });
 
</script>


Your script works fine in 1.92. How can I use it to a hide a text (not a number). I would like to have the name of the user in the statistic but not in the survey.
Thaks
Gianluca
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
12 years 1 month ago #74303 by tpartner
Replied by tpartner on topic Saving Assessment scores to survey database

How can I use it to a hide a text (not a number). I would like to have the name of the user in the statistic but not in the survey.

I'm afraid I don't understand. Can you explain in more detail?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
12 years 1 month ago #74491 by giankuka
Replied by giankuka on topic Saving Assessment scores to survey database

tpartner wrote:

How can I use it to a hide a text (not a number). I would like to have the name of the user in the statistic but not in the survey.

I'm afraid I don't understand. Can you explain in more detail?

I realized that I can have the name of my guest through the field properties. I'm afraid I did a no sense question (due also to my bad English, sorry).

Instead, can I also hide the group with your script? Because I see in this way a blank group (and I don't want to put the questions in a previous group).
Thanks.
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
12 years 1 month ago #74505 by Mazi
Is tbhis the only question of this group?

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
More
12 years 1 month ago #74514 by giankuka
Replied by giankuka on topic Saving Assessment scores to survey database
NO, I have two questions in this group, both hidden throgh the script...
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
12 years 1 month ago #74515 by tpartner
Replied by tpartner on topic Saving Assessment scores to survey database
The only solution would be to add a function to automatically submit that group and move ahead in the survey but you will also need to put a script in the following group to skip it if respondents are allowed to go backwards in the survey. It would be a lot simpler to put the questions in another group.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
12 years 1 week ago #76619 by sequoia
Replied by sequoia on topic Saving Assessment scores to survey database
Newbie to LimeSurvey. Started using the survey software about 3 weeks ago, installed the 1.91+ version, and a few days ago manually updated successfully to 1.92+. I have assessment assistance request. I have read and read many articles on the forum here, the Expression Manager manual, the Expression Manager How To's page with Calculation/Assessment examples, and other documentation in the LimeSurvey main manual. Here's what I'm trying to resolve: Questions separated in a few groups, each with a point value. The total point value at end of survey is successfully shown on the completed page. Problem is: no 'total' value in the database or detailed email notification.
...been working with the 'Equation' utility, assessment rules, ASSESSMENT_CURRENT_TOTAL (the only progress i've had with adding data to the db and email notification), and some other variety of options. I know this is a real simple option and not sure what I'm missing. Any assistance is greatly appreciated. I know it's a quick adjustment somewhere, just can't find what it is. I've attached the last survey worked on, broken down in the simplest form for functionality:

File Attachment:

File Name: limesurvey...2725.lss
File Size:28 KB


...thanks again for any input.
The topic has been locked.
More
12 years 1 week ago #76621 by gsaha
Hi Sequioa,
For each group, you will need to create a number input question and make it not mandatory.
You will need to input the following code in that numerical input question. Change the numbers 55972 , 9 and 311 to match your survey number, group number and question number. Make sure you do not set the question to hide.

<script>
jQuery(document).ready(function() {
document.getElementById('answer55972X9X311').value = "{ASSESSMENT_CURRENT_TOTAL}";
document.getElementById('display311').style.display= "none";
document.getElementById('answer55972X9X311').style.display= "none";
});
</script><script>
$(document).ready(function()
{
$('#question311').hide();
});
</script>
The topic has been locked.
  • TMSWhite
  • TMSWhite's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
12 years 1 week ago #76627 by TMSWhite
Replied by TMSWhite on topic Saving Assessment scores to survey database
sequoia-

Although gsaha may be right for 1.91+, that approach is not needed for 1.92.

In fact, you almost had it. Instead of:
Code:
{sum(q1.NAOK,q2.NAOK,q3.NAOK,q4.NAOK)}

use
Code:
{sum(q1.value,q2.value,q3.value,q4.value)}

You could also use
Code:
{sum(q1.valueNAOK,q2.valueNAOK,q3.valueNAOK,q4.valueNAOK)}

but, since q1-q4 are always relevant, there is no need for the NAOK suffix

The .value suffix retrieves the assessment value for the answer. When you were using {sum(q1,q2,q3,q4)}, it was retrieving the answer id, so say you answered A1,B2,C3,D1, {sum{q1,q2,q3,q4)} would be 0, since the integer value of "A1" is 0, whereas {sum(q1.value,q2.value,q3.value,q4.value)} would be the equivalent of {sum(5,10,9,1)}, and returns the assessment value of 35.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose