SurveyDao

package

Default

Methods

Loads a survey from the database that has the given ID. If no matching survey is found then null is returned. Note that no results are loaded from this function call, only survey structure/definition.

loadSurveyById(integer $id, $lang = null,\FormattingOptions $oOptions = null): \SurveyObj

In the future it would be nice to load all languages from the db at once and have the infrastructure be able to return responses based on language codes.

Arguments

$id

integer

$lang

$oOptions

\FormattingOptions

Response

\SurveyObj

Loads results for the survey into the $survey->responses array. The results begin from $minRecord and end with $maxRecord. Either none, or both, the $minRecord and $maxRecord variables must be provided.

loadSurveyResults(\SurveyObj $survey,integer $iMinimum,integer $iMaximum,string $sFilter = '',string $completionState = 'all',array $aFields = array(),string $sResponsesId = null): \CDbCommand

If none are then all responses are loaded.

Arguments

$survey

\SurveyObj

$iMinimum

integer

$iMaximum

integer

$sFilter

string

An optional filter for the results, i string or arry of string

$completionState

string

all, complete or incomplete

$aFields

array

If empty all, otherwise only select the selected fields from the survey response table

$sResponsesId

string

Response

\CDbCommand