Welcome to the LimeSurvey Community Forum

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

Scoring and Reporting

More
1 year 6 months ago #256988 by BITCNI
Replied by BITCNI on topic Scoring and Reporting

You'll need to calculate your score for 5his question in a hidden equation question

Thank you, but I've never used 'Hidden Equation' questions.  Is this an 'Equation' question that is then set to hidden?  If so, how do you add logic that looks up another question and checks which tick boxes have been selected (and then sum these)?  I wouldn't have a clue how to do this, so any guidance on this would be very much appreciated. 

Please Log in to join the conversation.

More
1 year 6 months ago #257022 by holch
Replied by holch on topic Scoring and Reporting
Yes, "hidden equation questions" are just that: equation questions, that are hidden. :-) You can use "always hide this question" from the GUI in this case, it will still calculate everything just fine.

Howe to check selected tick boxes. Two things help you there: The logic file will show you how to address the question and in this case subquestion.

usually it is something like that:
Code:
Q3_SQ003

If you use {Q3_SQ003} in a text display question you can easily see the output. Activating the survey, fill it and then have a look at the response table also gives you a good idea how things are stored in the database.

In the case of multipunch questions it is a "Y" if selected and empty if not selected.


So to check if a specific subquestion in a multipunch question has been checked you can use something like:
Code:
Q3_SQ003=="Y"

So you check if subquestion 3 of question 3 is "Y" and go from there.

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.

Please Log in to join the conversation.

More
1 year 6 months ago #257482 by linuxhooligan
Replied by linuxhooligan on topic Scoring and Reporting
To add to Tpartners reply, once you have your expression script values / formulas figured out, you can use Chartjs to generate graphs:

www.chartjs.org/

We are doing it right now, it is really great for visual presentations and quite flexible.

Please Log in to join the conversation.

More
1 year 6 months ago #257509 by tammo
Replied by tammo on topic Scoring and Reporting
Would love to see an example in a .lss file. Would you be willing to share that here?


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl

Please Log in to join the conversation.

More
1 year 6 months ago #257544 by Joffm
Replied by Joffm on topic Scoring and Reporting
In my "Tutorail 3: Gimmicks", Chapter 3, (in the German section) there is an example how to use "highcharts" and "Google Charts".

Probably I will add this same example with "chartjs"

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

More
1 year 5 months ago #257680 by BITCNI
Replied by BITCNI on topic Scoring and Reporting
Thanks, everyone, for your replies.

I've checked the Logic file, and I can see that the Muliple Choice question is as follows:

SQ-1    S1Q3b_SQ001    
SQ-2    S1Q3b_SQ002    
SQ-3    S1Q3b_SQ003
SQ-4    S1Q3b_SQ004

My next question is this: where exactly to I go (or how exactly) in order to write code, such as IF S1Q3b_SQ001 ==Y, then VALUE = 70.
And if someone selects ALL the options (001, 002, 003, 004), then how do I sum them to give the final score for this question, as LS obviously needs to have a score for this question in order to add it to the overall Survey's score.

I'm really sorry if I'm being obtuse, but coding with LS is completely new to me.  I have absolutely no idea what I'm doing or even where to start with all this!

Is there a coding area you're supposed to go into in order to start coding/doing sums?

Please Log in to join the conversation.

More
1 year 5 months ago #257711 by Joffm
Replied by Joffm on topic Scoring and Reporting
Hi,
first, as @holch showed above: If you compare with text, you have to use quotes.
So it is: S1Q3b_SQ001 =="Y"
And it's all shown in the manual
 

The IF function?
As in the manual
if(test,result_if_true,result_if_false)
Your test is S1Q3b_SQ001 =="Y"
If this is true, the true_result (70)  is returned else the false_result (0)
{if(S1Q3b_SQ001 =="Y",70,0)}

And if someone selects ALL the options 
This is easy.
The count is equal to the number of options.
{if(count(that.S1Q3b.NAOK)==4,999,0)}
 

Otherwise you just sum the IFs, like
{sum(if(S1Q3b_SQ001 =="Y",70,0),if(S1Q3b_SQ002 =="Y",50,0),if(S1Q3b_SQ003 =="Y",90,0),if(S1Q3b_SQ004 =="Y",65,0))}

If the values are equal for each option (70) you can shorten this to
{count(that.S1Q3b.NAOK)*70}

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

More
1 year 5 months ago #257719 by BITCNI
Replied by BITCNI on topic Scoring and Reporting
I'm sorry for being thick, but WHERE do I put this information?  I've looked at the LS Manual for Assessments, and I see you can create Assessment Rules.
They have headings for Name, Minimum, Maximum, and Message.  Do you put (eg), "if(test,result_if_true,result_if_false)" into the Minimum or Maximum boxes?
Am I looking in the wrong manual? 

Is there a different manual for coding?

Please Log in to join the conversation.

More
1 year 5 months ago #257722 by Joffm
Replied by Joffm on topic Scoring and Reporting
You very quickly forget about assessment rules.
At the start of this thread we told you that you may use assessment values (what you do), but assessment rules were outdated when I joined this forum nearly nine years ago.

Weeks ago I wrote, you can enter these equations wherever you want to display this result.
And if you want to calculate more, if you get a final score after calculationg several interim scores, you use several questions of type "equation"

Joffm
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

More
1 year 5 months ago #257723 by BITCNI
Replied by BITCNI on topic Scoring and Reporting
Sorry, but this is all so far over my head that I am having trouble keeping track of all this.  I'm sure this is very simple to you, but it's very, very complicated for me.

but assessment rules were outdated when I joined this forum nearly nine years ago."

It's genuinely shocking that LimeSurvey STILL has these ancient manuals available!

And regarding "you can enter these equations wherever you want to display this result.", I don't understand this at all.  "Wherever you want"?  Such as?
I feel like I'm missing a VITAL bit of information.  Is there some secret backend area of LimeSurvey where you put in Code?

I am totally lost.  Totally.

Please Log in to join the conversation.

More
1 year 5 months ago - 1 year 5 months ago #257730 by holch
Replied by holch on topic Scoring and Reporting

It's genuinely shocking that LimeSurvey STILL has these ancient manuals available!


The manual is a wiki, feel free to help out by updating the manuals. However, in this specific case you shouldn't update anything. The assessment rules are a Limesurvey feature and they CAN be used. I personally wouldn't, as there are better and more flexible options to do the same or actually a lot better. This is what Joffm is trying to tell you.

They are a lot more limited and often require more work than doing the same with equations and expression manager/script. Features like assessment rules or condition designer are still there because people still use them and for some limited use cases they might actually work. And you know how things go: if you get rid of a feature, even if there is a better option, people will complain. A lot. So they are there. They probably will stay forever. I (and Joffm) do not recommend to use them anymore.They are considered "outdated" by many power users, because Limesurvey now has far more flexible and powerful solutions for this to offer (Expressions).

For complicated assessments the assessment feature really isn't a good choice, it doesn't allow you to do more complicated calculations.

Now regarding your issue:

You should really have a look at the manual pages about Expression Manager/Script. I am sure this will change your "life" in terms of Limesurvey. It won't take you much more than 30-60 mins to get a gist of the basics and you will understand how it works. Especially have a look at the examples that come with it. For more complicated approaches you can always go back to the manual later. Or of course ask here in the forum.

Here in the forum we can help you with specific questions, but we really can't teach the basics over and over again. From what I see through your postings you are getting out of the terrain of simple questionnaires into more advanced terrain. You will have to know the basics about expression manager and how to use equations, it will really speed up your processes, I am sure. Once you get an idea of what Expression Manager and Equations can do, you will see a lot of new opportunities.

It is important to have the basic concepts right, then all this will be easy. I know that expression manager can be overwhelming at the beginning, but it actually isn't all that complicated. It is not much different to using formulas or linking results from different cells in Excel.

So here a very general summary: usually you calculate your stuff in equation type questions (which you might want to hide via the GUI AFTER thorough testing, so that respondents don't see them).

To display the results of the calculations that you made, you can show them just like you can show the answers given to any other question by showing them in question texts, answer options, subquestion texts, text display questions, basically anywhere in Limesurvey where you can show some text.

You do this with something like this:
Code:
{CODEOFTHEEQUATIONQUESTION}

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.
Last edit: 1 year 5 months ago by holch.

Please Log in to join the conversation.

More
1 year 5 months ago - 1 year 5 months ago #257731 by Joffm
Replied by Joffm on topic Scoring and Reporting
After reading @holch's entire text, 
I removed mine.
It was largely identical

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 1 year 5 months ago by Joffm.

Please Log in to join the conversation.

More
1 year 5 months ago #257750 by BITCNI
Replied by BITCNI on topic Scoring and Reporting
Thank you for your long reply. I'm not sure if this means that you need to create a Hidden Equation for every single question you want to score, but either way, this all seems way too much for me. Do you know if there are LimeSurvey developers we could pay to do this scoring for us? I know I don't have the time to learn Expression Manager and then to fumble about trying to get scoring done for all the questions in our Survey. I have a full-time job, and it seems that unless we can pay a developer, we'll just have to forget about it. :(

Please Log in to join the conversation.

More
1 year 5 months ago #257761 by Joffm
Replied by Joffm on topic Scoring and Reporting
On the LimeSurvey homepage there is the link to the partners
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

More
1 year 5 months ago #257790 by holch
Replied by holch on topic Scoring and Reporting

I'm not sure if this means that you need to create a Hidden Equation for every single question you want to score,

This could be one way to do it, but not necessarily. It all depends on your questions and how you want to score them. If attributing a assessment value covers your scores for all questions, you can easily calculate all your scores in one. If you want to calculate more than one score value (e.g. one for each question group or something like that), then it obviously would make sense to create an equation question for each of those calculations you want to make, to store them in the database separately.

but either way, this all seems way too much for me. Do you know if there are LimeSurvey developers we could pay to do this scoring for us?

While I don't think you really need this, Joffm already pointed you to the right place where Limesurvey partners are listed.

I know I don't have the time to learn Expression Manager and then to fumble about trying to get scoring done for all the questions in our Survey. I have a full-time job, and it seems that unless we can pay a developer, we'll just have to forget about it.


As I said, I bet than in less than an hour of reading and maybe another hour of experimenting you probably will be able to set this up on your own and if you run into trouble with specific issues, you can always ask the forum.

What the forum can't do is create the survey for you, but we certainly can have a look at a sample survey (with a couple of example questions) that lets us understand how you want to "score" things and then give you tips and examples.

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.

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose