Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:
  • Page:
  • 1
  • 2

TOPIC: How to store assessment value in the responses & weight number in the question?

How to store assessment value in the responses & weight number in the question? 5 years 1 month ago #62347

  • iamharry
  • iamharry's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 4
  • Karma: 1
Hi,

My organization have all employees to do checkpoint every 6 months in a year to examine their performance in work. Each employee have to complete his/her checkpoint by assessing him/herself.
I want to design a kind of survey in which a survey admin can set the weight number in each group of questions, this weight number will be multiplied with the assesessment values.
After participants commit their answers, the system can store the responses including total scores of assessment value in order that survey admin can see all the results of self assessments.

I want to supply more information about this survey's properties:

+ This is a closed-access survey
+ This survey is set to "Enable token-based response persistence"

I'm not good at php programming. I will appreciate a lot if anyone can help me
The administrator has disabled public write access.

How to store assessment value in the responses & weight number in the question? 5 years 1 month ago #62373

  • greg_d
  • greg_d's Avatar
  • Offline
  • Senior Lime
  • Posts: 47
  • Thank you received: 7
  • Karma: 4
Hi,

Have you already read docs.limesurvey.org/tiki-index.php?page=Assessments ?
Why do you want to
set the weight number in each group of questions
. Do these group weights have to change dynamically depending on some condition/value? Can you just multiply group weights by assessments values?
The administrator has disabled public write access.

How to store assessment value in the responses & weight number in the question? 5 years 1 month ago #62378

  • Ben_V
  • Ben_V's Avatar
  • Offline
  • Platinum Lime
  • Posts: 1797
  • Thank you received: 439
  • Karma: 110
Hi,
To store the general assessment value into the DB:
- At the end of your survey create a (hidden) short text question and paste this code (as question text) editing the SGQA value (1234X567X1694)
Score:
<script> 
jQuery(document).ready(function() {
document.getElementById('answer1234X567X1694').value = "{assessment_CURRENT_TOTAL}";
document.getElementById('display1234').style.display= "none";
document.getElementById('answer1234X567X1694').style.display= "none";
});
</script>

For the 'weight' if you are not a Javascript Guru, i think it's better to export the final results to MS-Excel to start calculating anything you want.
For statistical advanced features use SPSS or PSPP (open-source)

Ben
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: 5 years 1 month ago by Ben_V.
The administrator has disabled public write access.

How to store assessment value in the responses & weight number in the question? 5 years 1 month ago #62379

  • iamharry
  • iamharry's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 4
  • Karma: 1
Hi,

Thanks for considering my case.
Why do you want to
set the weight number in each group of questions
I have two issues in this topic:

+ Storing the total assessement values in the respondents as performance scores.
+ Set the weight number on each question (sorry! i wrote "set the weight number in each group of questions"). The reasone why I want to set weight nuymber is depends on kinds of questions which will emphasize the target of the survey. For example, to asssess an employee whether he is good at working performancing or not depends on many standards or criterions including: labour productiveness, responsibility to work, relations... Each criteria will have a weight number, and this weight number will be set high or low depends on the target of the assessment.
Do these group weights have to change dynamically depending on some condition/value
I have 2 cases:
Case 1: the weights will be changed depending on previous answer or a token attribute
Case 2: the weight number of the question will be set manually by admin

Case 2 is simplier, I prefer case 2 first.

Sorry for my terrible English.
Last Edit: 5 years 1 month ago by iamharry.
The administrator has disabled public write access.

How to store assessment value in the responses & weight number in the question? 5 years 1 month ago #62413

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6128
  • Thank you received: 1360
  • Karma: 535
1) assessment results are not stored in the data. To get them in the data you will need to use JavaScript as benitov points out.

2) assessment values cannot be changed dynamically. If you want dynamic results I think you will need to use some extensive JavaScript to load hidden questions instaed of assessments.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.

How to store assessment value in the responses & weight number in the question? 5 years 1 week ago #63605

  • mhuque07
  • mhuque07's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 4
  • Karma: 0
Hello,

I am new to limesurvey. I want to create a report on the total assessment value for each user like an exam. I put the assessment mode on for the survey and placed value for each answers. I tried putting the following at the end of the questions list but I am not getting any results in the "Score" column of the reporting page.

By the way, I edited the SGQA values. I replaced 1234 with the survey number, 567 with the group number, and 1694 with the question number I placed this script with.

I appreciate your help.

Thanks,

Score:
<script>
jQuery(document).ready(function() {
document.getElementById('answer1234X567X1694').value = "{assessment_CURRENT_TOTAL}";
document.getElementById('display1234').style.display= "none";
document.getElementById('answer1234X567X1694').style.display= "none";
});
</script>
The administrator has disabled public write access.

How to store assessment value in the responses & weight number in the question? 5 years 1 week ago #63612

  • Ben_V
  • Ben_V's Avatar
  • Offline
  • Platinum Lime
  • Posts: 1797
  • Thank you received: 439
  • Karma: 110
I tried putting the following at the end of the questions list
for getting this workaround working it suppose that your hidden (or not) question showing the {ASSESSMENT_CURRENT_TOTAL} is not into the same Group (page) than your other questions...
So if you have:
document.getElementById('answer1234X567X1694').value = "{ASSESSMENT_CURRENT_TOTAL}";
you can't get your evaluated questions inside #567 group.
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: 5 years 1 week ago by Ben_V.
The administrator has disabled public write access.
The following user(s) said Thank You: mhuque07

How to store assessment value in the responses & weight number in the question? 5 years 1 week ago #63616

  • mhuque07
  • mhuque07's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 4
  • Karma: 0
Thank you for the quick response.

I placed the script in a different group like you suggested but I still can not get the score to display. Sorry, my experience in javacript is very limited.

Would it be possible if you can give an example of the assessment values that add up and display the score? It would be great if you can export the example assessment and upload it.

Thanks again for your help.
The administrator has disabled public write access.

How to store assessment value in the responses & weight number in the question? 5 years 1 week ago #63618

  • Ben_V
  • Ben_V's Avatar
  • Offline
  • Platinum Lime
  • Posts: 1797
  • Thank you received: 439
  • Karma: 110
Here you are..
You 'll have to change the SGQA codes into the 'score' question to adapt to your data.
I'm sorry...it's a Catalan survey

File Attachment:

File Name: Assess_sur...4862.lss
File Size:29 KB
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.
The following user(s) said Thank You: mhuque07, serzas

How to store assessment value in the responses & weight number in the question? 5 years 1 week ago #63619

  • mhuque07
  • mhuque07's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 4
  • Karma: 0
Thank you very much. I am going to carefully examine the example survey. Appreciate all your help :)
The administrator has disabled public write access.

How to store assessment value in the responses & weight number in the question? 4 years 2 weeks ago #83151

  • Struppi
  • Struppi's Avatar
  • Offline
  • Senior Lime
  • Posts: 40
  • Karma: 0
Hi, Benitov,

thank you for your explication and the survey you uploaded (Assess_survey_64862.lss).

I'm not experienced in programming/script languages at all...

If I understood right your survey, The last question "Score" in the group DADES PERSONALS is this famous "hidden" question that is used only for storing the total of the adding of the assessment values in the database, isn't it?

My beginner questions:
1) Can I make the addition of the question of SEVERAL groups by using this "score
question" in a group like the one you used ("DADES PERSONALS")?
2) Is the mathematical operation (adding the assessment values of all questions) ex-
clusively done by the "Set conditions for this question" dialogue?
3) Is SGQA (I think it had been mentioned in the thread) obligatory for this method of
adding assesssment values? I didn't see it involved in your survey.
4) After filling out the survey, I expected to find the score displayed on the last page
(and after that - having activated the survey before - in the database), but I was
very surprised by finding an input (!) field "score" on the last page.
I didn't see a score at the top of the page. Do the participants have to put in their
score in this score input field?!?

Thank you very much for your answer!

Struppi
Last Edit: 4 years 2 weeks ago by Struppi. Reason: Correction
The administrator has disabled public write access.

How to store assessment value in the responses & weight number in the question? 4 years 2 weeks ago #83153

  • Ben_V
  • Ben_V's Avatar
  • Offline
  • Platinum Lime
  • Posts: 1797
  • Thank you received: 439
  • Karma: 110
Hi Struppi,

Quickly to answer your questions:
1) {ASSESMENT_CURRENT_TOTAL} = all questions (all questions groups)...
It's easy to get the asssessment score for the 1st group or all the survey, but complicated for example for each group (if you want to store the result as well)
2) Mathematical operations and conditions are independants
3) 100% SGQA based
4) The input (and the question) will be hidden and submitted automatically... If the input is displayed empty (automatic submit off) it's probably due to a SGQA error, (the normal behaviour is to get it prefilled with the total score)
:blink:
In my opinion if you are starting to manage asssessment scores and/or mathematical operations, you may use the (quiet new) 'Expression Manager' features available with LS 1.92- All other javascript workarounds mentionned in this thread were useful before such improvment, but i think 100% out of date today.
The code is easier, more integrated and not based on SGQA code...

Ben/
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: 4 years 2 weeks ago by Ben_V.
The administrator has disabled public write access.

How to store assessment value in the responses & weight number in the question? 4 years 2 weeks ago #83154

  • Struppi
  • Struppi's Avatar
  • Offline
  • Senior Lime
  • Posts: 40
  • Karma: 0
Hi, Ben,

thank you for your prompt reply!

To make it short: Is there anywhere a simple and short sample survey easy to understand where I can see how to use the Expression Manager for storing the TOTAL value (otherwise only displayable on the last page)?

Struppi
The administrator has disabled public write access.

How to store assessment value in the responses & weight number in the question? 4 years 2 weeks ago #83158

  • Ben_V
  • Ben_V's Avatar
  • Offline
  • Platinum Lime
  • Posts: 1797
  • Thank you received: 439
  • Karma: 110
just install this short survey and have a look

File Attachment:

File Name: assess.lss
File Size:28 KB
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: 4 years 2 weeks ago by Ben_V.
The administrator has disabled public write access.
The following user(s) said Thank You: Struppi

How to store assessment value in the responses & weight number in the question? 4 years 2 weeks ago #83159

  • TMSWhite
  • TMSWhite's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 758
  • Thank you received: 83
  • Karma: 37
Ben-

That's a very nice example, thanks. It shows that if you use the all-in-one mode, you can see real-time changes to the assessment score.

/To
The administrator has disabled public write access.
The following user(s) said Thank You: Ben_V, Struppi
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.419 seconds
Imprint                   Data Protection Statement                  Revocation information and revocation form