Welcome, Guest
Username: Password: Remember me

TOPIC: Saving Assessment scores to survey database

Saving Assessment scores to survey database 3 years 11 months ago #74129

  • giankuka
  • giankuka's Avatar
  • Offline
  • Junior Lime
  • Posts: 28
  • Karma: 0
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 administrator has disabled public write access.

Saving Assessment scores to survey database 3 years 11 months ago #74131

  • Ben_V
  • Ben_V's Avatar
  • Offline
  • Platinum Lime
  • Posts: 1588
  • Thank you received: 390
  • Karma: 102
Hi,
Probably you just have to expand the advanced settings of your question and tick the checkbox:
'Show in public statistics'

Ben
Benoît
The administrator has disabled public write access.

Saving Assessment scores to survey database 3 years 11 months ago #74239

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5835
  • Thank you received: 347
  • Karma: 261
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
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Saving Assessment scores to survey database 3 years 11 months ago #74281

  • giankuka
  • giankuka's Avatar
  • Offline
  • Junior Lime
  • Posts: 28
  • Karma: 0
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
<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 administrator has disabled public write access.

Saving Assessment scores to survey database 3 years 11 months ago #74303

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5398
  • Thank you received: 1149
  • Karma: 477
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Saving Assessment scores to survey database 3 years 11 months ago #74491

  • giankuka
  • giankuka's Avatar
  • Offline
  • Junior Lime
  • Posts: 28
  • Karma: 0
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 administrator has disabled public write access.

Saving Assessment scores to survey database 3 years 11 months ago #74505

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5835
  • Thank you received: 347
  • Karma: 261
Is tbhis the only question of this group?

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Saving Assessment scores to survey database 3 years 11 months ago #74514

  • giankuka
  • giankuka's Avatar
  • Offline
  • Junior Lime
  • Posts: 28
  • Karma: 0
NO, I have two questions in this group, both hidden throgh the script...
The administrator has disabled public write access.

Saving Assessment scores to survey database 3 years 11 months ago #74515

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5398
  • Thank you received: 1149
  • Karma: 477
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Saving Assessment scores to survey database 3 years 10 months ago #76619

  • sequoia
  • sequoia's Avatar
  • Offline
  • Junior Lime
  • Posts: 27
  • Karma: 0
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 administrator has disabled public write access.

Saving Assessment scores to survey database 3 years 10 months ago #76621

  • gsaha
  • gsaha's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
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 administrator has disabled public write access.

Saving Assessment scores to survey database 3 years 10 months ago #76627

  • TMSWhite
  • TMSWhite's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 83
  • Karma: 37
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:
{sum(q1.NAOK,q2.NAOK,q3.NAOK,q4.NAOK)}

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

You could also use
{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 administrator has disabled public write access.

Saving Assessment scores to survey database 3 years 10 months ago #76633

  • Ben_V
  • Ben_V's Avatar
  • Offline
  • Platinum Lime
  • Posts: 1588
  • Thank you received: 390
  • Karma: 102
Thanks Tom,

Could not be more clear !

Benoît
Benoît
The administrator has disabled public write access.

Saving Assessment scores to survey database 3 years 10 months ago #76699

  • sequoia
  • sequoia's Avatar
  • Offline
  • Junior Lime
  • Posts: 27
  • Karma: 0
Thanks so much for the input gsaha, TMSWhite and benitov! TMSWhite's input with my 1.92+installation worked great as I'm now able to view assessment total in the db and in the email. :)

I do have two follow up inquries that may also be of interest to other newbies with LimeSurvey...
  • Concerning the assessment total function, it is placed in a question entry. I can have visibility turned off for this one question, but in doing so it removes that data from the email sent out (there is though a db entry and the assessment rules shows corresponding results). Is there a workaround for this? (that is, have the question with the 'Equation'/{sum} output listed in the distributed email but not visible in the survey). What I have now is a blank question page with a sum value in the question area.
  • I've read before in another part of the forum benitov's posts regarding the removal of the question codes in any result printout (completed survey page/email) and had no success. The '<span class="nocode">' worked the first time (with the corresponding CSS rule in 1.91+), there after I only had one question for the entire survey. After I removed the code bit things returned back to normal (thus hesitant to try again with the upgraded 1.92+ version). Is there a new functionality with 1.92+ that can remove these answer codes from view in any result print page?

(areas highlighted I'm looking to remove)

Thanks again as always from the newbie ;)
Last Edit: 3 years 10 months ago by sequoia.
The administrator has disabled public write access.

Saving Assessment scores to survey database 3 years 10 months ago #76714

  • Ben_V
  • Ben_V's Avatar
  • Offline
  • Platinum Lime
  • Posts: 1588
  • Thank you received: 390
  • Karma: 102
1)
.... visibility turned off for this one question, but in doing so it removes that data

Maybe you can just emule the submit button putting the following code in the source of the question
The may problem is that you have to set your survey "question by question" or "group by group" with a group dedicated for this sole question because the effect will be to skip directly to the next step (next question, group or final submission)
<script type="text/javascript">
jQuery(document).ready(function($) {
 
// Adapt all survey, group & question ID s....
//!\\ document.getElementById('display123').style.display= "none";
//!\\ document.getElementById('answer789X456X123').style.display= "none";
 
document.limesurvey.submit();
 
});
</script>
 

2) for the class="nocode" I've no other solution... If you don't want to create a new css class, you can use inline css like
<span style="display:none"> <!-- don't close this tag -->

Ben
Benoît
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.337 seconds