not counting hidden questions in the progress bar

More
1 year 6 months ago #135875 by Siem
Siem created the topic: not counting hidden questions in the progress bar
How can I base the step-size of the progress-bar on the number of visible questions instead of the total number of questions including the hidden questions?
For instance, if I have a survey with 20 questions and 5 hidden question can I let the progress bar indicate steps of 5% instead of 4%?

Please Log in to join the conversation.

More
1 year 6 months ago #135877 by DenisChenu
DenisChenu replied the topic: not counting hidden questions in the progress bar
LimeSurvey version ?

Because seems to be a bug (hidden, not with conditions).

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
1 year 6 months ago #135887 by Siem
Siem replied the topic: not counting hidden questions in the progress bar

DenisChenu wrote: LimeSurvey version ?

Because seems to be a bug (hidden, not with conditions).

Denis


Version 2.50+ Build 160506

Please Log in to join the conversation.

More
1 year 6 months ago #135896 by tpartner
tpartner replied the topic: not counting hidden questions in the progress bar
I agree with Denis - if the questions are hidden by a setting rather than conditions/relevance, they should not be a factor in the progress calculations. If they are hidden via conditions/relevance, there is no choice but too include them in the calculations.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
1 year 6 months ago #135900 by Mazi
Mazi replied the topic: not counting hidden questions in the progress bar
I second this, but currently the progress bar always takes into account all questions even though they are always hidden by default.

Sounds worth a feature request for Limesurvey 3, what do you think?

Any hints were the related code is located?


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
1 year 6 months ago #135922 by tpartner
tpartner replied the topic: not counting hidden questions in the progress bar
I would call it a bug, not a missing feature.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
1 year 6 months ago #135942 by DenisChenu
DenisChenu replied the topic: not counting hidden questions in the progress bar
We don't use Question by Question a lot : this explain why we don't have bug report for this.

"hidden" group exist but rarely.

Think it's a bug.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
1 year 6 months ago #135991 by jelo
jelo replied the topic: not counting hidden questions in the progress bar
I asked for an option to calculate progress bar based on
a) Questions actually shown
b) Question position in the survey
bugs.limesurvey.org/view.php?id=9677

I sometimes set the progressbar with values in hidden questions. When bridging three surveys (first and last limesurvey) I need to set start and end values to ensure a 0 to 100% over all three surveys.

Please Log in to join the conversation.

More
1 year 6 months ago #135996 by holch
holch replied the topic: not counting hidden questions in the progress bar
Progress bar and % is always tricky. I remember that even big tools are/were struggeling there.

I agree that questions that are always hidden by advanced question settings should not be counted into the calculation.

Now to exclude hidden questions because of conditions can generate problems, because in an extreme situation, you have 2 questions that are always there, so if you are in the first question progress bar shows 50%. You give the "wrong" answer and suddenly another 10 questions appear. I feel this is worse than showing 10% and suddenly you are finished quicker than you tought. At least for the user. I guess the progress bar will never be 100% ideal.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
1 year 6 months ago #136006 by DenisChenu
DenisChenu replied the topic: not counting hidden questions in the progress bar

jelo wrote: ....
I sometimes set the progressbar with values in hidden questions. When bridging three surveys (first and last limesurvey) I need to set start and end values to ensure a 0 to 100% over all three surveys.

Hi jelo,

In fact : progressbar is "just" a javascript plugin showing something. You can "easily" hack it to show another settings.

Quick xample for a group by group system, in "group description"
<p class="ownprogress hide">You make half of the survey</p><div id="ownprogress"></div>
<script>
    $(document).ready(function() {
    $("#ownprogress").progressbar({
    value: 50
    });
    ;});
</script>
I really think it's hard to find all the part : sometimes manual hacking seems better (and it's more easy to update for a specific need).

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
1 year 6 months ago #136010 by jelo
jelo replied the topic: not counting hidden questions in the progress bar

DenisChenu wrote: In fact : progressbar is "just" a javascript plugin showing something. You can "easily" hack it to show another settings.

I provided a solution in the feature request ticket for my bridging needs. But as I see you opposed my feature request last year ;-)

To base progress bar calculations on a different metric (e.g. displayed questions) that information needs to be provided somewhere.

I would find it nice, when you could change different display metrics, location (top or bottom) and start/end values via a little option section. To make it even more easier for users a header/footer for every page (aka group) is accessible, where a progress-bar placeholder can be kicked out and a static value can be filled in. Personally I "only" need a variable, which provides the questions shown for the current user to update the workarounds I use.
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

More
1 year 6 months ago #136019 by DenisChenu
DenisChenu replied the topic: not counting hidden questions in the progress bar
I like to have a "plugin event" enable to hack tis part the way we want ...

I need to make a pull request for "templateReplace" event . For example : any plugin can do something with {PROGRESSBARR} for example.

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
1 year 6 months ago - 1 year 6 months ago #136049 by tpartner
tpartner replied the topic: not counting hidden questions in the progress bar
To set the value of the core progress bar, you can do something like this:

<script type="text/javascript" charset="utf-8">	
 
	$(document).ready(function() {
		// Progress bar value
		$('#progress-wrapper').css('visibility', 'hidden');
		setTimeout(function() {
			$('#progressbar').progressbar('value', 50 );
			$('#progress-wrapper').css('visibility', 'visible');
		}, 250);
    });		
</script>
 

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last Edit: 1 year 6 months ago by tpartner.

Please Log in to join the conversation.

More
6 months 2 weeks ago #153893 by Siem
Siem replied the topic: not counting hidden questions in the progress bar
I have a survey with 226 questions / 56 hidden questions (in a different group).


The progress-bar does not indicate the right value because of these hidden questions. I understand that it is difficult to fix this.

In the previous message Tony suggested this:

<script type="text/javascript" charset="utf-8">	
 
	$(document).ready(function() {
		// Progress bar value
		$('#progress-wrapper').css('visibility', 'hidden');
		setTimeout(function() {
			$('#progressbar').progressbar('value', 50 );
			$('#progress-wrapper').css('visibility', 'visible');
		}, 250);
    });		
</script>

How would I implement it, where would I put this code?

Please Log in to join the conversation.

More
6 months 2 weeks ago #153900 by tpartner
tpartner replied the topic: not counting hidden questions in the progress bar
Place the code in the source of any question on the page or in the group description - manual.limesurvey.org/Workarounds:_Manip...tc..29_in_LimeSurvey

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!