View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
06931 | Bug reports | Statistics | public | 2012-11-22 12:43 | 2012-12-04 13:16 |
Reporter | pfpDave | Assigned To | c_schmitz | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 2.00+ | ||||
Fixed in Version | 2.00+ | ||||
Summary | 06931: Array questions do not display graphs by default even if set to Yes | ||||
Description | Array questions will not display graphs in statsistics outputs even if the question option is yes and graphs is enabled in statistics. I've managed to trace the issue back to application\helpers\common_helper.php in the function getQuestionAttributeValues() ... the function attempts to get the row from the question table but can't so assumes the question doesn't exist. I'm certain this is because the question is a sub question and the ID being returned is (for example) 3391 where it means question 339 sub question 1. But I'm a little stuck where to go now, here's where the process falls down:
Any help (if not a fix) would be appreciated. | ||||
Tags | No tags attached. | ||||
Bug heat | 4 | ||||
Complete LimeSurvey version number (& build) | 121115 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | IE8 | ||||
Database type & version | SQL Express 2012 | ||||
Server OS (if known) | Server 2008 | ||||
Webserver software & version (if known) | IIS 7 | ||||
PHP Version | 5.4.8 | ||||
I should have added that getQuestionAttributeValues is called by /application/helpers/admin/statistics_helper.php around line 2848: the question id (qqid) is derrived from the full question id ie 997138X18X3391 which is passed into the $rt parameter in the buildOutputList function. I'm wondering if somewhere in the function it should try and determine if the question has a parent and if so, pass the parent id to getQuestionAttributeValues instead? |
|
I believe I have a fix but would appreciate someone checking it, particularly the question types, it seems to work OK for me. Fix follows: change \application\helpers\admin\statistics_helper.php around line 2849 from: $aattr = getQuestionAttributeValues($qqid, substr($rt, 0, 1)); to: |
|
Slight amendment but still not a final fix ... |
|
A much better and hopefully, final fix: change \application\helpers\admin\statistics_helper.php as follows: Add at line 562: $qqid = ""; Line 1541 change from:
to:
Line 2849 change from:
to: |
|
Your final fix will break the output for non-array question types. |
|
They seem to work OK for me? |
|
parentqid will always be the Question ID or Parent Question ID where the question doesn't have children |
|
Carsten, I've been using this fix with statistics on a live and dev surveys and all looks ok to me, I've also tested on the latest build '121121' and all seems OK ... I'm not sure why you think it will break non-array Q types? |
|
Hello pfpDave, you are right, seems to work fine - sorry for the false assumption. |
|
Sounds good, I'll read up on how to do that and will register with Github. Cheers |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=10615 |
|
Thank you! |
|
Fix committed to 2.1 branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=10626 |
|
LimeSurvey 2.0+ build 121204 released. |
|
LimeSurvey: master 0bca7c29 2012-11-30 15:05 Details Diff |
Fixed issue 06931: Array questions do not display graphs by default even if set to Yes - patch by pfpDave |
Affected Issues 06931 |
|
mod - application/helpers/admin/statistics_helper.php | Diff File | ||
LimeSurvey: 2.1 949a083d 2012-11-30 16:55 Details Diff |
Fixed issue 06931: Array questions do not display graphs by default even if set to Yes - patch by pfpDave |
Affected Issues 06931 |
|
mod - application/helpers/admin/statistics_helper.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-11-22 12:43 | pfpDave | New Issue | |
2012-11-22 13:04 | pfpDave | Note Added: 22417 | |
2012-11-22 13:56 | pfpDave | Note Added: 22418 | |
2012-11-22 13:56 | pfpDave | Note Edited: 22418 | |
2012-11-22 13:56 | pfpDave | Note Edited: 22418 | |
2012-11-22 14:17 | pfpDave | Note Added: 22419 | |
2012-11-22 15:08 | pfpDave | Note Added: 22424 | |
2012-11-22 15:16 | c_schmitz | Assigned To | => c_schmitz |
2012-11-22 15:16 | c_schmitz | Status | new => assigned |
2012-11-22 15:20 | c_schmitz | Note Added: 22426 | |
2012-11-22 15:22 | pfpDave | Note Added: 22427 | |
2012-11-22 15:24 | pfpDave | Note Added: 22428 | |
2012-11-26 10:41 | pfpDave | Note Added: 22510 | |
2012-11-30 14:58 | c_schmitz | Note Added: 22739 | |
2012-11-30 15:00 | pfpDave | Note Added: 22740 | |
2012-11-30 15:07 | c_schmitz | Changeset attached | => LimeSurvey master 0bca7c29 |
2012-11-30 15:07 | c_schmitz | Note Added: 22741 | |
2012-11-30 15:07 | c_schmitz | Resolution | open => fixed |
2012-11-30 15:09 | c_schmitz | Note Added: 22742 | |
2012-11-30 15:09 | c_schmitz | Status | assigned => resolved |
2012-11-30 15:09 | c_schmitz | Fixed in Version | => 2.00+ |
2012-11-30 17:02 | c_schmitz | Changeset attached | => LimeSurvey 2.1 949a083d |
2012-11-30 17:02 | c_schmitz | Note Added: 22753 | |
2012-12-04 13:16 | c_schmitz | Note Added: 22858 | |
2012-12-04 13:16 | c_schmitz | Status | resolved => closed |