LimeSurvey API - Master branch

statistics_helper.php

Table of Contents

Classes

statistics_helper

Functions

createChart()  : mixed
Generate a chart for a question
getQuestionMapData()  : array<string|int, mixed>
Return data to populate a Google Map
buildSelects()  : mixed
Builds the list of addon SQL select statements that builds the query result set
square()  : mixed
Simple function to square a value
getEncryptedCondition()  : mixed

Functions

createChart()

Generate a chart for a question

createChart(mixed $iQuestionID, int $iSurveyID, mixed $type, mixed $lbl, mixed $gdata, mixed $grawdata, mixed $cache, mixed $sLanguageCode, mixed $sQuestionType) : mixed

@param int $iQuestionID ID of the question

Parameters
$iQuestionID : mixed
$iSurveyID : int

ID of the survey @param mixed $type Type of the chart to be created - null produces bar chart, any other value produces pie chart @param array $lbl An array containing the labels for the chart items @param mixed $gdata An array containing the percentages for the chart items @param mixed $grawdata An array containing the raw count for the chart items @param pCache $cache An object containing [Hashkey] and [CacheFolder] @param mixed $sLanguageCode Language Code @param string $sQuestionType The question type @return false|string

$type : mixed
$lbl : mixed
$gdata : mixed
$grawdata : mixed
$cache : mixed
$sLanguageCode : mixed
$sQuestionType : mixed

getQuestionMapData()

Return data to populate a Google Map

getQuestionMapData(string $sField,  $qsid) : array<string|int, mixed>
Parameters
$sField : string
$qsid :

Survey id

Return values
array<string|int, mixed>

buildSelects()

Builds the list of addon SQL select statements that builds the query result set

buildSelects(mixed $allfields, int $surveyid, mixed $language) : mixed

@param array $allfields An array containing the names of the fields/answers we want to display in the statistics summary

Parameters
$allfields : mixed
$surveyid : int

@param string $language The language to use

@return array $selects array of individual select statements that can be added/appended to the 'where' portion of a SQL statement to restrict the result set ie: array("FIELDNAME='Y'", "FIELDNAME2='Hello'");

$language : mixed

square()

Simple function to square a value

square(mixed $number) : mixed
Parameters
$number : mixed

Value to square

getEncryptedCondition()

getEncryptedCondition(mixed $responseModel, mixed $attribute, mixed $value) : mixed
Parameters
$responseModel : mixed
$attribute : mixed
$value : mixed

        
On this page

Search results