View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
03307 | Bug reports | Survey taking | public | 2009-06-09 02:22 | 2010-09-11 03:31 |
Reporter | Assigned To | c_schmitz | |||
Priority | normal | Severity | partial_block | ||
Status | closed | Resolution | no change required | ||
Product Version | 1.82+ | ||||
Summary | 03307: Quotas set for array question types do not work if two entries exist on the same question | ||||
Description | If you have an array question (Type A or B), and you wish to add quotas on certain values of the answers of that question, if two entries are made on the same answer, which is possible and seems like it should be, the quota does not work. For example, if I have an answer 'Pie' on a 10-point question, and I set my quota to be activated when 'Pie' is 9 or 10, it actually attempts to check that 'Pie' is both 9 and 10, which is impossible, and so the quota is never triggered. Attached is a survey file that will trigger this error. Try to get the second quota to increment, by activating the survey and running it, and answering 'Family Guy' and ranking 'Computer Science' as a 4 or a 5. | ||||
Additional Information | In common.php, under the function getQuotaInformation() can only for each entry in the quota_members table return one field entry. However, in index.php, the function check_quota, which is used to get information on and enforce quotas, attempts to handle this case by assuming that getQuotaInformation() returns multiple fields for array type questions where two quotas have been set on the same answer. However, as mentioned above, getQuotaInformation() does not do this, and so check_quota will fail due to that fact. Also, what appears to be a todo comment is written right above this attempt to handle the case, although it does not mention an issue. I am unsure as to how I would go about fixing it, but if I was a developer I would push for the quota_members table to contain the current value of the quota, which would save a lot of database querying involved in checking it. Alternatively, the quota code for these types of questions could be altered to support lt, gt, and eq so that this never becomes an issue. Fixing these two methods would prove difficult as-is given how the response table looks. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 8 | ||||
Complete LimeSurvey version number (& build) | |||||
I will donate to the project if issue is resolved | |||||
Browser | |||||
Database type & version | MySQL version 5.0.67-community | ||||
Server OS (if known) | Unix | ||||
Webserver software & version (if known) | Apache version 2.2.11 | ||||
PHP Version | PHP version 5.2.8 | ||||
@ SpencerPolk: I'm not sure, but there were some fixes for quotas from v1.82 to v1.85RC3 - perhaps this issue was fixed - can you give it a try? @ jasebo: is this a supported scenario? |
|
I'm not sure why the uploaded file doesn't seem to have any quotas configured, since when I downloaded and looked at it it did, but I'm uploading it again in case. I will try the latest version to see if that resolves the issue. |
|
I have installed Limesurvey 1.85R3 on my server and I was able to replicate the bug. I will add the survey that I replicated it with to this report. |
|
I think maybe there's another bug with importing quotas.. but I'll leave that for the moment :-) |
|
I'm going to work on this bug on the basis that this particular quota should be treated like: If there are 10 answers with either 4 or 5 as the answer, the quota gets triggered. That'll be using "OR" as the boolean logic for multiple answers within a question. This is all retrofitting, and I think in LS2 we should should treat quotas as just another option/action for conditions. |
|
Hi Jason, |
|
Updated the documentation accordingly that multiple quota-members on the same question/subquestion are always 'AND' connected and so never come true. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2009-06-09 02:22 |
|
New Issue | |
2009-06-09 02:22 |
|
Status | new => assigned |
2009-06-09 02:22 |
|
Assigned To | => user372 |
2009-06-09 02:22 |
|
File Added: Quota bug 2 survey.csv | |
2009-06-09 02:22 |
|
Database & DB-Version | => MySQL version 5.0.67-community |
2009-06-09 02:22 |
|
Operating System (Server) | => Unix |
2009-06-09 02:22 |
|
Webserver | => Apache version 2.2.11 |
2009-06-09 02:22 |
|
PHP Version | => PHP version 5.2.8 |
2009-06-09 08:01 |
|
Note Added: 08347 | |
2009-06-09 08:01 |
|
Assigned To | user372 => jcleeland |
2009-06-09 08:03 |
|
Note Edited: 08347 | |
2009-06-09 08:03 |
|
Status | assigned => feedback |
2009-06-09 08:14 |
|
Note Edited: 08347 | |
2009-06-09 08:24 | jcleeland | Status | feedback => acknowledged |
2009-06-09 08:29 | jcleeland | Status | acknowledged => new |
2009-06-09 18:31 |
|
Note Added: 08362 | |
2009-06-12 17:34 | c_schmitz | Status | new => feedback |
2009-06-12 23:43 |
|
Note Added: 08470 | |
2009-06-12 23:44 |
|
File Added: Quota_bug_185RC3.csv | |
2009-07-21 11:14 | jcleeland | Note Added: 08887 | |
2009-07-21 15:55 | jcleeland | Note Added: 08888 | |
2009-07-21 15:56 | jcleeland | Status | feedback => confirmed |
2010-02-24 11:35 | c_schmitz | Sticky Issue | No => Yes |
2010-02-24 11:36 | c_schmitz | Sticky Issue | Yes => No |
2010-03-10 21:59 | c_schmitz | Note Added: 11298 | |
2010-09-11 03:31 | c_schmitz | Note Added: 12829 | |
2010-09-11 03:31 | c_schmitz | Status | confirmed => closed |
2010-09-11 03:31 | c_schmitz | Assigned To | jcleeland => c_schmitz |
2010-09-11 03:31 | c_schmitz | Resolution | open => no change required |
2010-10-25 00:18 | c_schmitz | Category | Survey at Runtime => Survey taking |