View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
06149 | Bug reports | Expression Manager | public | 2012-05-30 10:44 | 2012-06-07 11:02 |
Reporter | Mazi | Assigned To | TMSWhite | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 1.92+ | ||||
Target Version | 1.92+ | Fixed in Version | 1.92+ | ||
Summary | 06149: EM shows wrong result for number generated by rand() function | ||||
Description | If I use an equation question type which generates a random number (1 or 2) if a previous question was answered X, then the generated number looks weird if the equation question is on the same page (see attached screenshot): 0.2648744165 If I switch the survey to question by question mode, the generated number is shown correctly as 1 or 2. | ||||
Steps To Reproduce |
| ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Bug heat | 6 | ||||
Complete LimeSurvey version number (& build) | 120530 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | Firefox 12 | ||||
Database type & version | MySQL 5 | ||||
Server OS (if known) | Win 7 | ||||
Webserver software & version (if known) | Apache 2.2 | ||||
PHP Version | 5.3.1 | ||||
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=8584 |
|
Fix committed to Yii branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=8585 |
|
New 1.91+ build released. |
|
LimeSurvey: master f8caaa18 2012-05-30 23:53 Details Diff |
Fixed issue 06149: EM shows wrong result for number generated by rand() function Dev was using the JavaScript Math.random() function instead of the phpjs.org rand() function |
Affected Issues 06149 |
|
mod - classes/expressions/ExpressionManager.php | Diff File | ||
mod - scripts/em_javascript.js | Diff File | ||
LimeSurvey: Yii 4ba0df1b 2012-05-30 23:56 Details Diff |
Fixed issue 06149: EM shows wrong result for number generated by rand() function Dev was using the JavaScript Math.random() function instead of the phpjs.org rand() function |
Affected Issues 06149 |
|
mod - application/helpers/expressions/em_core_helper.php | Diff File | ||
mod - scripts/expressions/em_javascript.js | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-05-30 10:44 | Mazi | New Issue | |
2012-05-30 10:44 | Mazi | Status | new => assigned |
2012-05-30 10:44 | Mazi | Assigned To | => c_schmitz |
2012-05-30 10:44 | Mazi | File Added: limesurvey_survey_95145-EM_rand_test.lss | |
2012-05-30 10:45 | Mazi | Issue Monitored: TMSWhite | |
2012-05-30 10:47 | Mazi | File Added: rand_equation.png | |
2012-05-31 06:54 | TMSWhite | Changeset attached | => LimeSurvey master f8caaa18 |
2012-05-31 06:54 | TMSWhite | Note Added: 19011 | |
2012-05-31 06:54 | TMSWhite | Assigned To | c_schmitz => TMSWhite |
2012-05-31 06:54 | TMSWhite | Resolution | open => fixed |
2012-05-31 06:57 | TMSWhite | Changeset attached | => LimeSurvey Yii 4ba0df1b |
2012-05-31 06:57 | TMSWhite | Note Added: 19012 | |
2012-05-31 06:58 | TMSWhite | Status | assigned => resolved |
2012-05-31 06:58 | TMSWhite | Fixed in Version | => 1.92+ |
2012-06-07 11:02 | c_schmitz | Note Added: 19105 | |
2012-06-07 11:02 | c_schmitz | Status | resolved => closed |
2021-08-07 02:53 | guest | Bug heat | 4 => 6 |