View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 04776 | Bug reports | Survey taking | public | 2010-12-02 15:33 | 2010-12-04 01:30 |
| Reporter | Assigned To | c_schmitz | |||
| Priority | normal | Severity | partial_block | ||
| Status | closed | Resolution | fixed | ||
| Product Version | 1.90+ | ||||
| Summary | 04776: Question appearing in random order in group-by-group mode | ||||
| Description | Simply create a new survey, with the default options, with the following structure: group 1: q1 q2 q3 q4 The questions appear in random order (differing at every "preview"), including swapping questions between pages. Is that expected? | ||||
| Tags | No tags attached. | ||||
| Attached Files | svn-patch.diff (865 bytes)
Index: index.php
===================================================================
--- index.php (revision 9572)
+++ index.php (working copy)
@@ -2665,7 +2665,7 @@
// Find all defined randomization groups through question attribute values
$randomGroups=array();
- $rgquery = "SELECT attr.qid,value FROM ".db_table_name('question_attributes')." as attr right join ".db_table_name('questions')." as quests on attr.qid=quests.qid WHERE attribute='random_group' and sid=$surveyid GROUP BY attr.qid";
+ $rgquery = "SELECT attr.qid,value FROM ".db_table_name('question_attributes')." as attr right join ".db_table_name('questions')." as quests on attr.qid=quests.qid WHERE attribute='random_group' and value <> '' and sid=$surveyid GROUP BY attr.qid";
$rgresult = db_execute_assoc($rgquery);
while($rgrow = $rgresult->FetchRow())
{
| ||||
| Bug heat | 4 | ||||
| Complete LimeSurvey version number (& build) | 9572 | ||||
| I will donate to the project if issue is resolved | No | ||||
| Browser | |||||
| Database type & version | - | ||||
| Server OS (if known) | - | ||||
| Webserver software & version (if known) | - | ||||
| PHP Version | - | ||||
|
After further investigation, it seems that an empty 'random_group' attribute is still counted as a valid group, meaning that all questions with an empty 'random_group' are scrambled. It is my understanding that an empty random_group is no group. |
|
|
Thank you! |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2010-12-02 15:33 |
|
New Issue | |
| 2010-12-02 15:54 |
|
File Added: svn-patch.diff | |
| 2010-12-02 15:58 |
|
Note Added: 13678 | |
| 2010-12-04 01:30 | c_schmitz | Note Added: 13684 | |
| 2010-12-04 01:30 | c_schmitz | Status | new => closed |
| 2010-12-04 01:30 | c_schmitz | Assigned To | => c_schmitz |
| 2010-12-04 01:30 | c_schmitz | Resolution | open => fixed |