View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
19172 | Bug reports | Other | public | 2023-10-13 05:38 | 2023-10-20 22:09 |
Reporter | wangzhen2 | Assigned To | mfavetti | ||
Priority | none | Severity | minor | ||
Status | closed | Resolution | duplicate | ||
Product Version | 6.2.x | ||||
Summary | 19172: Quota exceeded limit | ||||
Description | When my quota setting only requires 1 person, and 5 people come to answer at the same time, they have all answered the question corresponding to the quota and entered the next page. In the end, they can all submit, which will lead to the quota exceeding, and the actual quota number becomes 5. I have checked the code, and I know it's an issue with the judgment on line 1879 in frontend_helper.php. I don't understand the meaning of $bAllHidden, because I found that it is always false here. | ||||
Steps To Reproduce | Steps to reproduceCreate three question groups. In the first group, add a single-choice question with options 1, 2, and 3. Set a quota for option 1 of this single-choice question, with the quota limit set to one. Create any question in the other two groups. Use group-based pagination, and start the questionnaire for testing. When 5 people enter the questionnaire simultaneously and all select option 1 of the single-choice question in the first group, then click the next page, continue this process, and in the end, you will find that all 5 people have successfully submitted without any prompt that the quota has been exceeded. Expected resultWhen clicking the next page or submitting on the last page, also verify whether all quotas have been exceeded. Actual resultQuota exceeded | ||||
Tags | No tags attached. | ||||
Bug heat | 8 | ||||
Complete LimeSurvey version number (& build) | 6.2.9 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | mysql 5.7 | ||||
Server OS (if known) | |||||
Webserver software & version (if known) | |||||
PHP Version | php 7.4 | ||||
duplicate of | 16925 | assigned | p_teichmann | Feature requests | Quota : enforced option (checked on all page) |
|
|
From my understanding, only completed responses count towards a quota. Also in your example (group by group presentation), the quota is only checked when the respondent clicks next on the first group. So I think it's working as intended. Maybe this is more of a feature request to have quotas evaluated on every group change rather than only on a group change that contains a question tied to a quota? So once you have enough completes to satisfy a quota, anyone in the middle of the survey that would exceed that quota gets stopped the next time they change groups? |
|
L1879 basically says if the response satisfies all the conditions for the quota and either one of the quota fields was posted or all the quota fields are questions with the "always hide this question" setting enabled. It's this posted part that means it only considers quota which had a value that was sent via post. (ie. the question for the quota was in the group that was just displayed when they clicked next) |
|
I think if you replace $bPostedField on line L1879 with true you'll get the behavior you want. (always check quota regardless of if it was in post data for last request) |
|
in any case, I think this isn't a bug. Works exactly as documented here: https://manual.limesurvey.org/Survey_quotas Actually, read the section at the bottom called "Limiting max number of responses in survey using a hidden question" You can use a hidden equation based off of the question and set the quota on that equation to achieve the desired functionality, I think. |
|
Thank you for your reply. I tried the method you mentioned, and it indeed can implement quota restrictions. However, isn't this too cumbersome? I need to create a hidden question corresponding to each question that does not need to have a hidden quota. For a simpler approach, I might prefer to replace $bPostedField with true. |
|
It might be simpler, but every time you update to a new version you'd need to change it again. Alsothe code base could change, which means you'd have to figure out what/where to modify again. I think it's easier in the long run to use the supported method of achieving the functionality you want. |
|
A solution can be create quota with hidden question … If i don't make error : there are a feature request : https://bugs.limesurvey.org/view.php?id=16925 |
|
i'm closing this as it's basically a feature request and DenisChenu made 16925 accordingly |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2023-10-13 05:38 | wangzhen2 | New Issue | |
2023-10-13 05:38 | wangzhen2 | File Added: image.png | |
2023-10-13 05:52 | wangzhen2 | File Deleted: image.png | |
2023-10-13 05:53 | wangzhen2 | Note Added: 77682 | |
2023-10-13 05:53 | wangzhen2 | File Added: 1697169157820.jpg | |
2023-10-13 05:53 | wangzhen2 | Bug heat | 0 => 2 |
2023-10-13 05:55 | wangzhen2 | Issue Monitored: wangzhen2 | |
2023-10-13 05:55 | wangzhen2 | Bug heat | 2 => 4 |
2023-10-13 05:55 | wangzhen2 | Issue End Monitor: wangzhen2 | |
2023-10-13 05:55 | wangzhen2 | Bug heat | 4 => 2 |
2023-10-13 08:31 | mfavetti | Note Added: 77683 | |
2023-10-13 08:31 | mfavetti | Bug heat | 2 => 4 |
2023-10-13 08:41 | mfavetti | Note Added: 77684 | |
2023-10-13 08:43 | mfavetti | Note Added: 77685 | |
2023-10-13 08:43 | mfavetti | Issue Monitored: mfavetti | |
2023-10-13 08:43 | mfavetti | Bug heat | 4 => 6 |
2023-10-13 08:44 | mfavetti | Note Edited: 77685 | |
2023-10-13 08:45 | mfavetti | Note Added: 77686 | |
2023-10-13 08:45 | mfavetti | Note Edited: 77686 | |
2023-10-13 09:05 | mfavetti | Note Edited: 77686 | |
2023-10-16 04:54 | wangzhen2 | Note Added: 77712 | |
2023-10-16 07:57 | mfavetti | Note Added: 77714 | |
2023-10-18 10:14 | DenisChenu | Note Added: 77766 | |
2023-10-18 10:14 | DenisChenu | Bug heat | 6 => 8 |
2023-10-18 10:15 | DenisChenu | Relationship added | duplicate of 16925 |
2023-10-20 22:09 | mfavetti | Assigned To | => mfavetti |
2023-10-20 22:09 | mfavetti | Status | new => closed |
2023-10-20 22:09 | mfavetti | Resolution | open => duplicate |
2023-10-20 22:09 | mfavetti | Note Added: 77820 |