View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
11597Feature requestsSurvey takingpublic2020-12-27 13:03
Reportervkuzmin Assigned Toc_schmitz  
PrioritynoneSeverity@50@ 
Status assignedResolutionopen 
Summary11597: Quotas with more that one question don't work with hidden questions
Description

If your quota use more then one question and last checked question is hidden that quota wont work at all.

Steps To Reproduce

Make some questions, add them to the same quota and hide some of them.

TagsNo tags attached.
Attached Files
Quotas_and_hidden_questions.png (16,811 bytes)   
Quotas_and_hidden_questions.png (16,811 bytes)   
Bug heat8
Story point estimate
Users affected %

Relationships

related to 16925 new Quota : enforced option (checked on all page) 

Users monitoring this issue

jelo

Activities

vkuzmin

vkuzmin

2016-08-30 15:13

reporter   ~40576

Last edited: 2016-08-30 15:14

survey_archive_412446 (1).lsa contain 5 quotas:

Quota1 (age range):
Hidden question S3 with limit=1. Works fine.

Quota2 (age range):
Hidden question S3 with limit=0. Works fine.

Quota3 (gender):
Question S1 with limit=2. Works fine.

<b>Quota4 (gender and age range):
Question S1 and hidden question S3 with limit=1. Dont work at all.</b>

Quota 5 use same settings a 2nd one and works fine too.

When i set "always hide this question" to "No" for S3 4th quota works fine.

DenisChenu

DenisChenu

2016-08-31 09:27

developer   ~40584

Last edited: 2016-08-31 09:34

Hi,

Using quota on hidden question is complex, actually :

  • If all Quota his hiide: => enforce quota (no need to submit the question)
  • If one or more question his NOT hidden => The quota action is done only if one of THIS question is in the page.

We do this because we can break a lot of active survey without this system.

See https://bugs.limesurvey.org/view.php?id=10177#c34311

Uploaded fixed qurvey => move the gender AFTER the age.

DenisChenu

DenisChenu

2016-08-31 09:33

developer   ~40585

@Carsten : Must be move to Feature request ?

Soluition without updating BD
Quota->active:
0 => disable
1 => Simple (like actual solution)
2 => Enfore : do if there are one hidden question
3 => Really enforce : do it at each page (see https://bugs.limesurvey.org/view.php?id=11570 feature request)

The solution , when we have the GUI =>

vkuzmin

vkuzmin

2016-09-02 14:15

reporter   ~40662

Last edited: 2016-09-02 14:16

I'm sorry, but what exactly i should test with https://github.com/LimeSurvey/LimeSurvey/blob/master/application/helpers/frontend_helper.php#L2067 ?

If this problem can not be solved without causing compatibility issues just close this bug.

DenisChenu

DenisChenu

2016-09-02 14:35

developer   ~40664

@vkuzmin : no, it's not a compatibility issue, for compatibility issue : leavbeing 1 for the old behaviour.

jelo

jelo

2016-09-25 16:10

partner   ~40946

Since there are many issues around hidden questions, wouldn't it be better to just implement the different kinds of hiding a questions in the GUI.
Just add "hide via CSS" and "hide via Javascript".
Beside equation question type the hiding of questions is more like deactivating.

11665: More ways to hide a question
https://bugs.limesurvey.org/view.php?id=11665

DenisChenu

DenisChenu

2016-09-25 16:20

developer   ~40947

Last edited: 2016-09-25 16:21

@jelo : here : there are already the better solution :
0 => disable
1 => Simple (like actual solution)
2 => Enforce : do if there are one hidden question
3 => Really enforce : do it at each page

For 11665 : add hidden to css class name does the trick, but why not update Question attribute.
BUT : EM use it in all validation (hidden or not) => then we need to update EM too .... and here .... it's dangerous .

And see my PS : put the hidden question AFTER the shown question fiox this survey.

jelo

jelo

2016-09-25 17:16

partner   ~40948

@Denis: I have seen no comment on your proposed solution. Not sure why.
Perhaps nobody gets it. Perhaps nobody cares at the moment. But I read it and got stuck at two points.

"Soluition without updating BD"
What is BD?

"The solution , when we have the GUI"
What GUI is missing?

It is unclear to me, how much the feature request is formed to tackle current issues. E.g. I never have seen a survey system where I need to answer a question like "enforce or really enforce" to get the quota system working.
It just works from the beginning. Every hidden question is available because hidden is always meant as hidden to the eye of the viewer, not hidden to the survey system. It feels like more and more options are added to tackle the broken EM system, which isn't able to access everything from the start.

DenisChenu

DenisChenu

2016-09-25 17:44

developer   ~40949

in 2.05: if you have only hidden question for quota : the quota NEVER happen then don't say "It just works from the beginning".

I know user where even if the question is answered 5 page before : they want to Optut respondant : example : you need 5 men, you have actually 4 men and 2 men enter in a survey at same time : the first is "out of quota", the second must be 'quota out'.
Actually : No solution for this

DB, sorry : DataBase
GUI : see the screenshot : we have a Yes/No for Active. We can have : No / simple / Enforce for hidden question / Enforced

jelo

jelo

2017-03-08 17:37

partner   ~43231

What is the difference between "out of quota" and "quota out"?

the first is "out of quota", the second must be 'quota out'. Actually : No solution for this<<

We have a lot of bug and features around quota. Isn't it time to get a review of most of them and consolidate all into one concept? There seems to be no LS GmbH developer used to concepts of quota. So there is no natural mentor for this topic.
At least that's what it looks like from my POV.

DenisChenu

DenisChenu

2017-03-08 17:44

developer   ~43232

This part : have more than 2 Status for quota can , maybe , be done in 3.0

Proposal, with status attribute

  • inactive (0) : current
  • active (1) : current : test POST or only hidden question
  • hidden-forced (2) : didn't test POST if have one hidden
  • always-forced (3) : didn't test POST never

If 'allowing update answer' : status must be 1 or 0, maybe 2 (but not 3 for sure)

Maybe other ?

Testing is done here :

  1. https://github.com/LimeSurvey/LimeSurvey/blob/master/application/helpers/frontend_helper.php#L2122
  2. https://github.com/LimeSurvey/LimeSurvey/blob/master/application/helpers/frontend_helper.php#L2152

Issue History

Date Modified Username Field Change
2016-08-30 10:08 vkuzmin New Issue
2016-08-30 10:08 vkuzmin File Added: Quotas_and_hidden_questions.png
2016-08-30 10:09 vkuzmin File Added: survey_archive_412446 (1).lsa
2016-08-30 15:13 vkuzmin Note Added: 40576
2016-08-30 15:14 vkuzmin Note Edited: 40576
2016-08-30 15:14 vkuzmin Note Edited: 40576
2016-08-31 09:02 DenisChenu Assigned To => DenisChenu
2016-08-31 09:02 DenisChenu Status new => assigned
2016-08-31 09:27 DenisChenu Note Added: 40584
2016-08-31 09:33 DenisChenu Note Added: 40585
2016-08-31 09:33 DenisChenu Assigned To DenisChenu => c_schmitz
2016-08-31 09:33 DenisChenu Status assigned => feedback
2016-08-31 09:33 DenisChenu File Added: survey_archive_quotaFixed.lsa
2016-08-31 09:34 DenisChenu Note Edited: 40584
2016-09-02 14:15 vkuzmin Note Added: 40662
2016-09-02 14:15 vkuzmin Status feedback => assigned
2016-09-02 14:16 vkuzmin Note Edited: 40662
2016-09-02 14:21 c_schmitz Project Bug reports => Feature requests
2016-09-02 14:35 DenisChenu Note Added: 40664
2016-09-25 16:10 jelo Note Added: 40946
2016-09-25 16:20 DenisChenu Note Added: 40947
2016-09-25 16:20 DenisChenu Note Edited: 40947
2016-09-25 16:21 DenisChenu Note Edited: 40947
2016-09-25 17:16 jelo Note Added: 40948
2016-09-25 17:44 DenisChenu Note Added: 40949
2016-09-25 17:44 DenisChenu File Added: Capture du 2016-09-25 17-42-57.png
2016-10-04 16:51 jelo Issue Monitored: jelo
2017-03-08 17:37 jelo Note Added: 43231
2017-03-08 17:44 DenisChenu Note Added: 43232
2020-12-27 13:03 DenisChenu Relationship added related to 16925