View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
06157 | Bug reports | Data Entry (non public) | public | 2012-05-31 16:00 | 2012-06-20 14:05 |
Reporter | RBornat | Assigned To | mdekker | ||
Priority | normal | Severity | partial_block | ||
Status | closed | Resolution | fixed | ||
Product Version | 2.00RC2 | ||||
Fixed in Version | 2.00RC3 | ||||
Summary | 06157: random answer order doesn't work with postgresql | ||||
Description | multiple choice question, randomize once, two columns, preview question gives error | ||||
Steps To Reproduce | multiple choice question, randomize once, two columns: question: int a=10; a=b; The new values of a and b: subquestion: other: try preview question. Result is error Error executing query in dbExecuteAssoc:CDbCommand failed to execute the SQL statement: SQLSTATE[42601]: Syntax error: 7 ERROR: non-integer constant in ORDER BY LINE 1: ...t_qid=5 AND scale_id=0 AND language='en' ORDER BY 0.98433262... ^. The SQL statement executed was: SELECT * FROM lime_questions WHERE parent_qid=5 AND scale_id=0 AND language='en' ORDER BY 0.98433262883484 | ||||
Tags | No tags attached. | ||||
Bug heat | 4 | ||||
Complete LimeSurvey version number (& build) | 120510 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | safari | ||||
Database type & version | postgresql 9.1.3 | ||||
Server OS (if known) | OS X Lion | ||||
Webserver software & version (if known) | OS X Lion | ||||
PHP Version | OS X Lion | ||||
In 1.92 db_random returns the random function name to use for the used db-adapter, while in Yii it returns a random number. There seems to be no abstraction-layer present in Yii that could handle this. It seems there already is an exception for mssql / sqlsrv, so I would suggest to implement our own switch here, what db types do we support? |
|
Fix committed to Yii branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=8600 |
|
Fix committed to Yii branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=8602 |
|
Fixed. Thanks for the report! I also removed of the randomization options: Randomize once on survey start as that doesn't work. If you use that in your survey, please set if to something else before upgrading. |
|
2.0RC3 released |
|
LimeSurvey: Yii 15ee7929 2012-06-01 03:18 Details Diff |
Fixed 06157: Random answer order doesn't work with postgresql |
Affected Issues 06157 |
|
mod - application/helpers/database_helper.php | Diff File | ||
LimeSurvey: Yii baabd42d 2012-06-01 03:24 Details Diff |
Fixed 06157: Random answer order doesn't work with postgresql dev: forgot some breaks |
Affected Issues 06157 |
|
mod - application/helpers/database_helper.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-05-31 16:00 | RBornat | New Issue | |
2012-06-01 10:07 | mdekker | Note Added: 19022 | |
2012-06-01 10:07 | mdekker | Assigned To | => c_schmitz |
2012-06-01 10:07 | mdekker | Status | new => feedback |
2012-06-01 10:17 | mdekker | Summary | can't preview question => random answer order doesn't work with postgresql |
2012-06-01 10:22 | mdekker | Assigned To | c_schmitz => mdekker |
2012-06-01 10:22 | mdekker | Status | feedback => assigned |
2012-06-01 10:22 | mdekker | Changeset attached | => LimeSurvey Yii 15ee7929 |
2012-06-01 10:22 | mdekker | Note Added: 19023 | |
2012-06-01 10:22 | mdekker | Resolution | open => fixed |
2012-06-01 10:26 | mdekker | Changeset attached | => LimeSurvey Yii baabd42d |
2012-06-01 10:26 | mdekker | Note Added: 19024 | |
2012-06-01 10:44 | mdekker | Note Added: 19025 | |
2012-06-01 10:44 | mdekker | Status | assigned => resolved |
2012-06-01 10:44 | mdekker | Fixed in Version | => 2.00RC3 |
2012-06-20 14:05 | c_schmitz | Note Added: 19378 | |
2012-06-20 14:05 | c_schmitz | Status | resolved => closed |