Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

can i show subquestion text in simple stats? Or preselect expert stats options?

  • mikebb
  • mikebb's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 7 months ago - 5 years 7 months ago #172283 by mikebb
I'm new to limesurvey and struggling with 'one-click' statistics/summaries for our users.

1. Simple statistics repeats the Question title for each subquestion graph, but does not show the subquestion title. So its unclear which subquestion the graphs relate to. see the first screenshot below where each question has two subquestions - Q1 is array (5 point) and Q2 is array (with three answer options). So...
- Is there a way to show subquestion titles? or is this a bug (i would have thought they would always show).

2. Subquestion titles show in 'expert mode (second screenshot), but even then I can't get the graphs to show without the table data summaries. So...
- Can I show graphs without data tables?
- and is there a way to pre-select the expert stats shown so the user does not have to set the data selection and output options

I'm using LS 3.14.3+180809 - same behaviour on fresh installations on (a) debian 8 (php 5.6.8) and (b) xammp (windows, php 7.2)

Thanks for your help on this!

*** Simple stats screenshot:



*** Expert stats screenshot:

Last edit: 5 years 7 months ago by mikebb. Reason: typos
The topic has been locked.
  • mikebb
  • mikebb's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 7 months ago #172286 by mikebb
I may have solved my own problem in a hacky kind of way...

I think the problem is in ‘simple statistics’ the subquestion graph heading show the parent question’s text when questions are arrays (eg type=’F’ in statistics_helper.php) even when subquestions have their own texts. So all the subquestion graphs will show the same (parent) heading – and the user can’t easily tell which subquestion they are for.
Also if an array sub-question’s parent does not any text then there is no title to any of those sub-quesiton graphs – so no indication of what they were for. Eek!

My solution is to hack the following row into statistics_helper.php:
Code:
/* AT LINE 1165 - before switch ($qtype) statement: */
$parent_title = $qtitle;
// ....
/* AT LINE 1459 - before return of buildOutputList()*/
if (in_array($qtype, ['A','C','F' ] )){ // for these question types - show parent and subquestion text 
  $qquestion = rtrim($qquestion, $linefeed);// trim the linefeed that's been added
  $qquestion .= ((trim($qquestion==''))? ucfirst($parent_title) : null) . ": " .$atext . $linefeed; 
}
 

For the selected question types, it now shows the parent question text followed by the subquesiton text. If there is no parent question text (ie if its blank) then it shows the parent question’s title. screenshot below.

I’ve associated this with types A,C,F - it may help with other multiple sub-quesiton types but I haven’t used any others yet so aren’t clear how they behave.

I wonder if something like this could be added to limesurvey – it would make simple statistics much more useful with sub-questions. And you will probably do a cleaner job than my hack and know what else this may break!

Cheers
Mike
The topic has been locked.
More
5 years 7 months ago #172289 by jelo
Feel free to open a feature request or bug report via the bug tracker. If you are used to GIT you can submit a pullrequest via github.com/LimeSurvey/LimeSurvey

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • mikebb
  • mikebb's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 7 months ago #172295 by mikebb
OK - I've raised a feature request here: bugs.limesurvey.org/view.php?id=13955
(tho am wondering if the simple stats code was ever finished...)
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose