- Posts: 105
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Display percentage on Assessment
- marektondryk
- Offline
- Premium Member
Less
More
6 years 10 months ago #155313
by marektondryk
Replied by marektondryk on topic Display percentage on Assessment
{if(q1 == 'A1', 5, if(q1 == 'A2', 3, 0))}
q1 is a code of question, right?
Why I can't use q10 code?
I have 10 questions in a group.
q1-q9 works but q10 deosen't....
q1 is a code of question, right?
Why I can't use q10 code?
I have 10 questions in a group.
q1-q9 works but q10 deosen't....
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
6 years 10 months ago #155315
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Display percentage on Assessment
Yes, q1 is the question code. Assuming you have used the correct code, I have no idea why q10 doesn't work.
Here is a working sample survey with both q1 and q10:
Here is a working sample survey with both q1 and q10:
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
The topic has been locked.
- marektondryk
- Offline
- Premium Member
Less
More
- Posts: 105
- Thank you received: 0
6 years 10 months ago #155316
by marektondryk
Replied by marektondryk on topic Display percentage on Assessment
After restarting computer works with q10
The topic has been locked.
- marektondryk
- Offline
- Premium Member
Less
More
- Posts: 105
- Thank you received: 0
6 years 10 months ago #155493
by marektondryk
Replied by marektondryk on topic Display percentage on Assessment
I have problem with progress bar and counting hide/equation questions.
I use tip from: www.limesurvey.org/de/foren/design-issue...ith-hidden-questions
I put code in description of each 6 groups of questions but equation questions (set to hide) are displayed and progess bar counting "empty" equation questions....
I use tip from: www.limesurvey.org/de/foren/design-issue...ith-hidden-questions
I put code in description of each 6 groups of questions but equation questions (set to hide) are displayed and progess bar counting "empty" equation questions....
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
6 years 10 months ago #155495
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Display percentage on Assessment
What LimeSurvey version and template are you using?
Can you give a link to a short test survey.
Can you give a link to a short test survey.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- marektondryk
- Offline
- Premium Member
Less
More
- Posts: 105
- Thank you received: 0
6 years 10 months ago #155496
by marektondryk
Replied by marektondryk on topic Display percentage on Assessment
LS 2.64.7+170404 customized ubuntu_orange template
badanie.coachabilityindex.pl/index.php/329683
badanie.coachabilityindex.pl/index.php/329683
The topic has been locked.
- marektondryk
- Offline
- Premium Member
Less
More
- Posts: 105
- Thank you received: 0
6 years 10 months ago - 6 years 10 months ago #155526
by marektondryk
What does "progressValue=32" mean?
Replied by marektondryk on topic Display percentage on Assessment
Code:
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { var progressValue = 32; $('.progress-bar').css({ 'transition': 'width 0s ease 0s', 'width': progressValue+'%' }).attr('aria-valuenow', progressValue).text(progressValue+'%'); }); </script>
What does "progressValue=32" mean?
Last edit: 6 years 10 months ago by marektondryk. Reason: correction
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
6 years 10 months ago #155527
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Display percentage on Assessment
Sorry, I am not going to try and debug where there is a 20 second timer on every 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.
- marektondryk
- Offline
- Premium Member
Less
More
- Posts: 105
- Thank you received: 0
6 years 10 months ago - 6 years 10 months ago #155529
by marektondryk
Replied by marektondryk on topic Display percentage on Assessment
Sorry Tony, time is set off.
There is short version of survey.
2 groups of questions (10 questions+10 hidden questions in each group).
____________________
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
var progressValue = 32;
$('.progress-bar').css({
'transition': 'width 0s ease 0s',
'width': progressValue+'%'
}).attr('aria-valuenow', progressValue).text(progressValue+'%');
});
</script>
______________________
I put this code in description od each group.
Would You like to try agin? I have no idea what is going there......
Please.........
badanie.coachabilityindex.pl/index.php/298654?lang=pl
There is short version of survey.
2 groups of questions (10 questions+10 hidden questions in each group).
____________________
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
var progressValue = 32;
$('.progress-bar').css({
'transition': 'width 0s ease 0s',
'width': progressValue+'%'
}).attr('aria-valuenow', progressValue).text(progressValue+'%');
});
</script>
______________________
I put this code in description od each group.
Would You like to try agin? I have no idea what is going there......
Please.........
badanie.coachabilityindex.pl/index.php/298654?lang=pl
Last edit: 6 years 10 months ago by marektondryk.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
6 years 10 months ago #155567
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Display percentage on Assessment
Now the survey requires a token so I cannot access it - sorry, but I give up.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- marektondryk
- Offline
- Premium Member
Less
More
- Posts: 105
- Thank you received: 0
6 years 10 months ago #155571
by marektondryk
Replied by marektondryk on topic Display percentage on Assessment
Link in the post above is for the short version with 2 groups of questions and without token....
OK... Tony thanks for Your gooddwill...
OK... Tony thanks for Your gooddwill...
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3595
6 years 10 months ago #155652
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Display percentage on Assessment
I don't see that script in the source of the page. It must be in an element that is present on the page. So, if you place it in the group description, you must enable "Show group description" in the survey settings. Alternatively, you can place the script in the source of a question.
More info on using JavaScript in your survey - manual.limesurvey.org/Workarounds:_Manip...tc..29_in_LimeSurvey
Sample survey attached:
More info on using JavaScript in your survey - manual.limesurvey.org/Workarounds:_Manip...tc..29_in_LimeSurvey
Sample survey attached:
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
The topic has been locked.