View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|04792||User patches||Statistics||public||2010-12-05 17:31||2012-06-21 14:17|
|Summary||04792: Add some additional functions to the user statistics display|
This link points to the forum thread where Mazi suggested I open this ticket.
Add a few items to the user statistics display:
|Steps To Reproduce|
The attached file has three modules that accomplist the above ites.
Item 1 is accomplished by including module; public_statistics_user.php
These three changes are independant on one another and do not require the others to function.
Items 1 and 2 are very minor, and require nearly no coding involvement other than proper module notations for Item 1's module.
Item three requires a minimal amount of code change but has some specific effects I will document in "additional Information".
|Tags||No tags attached.|
|Complete LimeSurvey version number (& build)||9561|
statistics_user.zip (31,716 bytes)
I thought I could add additional information after submitting but I guess I need to add it as additional notes now.
Item 1 is a stand along module solution and it uses the survey template to display the available surveys that are marked as public. It is placed in the root directory of the limesurvey application and the url is either given in the survey end page or in any way the author chooses to display this menu.
Item 2 is a very simple modification that puts the current date and time in the header of the user statistics display.
Item 3 is more complicated, and it actuall has 4 switches in it. One I forgot to mention in the original submition of this tickey.
Item 4 accomplishes the following:
Here are those four switches:
//TLR Special switches to control output
It should be noted that these affect all statistics displays as I have implemented these changes. A better solution would be to move these switches from this module and make them global in the survey display menues during survey author time.
I also only implemented these changes for the HTML displays and not the PDF or XMP outputs of the statistics.
The most useful of these changes is the item that suppresses blank answers.
Think of aa profile question that asks what country you are in and uses a dropdown box with some 300 countries listed. Usually only a few countries will be used, but in the display you will see all 300 countries with most showing zero. By supressing these answers from the display you now only see those answers that have a non zero answer. Makes for a much smaller statistics display and much more readable.
Some other things that could be addressed is the failure for correct percentages on some question types.
In the old phpsurvey I had these solved, but with so many changes to the statistics code those errors were abandon and I just leave them in the current displays.
The errors result because the formula always uses the "possible" numbers of answers, and the "actual" numbers of answers.
This gets further complicated when conditions or wuestion types allow people to give answers that do not agree with the total numbers of survey takers.
An answer should reflect the percentage of the total number of those answers given, not the percentage of the number of survey takers. In multiple choice answers the numbers of total answers can easily exceed the number of total people taking the survey.
I only mention this here because when you remove the zero answers, this error becomes more obvious. It is a total seporate issue, and not related to these changes at all.
I forgot to mention that in the 2 replacement modules all the code I have added is notated with the following comment lines:
or a comment as:
// TLR to the line added.
Mazi also asked me to comment on my abilities like I did in the forum so here is that exerpt.
Unfortunatly, I do not know how to use svn, so that way isn't really a viable way for me.
A year or so ago a couple of the limesurvey developers requested a link to view this statistics display in production. I sent them a link as well as the code.
In the two modules that replace existing modules the new code is bracketed with the comment lines containing " // TLR " so it is fairly easy to see what was changed.
If I was a developer, and knew how to use tools like svn, I would be happy to use the existing process.
Unfortunatly, I am just a hacker, who will play with existing code to twist it around to work like I want it to.
Maybe someone who is a limesurvey user who knows svn might take this mod and do as you suggest. I have no ego involved so they could claim it as their own if that made it worth their effort.
I am sorry but in their current state we cannot accept any of these patches.
|2010-12-05 17:31||tringate||New Issue|
|2010-12-05 17:33||tringate||File Added: statistics_user.zip|
|2010-12-05 17:53||tringate||Note Added: 13693|
|2010-12-05 18:00||tringate||Note Added: 13694|
|2010-12-05 18:05||tringate||Note Added: 13695|
|2010-12-05 19:03||c_schmitz||Project||Bug reports => User patches|
|2010-12-11 13:36||c_schmitz||Note Added: 13755|
|2010-12-11 13:36||c_schmitz||Assigned To||=> c_schmitz|
|2010-12-11 13:36||c_schmitz||Status||new => confirmed|
|2012-06-21 14:17||c_schmitz||Assigned To||c_schmitz =>|