models/Survey.phpView Source

Show: PublicProtectedPrivateinherited
Table of Contents
Package
Default  

\Survey

Package: Models
Survey
Access
public  
Author
Alexander  
Copyright
2013  
Version
$Id$  

Properties

>VPropertyprivateobject $db
Db isntance
Details
Type
object
>VPropertyprivatestring $projDbName
Project name in db
Details
Type
string
>VPropertypublicinteger $proj_id
Project id
Details
Type
integer
>VPropertypublicobject $project
Project
Details
Type
object
>VPropertypublicinteger $qs_id
Questionnnaire id
Details
Type
integer
>VPropertypublicobject $sess
Session storage
Details
Type
object
>VPropertypublicinteger $user_id
Interveiever action id
Details
Type
integer

Methods

methodpublicSurvey() : void

methodpublicclearAnswers(object $quest, boolean $substep = false) : void

Delete answers for previous step

Parameters
NameTypeDescription
$questobject
$substepboolean
methodpublicgetAnsInfo(mixed $quest_id, mixed $item,  $sub_id = false) : array

Get answer info

Parameters
NameTypeDescription
$quest_idmixed
$itemmixed
$sub_id
Returns
TypeDescription
array
methodpublicgetAnsText(integer $ans_id) : string

Get answer text

Parameters
NameTypeDescription
$ans_idinteger
Returns
TypeDescription
string
methodpublicgetStoesdAnswers() : array

get stored answers from db, and put in survey structure

Returns
TypeDescription
array
methodpublicgetSurveyLanguage(integer $proj_id, integer $action_id) : Object

Get survey language by project and action

Parameters
NameTypeDescription
$proj_idinteger
$action_idinteger
Returns
TypeDescription
Object
methodpublicpopulateNaAnswer(integer $question_id, array $item, string $textNA = "") : array

Populate na answer with right data

Parameters
NameTypeDescription
$question_idinteger
$itemarray
$textNAstring
Returns
TypeDescription
array
methodpublicsaveAnswers(mixed $answers) : mixed

Store answers data to db

Parameters
NameTypeDescription
$answersmixed
Returns
TypeDescription
mixed
methodpublictotalAnsNum(integer $q_pos, integer $a_pos) : integer

Get total answers number by quation positon

Parameters
NameTypeDescription
$q_posinteger
$a_posinteger
Returns
TypeDescription
integer
methodpublicupdateUserActions(Array $data) : void

Update user surve action with new data

Parameters
NameTypeDescription
$dataArray
Documentation was generated by phpDocumentor 2.8.5.