Survey

Extends\LSActiveRecord Implements\PermissionInterface

Class Survey

package

Default

Methods

active

active(): mixed

Response

mixed

afterFindSurvey to fix and/or add some survey attribute - event afterFindSurvey (for all attributes) - Fix template name to be sure template exist - setOptions for inherited value

afterFindSurvey()

attributeLabels

attributeLabels()
inheritdoc

Lists the behaviors of this model

behaviors(): array
inherited

Below is a list of all behaviors we register:

see \PluginEventBehavior\CTimestampBehavior

Response

array

Method to make an approximation on how long a survey will last

calculateEstimatedTime(): double
deprecated

, unused since 3.X Approx is 3 questions each minute.

Response

double

Validates the Expiration Date is not lower than the Start Date

checkExpireAfterStart( $attributes, $params)

Arguments

$attributes

$params

Decrypt values from database

decrypt( $value = '')
inherited

Arguments

$value

Encrypt/decrypt values

decryptEncryptAttributes( $action = 'decrypt')
inherited

Arguments

$action

Decrypt single value

decryptSingle(string $value = ''): string
inheritedstatic

Arguments

$value

string

String value which needs to be decrypted

Response

string

the decrypted string

Decrypt single value

decryptSingleOld(string $value = ''): string
inheritedstatic

Arguments

$value

string

String value which needs to be decrypted

Response

string

the decrypted string

delete

delete(boolean $recursive = true)
inheritdoc

With allow to delete all related models and data and test Permission.

Arguments

$recursive

boolean

deleteAllByAttributes

deleteAllByAttributes(array $attributes,string $condition = '',array $params = array()): integer
inherited
todo

This should also be moved to the behavior at some point. This method overrides the parent in order to raise PluginEvents for Bulk delete operations.

Filter Criteria are wrapped into a CDBCriteria instance so we have a single instance responsible for holding the filter criteria to be passed to the PluginEvent, this also enables us to pass the fully configured CDBCriteria instead of the original Parameters.

See {@link find()} for detailed explanation about $condition and $params.

Arguments

$attributes

array

list of attribute values (indexed by attribute names) that the active records should match. An attribute value can be an array which will be used to generate an IN condition.

$condition

string

query condition or criteria.

$params

array

parameters to be bound to an SQL statement.

Response

integer

number of rows affected by the execution.

Deletes a survey and all its data

deleteSurvey(integer $iSurveyID,boolean $recursive = true): boolean
access

public

Arguments

$iSurveyID

integer

$recursive

boolean

Response

boolean

dispatchPluginModelEvent

dispatchPluginModelEvent(string $sEventName,\CDbCriteria $criteria = null,array $eventParams = []): \PluginEvent
inherited

Arguments

$sEventName

string

$criteria

\CDbCriteria

$eventParams

array

Response

\PluginEvent

Encrypt values

encrypt()
inherited

Attribute values are encrypted ( if needed )to be used for searching purposes

encryptAttributeValues(array $attributes = null, $bEncryptedOnly = false, $bReplaceValues = true): array
inherited

Arguments

$attributes

array

list of attribute values (indexed by attribute names) that the active records should match. An attribute value can be an array which will be used to generate an IN condition.

$bEncryptedOnly

$bReplaceValues

Response

array

attributes array with encrypted atrribute values is returned

Encrypt values before saving to the database

encryptSave( $runValidation = false)
inherited

Arguments

$runValidation

Enrypt single value

encryptSingle(string $value = '')
inheritedstatic

Arguments

$value

string

String value which needs to be encrypted

Expires a survey. If the object was invoked using find or new surveyId can be ommited.

expire(integer $surveyId = null): boolean|null

Arguments

$surveyId

integer

Survey ID

Response

boolean|null

filterTemplateSave to fix some template name

filterTemplateSave(string $sTemplateName): string

Arguments

$sTemplateName

string

Response

string

Finds all active records satisfying the specified condition but returns them as array

findAllAsArray(mixed $condition = '',array $params = array()): array
inherited

See \find() for detailed explanation about $condition and $params.

Arguments

$condition

mixed

query condition or criteria.

$params

array

parameters to be bound to an SQL statement.

Response

array

list of active records satisfying the specified condition. An empty array is returned if none is found.

Overriding of Yii's findAllByAttributes method to provide encrypted attribute value search

findAllByAttributes(array $attributes,mixed $condition = '',array $params = array()): array<mixed,static>
inherited

Arguments

$attributes

array

list of attribute values (indexed by attribute names) that the active records should match. An attribute value can be an array which will be used to generate an IN condition.

$condition

mixed

query condition or criteria.

$params

array

parameters to be bound to an SQL statement.

Response

array<mixed,static>

the records found. An empty array is returned if none is found.

findAllPublic

findAllPublic()

Overriding of Yii's findByAttributes method to provide encrypted attribute value search

findByAttributes(array $attributes,mixed $condition = '',array $params = array()): static|null
inherited

Arguments

$attributes

array

list of attribute values (indexed by attribute names) that the active record should match. An attribute value can be an array which will be used to generate an IN condition.

$condition

mixed

query condition or criteria.

$params

array

parameters to be bound to an SQL statement.

Response

static|null

the record found. Null if none is found.

findByPk

findByPk( $pk, $condition = '', $params = array())
inheritdoc

. But use a static var because can be used a lot of time.

Arguments

$pk

$condition

$params

findQuestionByType

findQuestionByType(string $type,boolean $includeSubquestions = false): \Question

Arguments

$type

string

Question->type

$includeSubquestions

boolean

Response

\Question

Fix invalid question in this survey Delete question that don't exist in primary language

fixInvalidQuestions()

getActiveWord

getActiveWord(): string

Response

string

Returns additional languages formatted into a string

getAdditionalLanguages(): array
access

public

Response

array

Returns the survey alias for the specified language.

getAliasForLanguage(string|null $language = null): string|null

Arguments

$language

string|null

Response

string|null

getAllEncryptedAttributes

getAllEncryptedAttributes(integer $iSurveyId,string $sClassName): array
inherited

Arguments

$iSurveyId

integer

$sClassName

string

Response

array

TODO: Should be split into seperate functions in the appropiate model or helper class TODO: Make an interface for records that support encryption.

Returns all languages array

getAllLanguages(): array
access

public

Response

array

getAllQuestions

getAllQuestions(): array<mixed,\Question>

Response

array<mixed,\Question>

getAnonymizedResponses

getAnonymizedResponses(): string

Response

string

getBaseQuestions

getBaseQuestions(): array<mixed,\Question>

Response

array<mixed,\Question>

Returns buttons for gridview.

getbuttons(): string

Response

string

getCountFullAnswers

getCountFullAnswers(): integer|string

Response

integer|string

Get the coutn of questions that need input (skipping text-display etc.)

getCountInputQuestions(): integer

Response

integer

Get the coutn of questions that do not need input (skipping text-display etc.)

getCountNoInputQuestions(): integer

Response

integer

getCountPartialAnswers

getCountPartialAnswers(): integer

Response

integer

getCountTotalAnswers

getCountTotalAnswers(): integer

Response

integer

getCountTotalQuestions

getCountTotalQuestions(): integer

Response

integer

This function returns any valid mappings from the survey participants tables to the CPDB in the form of an array [<cpdb_attribute_id>=><participant_table_attribute_name>]

getCPDBMappings(): array

Response

array

Array of mappings

getCreationDate

getCreationDate(): string

Response

string

formatted date

The Survey languagesettings in currently active language. Falls back to the surveys' default language if the current language is not available.

getCurrentLanguageSettings(): \SurveyLanguageSetting

getDateFormatted

getDateFormatted(string $attribute): string

Arguments

$attribute

string

date attribute name

Response

string

formatted date

decodes the attributedescriptions to be used anywhere necessary

getDecodedAttributedescriptions(): Array

Response

Array

getExpiryDateFormatted

getExpiryDateFormatted(): string

Response

string

formatted date

getFullAnswers

getFullAnswers(): array|null

Response

array|null

Returns the value for the SurveyEdit GoogleAnalytics API-Key UseGlobal Setting

getGoogleanalyticsapikey(): string

Response

string

Returns the value for the SurveyEdit GoogleAnalytics API-Key UseGlobal Setting

getGoogleanalyticsapikeysetting(): string

Response

string

Gets number of groups inside a particular survey

getGroupsCount()

Wheteher the survey responses (data) table exists in DB

getHasResponsesTable(): boolean

Response

boolean

Wheteher the survey responses timings exists in DB

getHasTimingsTable(): boolean

Response

boolean

Returns true in a survey participants table exists for survey

getHasTokensTable(): boolean

Response

boolean

getIsActive

getIsActive(): boolean

Response

boolean

getIsAllowEditAfterCompletion

getIsAllowEditAfterCompletion(): boolean

Response

boolean

getIsAllowPrev

getIsAllowPrev(): boolean

Response

boolean

getIsAllowRegister

getIsAllowRegister(): boolean

Response

boolean

getIsAllowSave

getIsAllowSave(): boolean

Response

boolean

getIsAnonymized

getIsAnonymized(): boolean

Response

boolean

getIsAssessments

getIsAssessments(): boolean

Response

boolean

getIsAutoRedirect

getIsAutoRedirect(): boolean

Response

boolean

getIsDateExpired

getIsDateExpired(): boolean
Throws
\Exception

Response

boolean

getIsDateStamp

getIsDateStamp(): boolean

Response

boolean

getIsHtmlEmail

getIsHtmlEmail(): boolean

Response

boolean

getIsIpAddr

getIsIpAddr(): boolean

Response

boolean

getIsIpAnonymize

getIsIpAnonymize(): boolean

Response

boolean

getIsListPublic

getIsListPublic(): boolean

Response

boolean

getIsNoKeyboard

getIsNoKeyboard(): boolean

Response

boolean

getIsPrintAnswers

getIsPrintAnswers(): boolean

Response

boolean

getIsPublicGraphs

getIsPublicGraphs(): boolean

Response

boolean

getIsPublicStatistics

getIsPublicStatistics(): boolean

Response

boolean

getIsRefUrl

getIsRefUrl(): boolean

Response

boolean

getIsSaveTimings

getIsSaveTimings(): boolean

Response

boolean

getIsSendConfirmation

getIsSendConfirmation(): boolean

Response

boolean

getIsShowGroupInfo

getIsShowGroupInfo(): boolean

Response

boolean

getIsShowNoAnswer

getIsShowNoAnswer(): boolean

Response

boolean

getIsShowProgress

getIsShowProgress(): boolean

Response

boolean

getIsShowQnumCode

getIsShowQnumCode(): boolean

Response

boolean

getIsShowWelcome

getIsShowWelcome(): boolean

Response

boolean

getIsShowXQuestions

getIsShowXQuestions(): boolean

Response

boolean

getIsTokenAnswersPersistence

getIsTokenAnswersPersistence(): boolean

Response

boolean

getIsUseCookie

getIsUseCookie(): boolean

Response

boolean

Return the language of the current survey It can be: - the selected language by user via the language selector (POST then Session) - the selected language via URL (GET then Session) - the survey default language

getLanguageForSurveyTaking(): string

Response

string

the correct language

Returns the title of the survey. Uses the current language and falls back to the surveys' default language if the current language is not available.

getLocalizedTitle()

Return the max value for a field

getMaxId(string $field = null,boolean $forceRefresh = false): false|integer
inherited

This is a convenience method, that uses the primary key of the model to retrieve the highest value.

Throws
\Exception

Arguments

$field

string

The field that contains the Id, when null primary key is used if it is a single field

$forceRefresh

boolean

Don't use value from static cache but always requery the database

Response

false|integer

Return the min value for a field

getMinId(string $field = null,boolean $forceRefresh = false): false|integer
inherited

This is a convenience method, that uses the primary key of the model to retrieve the highest value.

Throws
\Exception

Arguments

$field

string

The field that contains the Id, when null primary key is used if it is a single field

$forceRefresh

boolean

Don't use value from static cache but always requery the database

Response

false|integer

Get minimal permission name (for read value)

getMinimalPermissionRead(): null|string
inheritedstatic

Response

null|string

Get the owner id of this record Used for Permission, to be extendable for each model with owner

getOwnerId(): integer|null
inherited

Response

integer|null

getOwnerUserName

getOwnerUserName(): string

Response

string

getPartialAnswers

getPartialAnswers(): array|null

Response

array|null

Get criteria from Permission

getPermissionCriteria( $userid = null): \CDbCriteria
static
todo

: move to PermissionInterface

: create an event

Arguments

$userid

for thius user id , if not set : get current one

Response

\CDbCriteria

Get Permission data for Permission object

getPermissionData(): array
inheritedstatic

Response

array

Get the DB criteria to get questions as ordered in survey

getQuestionOrderCriteria(): \CDbCriteria

Response

\CDbCriteria

getQuotableQuestions

getQuotableQuestions(): array<mixed,\Question>

Response

array<mixed,\Question>

Return the name of survey responses (the data) table name

getResponsesTableName(): string

Response

string

getRunning

getRunning(): string
todo

Document code, please.

Response

string

TODO: Not used anywhere. Deprecate it?

getsSurveyUrl()

getStartDateFormatted

getStartDateFormatted(): string

Response

string

formatted date

Get state of survey, which can be one of five: 1. Not active 2. Expired 3. Will expire in the future (running now) 3. Will run in future 4. Running now (no expiration date)

getState(): string

Code copied from getRunning below.

Response

string

  • 'inactive', 'expired', 'willRun', 'willExpire' or 'running'

Get surveymenu configuration from table surveymenu and prepares

getSurveyMenus(string $position = ''): array
todo

this function can go directly into Surveymenu, why implemted it here? ($this is used here ...) This will be made bigger in future releases, but right now it only collects the default menu-entries

Arguments

$position

string

Position

Response

array

getSurveyQuestionsCriteria

getSurveyQuestionsCriteria()

Get all surveys that has participant table

getSurveysWithTokenTable(): array<mixed,\Survey>
static

Response

array<mixed,\Survey>

Returns Survey Template Configuration.

getSurveyTemplateConfiguration(): \TemplateConfiguration

Response

\TemplateConfiguration

Returns the survey URL with the specified params.

getSurveyUrl(string|null $language = null,\array<string,mixed> $params = array(),boolean $preferShortUrl = true): string

If $preferShortUrl is true (default), and an alias is available, it returns the short version of the URL.

Arguments

$language

string|null

$params

\array

Optional parameters to include in the URL.

$preferShortUrl

boolean

If true, tries to return the short URL instead of the traditional one.

Response

string

Returns the name of the template to be used for the survey.

getTemplateEffectiveName(): string

It resolves inheritance from group and from default settings.

todo

: Cache this on a private attribute?

Response

string

Return the name of survey timigs table

getTimingsTableName(): string

Response

string

Returns the additional token attributes

getTokenAttributes(): array
access

public

Response

array

decodes the tokenencryptionoptions to be used anywhere necessary

getTokenEncryptionOptions(): Array

Response

Array

Return the name of survey tokens table

getTokensTableName(): string

Response

string

Get the permission of current model

hasPermission(string $sPermission,string $sCRUD = 'read',integer $iUserID = null): boolean
inherited

Arguments

$sPermission

string

Name of the permission

$sCRUD

string

The permission detail you want to check on: 'create','read','update','delete','import' or 'export'

$iUserID

integer

User ID - if not given the one of the current user is used

Response

boolean

Returns true if this survey has any question of type $type.

hasQuestionType(string $type,boolean $includeSubquestions = false): boolean
Throws
\CException

Arguments

$type

string

Question type, like 'L', 'T', etc.

$includeSubquestions

boolean

If true, will also check the types of subquestions.

Response

boolean

Set defaults

init()
inheritdoc

Creates a new survey - with a random sid

insertNewSurvey(array $aData): \Survey

Arguments

$aData

array

Array with fieldname=>fieldcontents data

Response

\Survey

model

model( $className = __CLASS__): \Survey
static
inheritdoc

Arguments

$className

Response

\Survey

permission scope for this model Actually only test if user have minimal access to survey (read)

permission(integer $loginID): \CActiveRecord
see \issue

https://bugs.limesurvey.org/view.php?id=16799

access

public

Arguments

$loginID

integer

Response

\CActiveRecord

primaryKey

primaryKey()
inheritdoc

Modified version that default to do the same as the original, but allows via a third parameter to retrieve the result as array instead of active records. This solves a joining problem. Usage via findAllAsArray method

query(\CDbCriteria $criteria,boolean $all = false,boolean $asAR = true): mixed
inherited

Performs the actual DB query and populates the AR objects with the query result. This method is mainly internally used by other AR query methods.

since 1.1.7

Arguments

$criteria

\CDbCriteria

the query criteria

$all

boolean

whether to return all data

$asAR

boolean

Response

mixed

the AR objects populated with the query result

relations

relations()
inheritdoc

findByPk uses a cache to store a result. Use this method to force clearing that cache.

resetCache()

rules

rules()
inheritdoc

Transcribe from 3 checkboxes to 1 char for captcha usages Uses variables from $_POST and transferred Surveyobject

saveTranscribeCaptchaOptions(\Survey $oSurvey = null): string
static

'A' = All three captcha enabled 'B' = All but save and load 'C' = All but registration 'D' = All but survey access 'X' = Only survey access 'R' = Only registration 'S' = Only save and load

'E' = All inherited 'F' = Inherited save and load + survey access + registration 'G' = Inherited survey access + registration + save and load 'H' = Inherited registration + save and load + survey access 'I' = Inherited save and load + inherited survey access + registration 'J' = Inherited survey access + inherited registration + save and load 'K' = Inherited registration + inherited save and load + survey access

'L' = Inherited survey access + save and load 'M' = Inherited survey access + registration 'O' = Inherited registration + survey access '1' = Inherited survey access + inherited registration '2' = Inherited survey access + inherited save and load '3' = Inherited registration + inherited save and load '4' = Inherited survey access '5' = Inherited save and load '6' = Inherited registration

'N' = None

todo

Should really be saved as three fields in the database!

Arguments

$oSurvey

\Survey

Response

string

One character that corresponds to captcha usage

scopes

scopes()
inheritdoc

Attribute renamed to questionindex in dbversion 169 Y maps to 1 otherwise 0;

setAllowjumps(string $value)

Arguments

$value

string

Function to show encryption symbol in gridview attribute header if value ois encrypted

setEncryptedAttributeLabel(integer $surveyId,string $className,string $attributeName): string
inherited
Throws
\CException

Arguments

$surveyId

integer

$className

string

$attributeName

string

Response

string

Sets Google Analytics API Key Setting.

setGoogleanalyticsapikeysetting(string $value): void

Arguments

$value

string

Google Analytics Key

setOptions

setOptions( $gsid = 1)

Arguments

$gsid

setOptionsFromDatabase

setOptionsFromDatabase()

setToInherit

setToInherit()

setTokenEncryptionOptions

setTokenEncryptionOptions( $options)

Arguments

$options

tableName

tableName()
inheritdoc

Updates records with the specified condition.

updateAll(array $attributes,mixed $condition = '',array $params = array()): integer
inherited

XSS filtering is enforced for attributes listed in model's $xssFilterAttributes property. See \find() for detailed explanation about $condition and $params. Note, the attributes are not checked for safety and no validation is done.

Arguments

$attributes

array

list of attributes (name=>$value) to be updated

$condition

mixed

query condition or criteria.

$params

array

parameters to be bound to an SQL statement.

Response

integer

the number of rows being updated

Properties

This is a static cache, it lasts only during the active request. If you ever need to clear it, like on activation of a survey when in the same request a row is read, saved and read again you can use resetCache() method.

findByPkCache :array
var

Type(s)

array

oOptions

oOptions :

Type(s)

oOptionLabels

oOptionLabels :

Type(s)

aOptions

aOptions :

Type(s)

showInherited

showInherited :

Type(s)

searched_value

searched_value :

Type(s)

showsurveypolicynotice

showsurveypolicynotice :

Type(s)

bShowRealOptionValues

bShowRealOptionValues :

Type(s)

sSurveyUrl

sSurveyUrl :

Type(s)

Array of attributes that should be XSS filtered on mass updates

xssFilterAttributes :array<mixed,string>
inherited
var

Array of attributes that should be XSS filtered on mass updates

Type(s)

array<mixed,string>

bEncryption

bEncryption :
inherited

Type(s)

sid

sid :integer

Survey ID

Type(s)

integer

owner_id

owner_id :integer

Type(s)

integer

gsid

gsid :integer

survey group id, from which this survey belongs to and inherits values from when set to 'I'

Type(s)

integer

admin

admin :string

Survey Admin's full name

Type(s)

string

active

active :string

Whether survey is acive or not (Y/N)

Type(s)

string

expires

expires :string

Expiry date (YYYY-MM-DD hh:mm:ss)

Type(s)

string

startdate

startdate :string

Survey Start date (YYYY-MM-DD hh:mm:ss)

Type(s)

string

adminemail

adminemail :string

Survey administrator email address

Type(s)

string

anonymized

anonymized :string

Whether survey is anonymized or not (Y/N)

Type(s)

string

format

format :string

A : All in one, G : Group by group, Q : question by question, I : inherit value from survey group

Type(s)

string

savetimings

savetimings :string

Whether survey timings are saved (Y/N)

Type(s)

string

template

template :string

Template name

Type(s)

string

language

language :string

Survey base language

Type(s)

string

additional_languages

additional_languages :string

Survey additional languages delimited by space ' '

Type(s)

string

datestamp

datestamp :string

Whether respondents' datestamps will be saved (Y/N)

Type(s)

string

usecookie

usecookie :string

Are cookies used to prevent repeated participation (Y/N)

Type(s)

string

allowregister

allowregister :string

Allow public registration (Y/N)

Type(s)

string

allowsave

allowsave :string

Is participant allowed save and resume later (Y/N)

Type(s)

string

autonumber_start

autonumber_start :integer

Type(s)

integer

tokenlength

tokenlength :integer

Token length: MIN:5 MAX:36

Type(s)

integer

autoredirect

autoredirect :string

Automatically load URL when survey complete: (Y/N)

Type(s)

string

allowprev

allowprev :string

Allow backwards navigation (Y/N)

Type(s)

string

printanswers

printanswers :string

Participants may print answers: (Y/N)

Type(s)

string

ipaddr

ipaddr :string

Whether Participants IP address will be saved: (Y/N)

Type(s)

string

ipanonymize

ipanonymize :string

Whether id addresses should be anonymized (Y/N)

Type(s)

string

refurl

refurl :string

Save referrer URL: (Y/N)

Type(s)

string

datecreated

datecreated :string

Date survey was created (YYYY-MM-DD hh:mm:ss)

Type(s)

string

publicstatistics

publicstatistics :string

Public statistics: (Y/N)

Type(s)

string

publicgraphs

publicgraphs :string

Show graphs in public statistics: (Y/N)

Type(s)

string

listpublic

listpublic :string

List survey publicly: (Y/N)

Type(s)

string

htmlemail

htmlemail :string

Use HTML format for token emails: (Y/N)

Type(s)

string

sendconfirmation

sendconfirmation :string

Send confirmation emails:(Y/N)

Type(s)

string

tokenanswerspersistence

tokenanswerspersistence :string

Enable token-based response persistence: (Y/N)

Type(s)

string

assessments

assessments :string

Enable assessment mode: (Y/N)

Type(s)

string

usecaptcha

usecaptcha :string

Type(s)

string

usetokens

usetokens :string

Type(s)

string

bounce_email

bounce_email :string

Bounce email address

Type(s)

string

attributedescriptions

attributedescriptions :string

Type(s)

string

emailresponseto

emailresponseto :string

e-mail address to send detailed admin notification email to

Type(s)

string

emailnotificationto

emailnotificationto :string

Email address to send basic admin notification email to

Type(s)

string

showxquestions

showxquestions :string

Show "There are X questions in this survey": (Y/N)

Type(s)

string

showgroupinfo

showgroupinfo :string

Show group name and/or group description: (Y/N)

Type(s)

string

shownoanswer

shownoanswer :string

Show "No answer": (Y/N)

Type(s)

string

showqnumcode

showqnumcode :string

Show question number and/or code: (Y/N)

Type(s)

string

bouncetime

bouncetime :integer

Type(s)

integer

bounceprocessing

bounceprocessing :string

Type(s)

string

bounceaccounttype

bounceaccounttype :string

Type(s)

string

bounceaccounthost

bounceaccounthost :string

Type(s)

string

bounceaccountpass

bounceaccountpass :string

Type(s)

string

bounceaccountencryption

bounceaccountencryption :string

Type(s)

string

bounceaccountuser

bounceaccountuser :string

Type(s)

string

showwelcome

showwelcome :string

Show welcome screen: (Y/N)

Type(s)

string

showprogress

showprogress :string

how progress bar: (Y/N)

Type(s)

string

questionindex

questionindex :integer

Show question index / allow jumping (0: diabled; 1: Incremental; 2: Full)

Type(s)

integer

navigationdelay

navigationdelay :integer

Navigation delay (seconds) (It shows the number of seconds before the previous, next, and submit buttons are enabled. If none is specified, the option will use the default value, which is "0" (seconds))

Type(s)

integer

nokeyboard

nokeyboard :string

Show on-screen keyboard: (Y/N)

Type(s)

string

alloweditaftercompletion

alloweditaftercompletion :string

Allow multiple responses or update responses with one token: (Y/N)

Type(s)

string

googleanalyticsstyle

googleanalyticsstyle :string

Google Analytics style: (0: off; 1:Default; 2:Survey-SID/Group)

Type(s)

string

googleanalyticsapikey

googleanalyticsapikey :string

Google Analytics Tracking ID

Type(s)

string

tokenencryptionoptions

tokenencryptionoptions :string

Token encryption options

Type(s)

string

permissions

permissions :array<mixed,\Permission>

Type(s)

array<mixed,\Permission>

languagesettings

languagesettings :array<mixed,\SurveyLanguageSetting>

Type(s)

array<mixed,\SurveyLanguageSetting>

owner

owner :\User

Type(s)

\User

groups

groups :array<mixed,\QuestionGroup>

Type(s)

array<mixed,\QuestionGroup>

quotas

quotas :array<mixed,\Quota>

Type(s)

array<mixed,\Quota>

allQuestions

allQuestions :array<mixed,\Question>

All survey questions including subquestions

Type(s)

array<mixed,\Question>

baseQuestions

baseQuestions :array<mixed,\Question>

Survey questions NOT including subquestions

Type(s)

array<mixed,\Question>

quotableQuestions

quotableQuestions :array<mixed,\Question>

Type(s)

array<mixed,\Question>

fullAnswers

fullAnswers :array

Type(s)

array

partialAnswers

partialAnswers :array

Type(s)

array

countFullAnswers

countFullAnswers :integer

Full-answers count

Type(s)

integer

countPartialAnswers

countPartialAnswers :integer

Full-answers count

Type(s)

integer

countTotalAnswers

countTotalAnswers :integer

Total-answers count

Type(s)

integer

groupsCount

groupsCount :integer

Number of groups in a survey (in base language)

Type(s)

integer

surveyinfo

surveyinfo :array

Type(s)

array

currentLanguageSettings

currentLanguageSettings :\SurveyLanguageSetting

Survey languagesettings in currently active language

Type(s)

\SurveyLanguageSetting

allLanguages

allLanguages :array<mixed,string>

Type(s)

array<mixed,string>

additionalLanguages

additionalLanguages :array<mixed,string>

Additional survey languages

Type(s)

array<mixed,string>

tokenAttributes

tokenAttributes :array

Additional token attribute names

Type(s)

array

creationDate

creationDate :string

Creation date formatted according to user format

Type(s)

string

startDateFormatted

startDateFormatted :string

Start date formatted according to user format

Type(s)

string

expiryDateFormatted

expiryDateFormatted :string

Expiry date formatted according to user format

Type(s)

string

tokensTableName

tokensTableName :string

Name of survey tokens table

Type(s)

string

responsesTableName

responsesTableName :string

Name of survey resonses table

Type(s)

string

timingsTableName

timingsTableName :string

Name of survey timings table

Type(s)

string

hasTokensTable

hasTokensTable :boolean

Whether survey has a tokens table or not

Type(s)

boolean

hasResponsesTable

hasResponsesTable :boolean

Wheteher the survey responses (data) table exists in DB

Type(s)

boolean

hasTimingsTable

hasTimingsTable :boolean

Wheteher the survey timings table exists in DB

Type(s)

boolean

googleanalyticsapikeysetting

googleanalyticsapikeysetting :string

Returns the value for the SurveyEdit GoogleAnalytics API-Key UseGlobal Setting

Type(s)

string

countTotalQuestions

countTotalQuestions :integer

Count of questions (in that language, without subquestions)

Type(s)

integer

countInputQuestions

countInputQuestions :integer

Count of questions that need input (skipping text-display etc.)

Type(s)

integer

countNoInputQuestions

countNoInputQuestions :integer

Count of questions that DO NOT need input (skipping text-display etc.)

All Y/N columns in the model can be accessed as boolean values:

Type(s)

integer

isActive

isActive :boolean

Whether Survey is active

Type(s)

boolean

isAnonymized

isAnonymized :boolean

Whether survey is anonymized or not

Type(s)

boolean

isSaveTimings

isSaveTimings :boolean

Whether survey timings are saved

Type(s)

boolean

isDateStamp

isDateStamp :boolean

Whether respondents' datestamps will be saved

Type(s)

boolean

isUseCookie

isUseCookie :boolean

Are cookies used to prevent repeated participation

Type(s)

boolean

isAllowRegister

isAllowRegister :boolean

Allow public registration

Type(s)

boolean

isAllowSave

isAllowSave :boolean

Is participant allowed save and resume later

Type(s)

boolean

isAutoRedirect

isAutoRedirect :boolean

Automatically load URL when survey complete

Type(s)

boolean

isAllowPrev

isAllowPrev :boolean

Allow backwards navigation

Type(s)

boolean

isPrintAnswers

isPrintAnswers :boolean

Participants may print answers

Type(s)

boolean

isIpAddr

isIpAddr :boolean

Whether Participants IP address will be saved

Type(s)

boolean

isIpAnonymize

isIpAnonymize :boolean

Whether Participants IP address will be saved

Type(s)

boolean

isRefUrl

isRefUrl :boolean

Save referrer URL

Type(s)

boolean

isPublicStatistics

isPublicStatistics :boolean

Public statistics

Type(s)

boolean

isPublicGraphs

isPublicGraphs :boolean

Show graphs in public statistics

Type(s)

boolean

isListPublic

isListPublic :boolean

List survey publicly

Type(s)

boolean

isHtmlEmail

isHtmlEmail :boolean

Use HTML format for token emails

Type(s)

boolean

isSendConfirmation

isSendConfirmation :boolean

Send confirmation emails

Type(s)

boolean

isTokenAnswersPersistence

isTokenAnswersPersistence :boolean

Enable token-based response persistence

Type(s)

boolean

isAssessments

isAssessments :boolean

Enable assessment mode

Type(s)

boolean

isShowXQuestions

isShowXQuestions :boolean

Show "There are X questions in this survey"

Type(s)

boolean

isShowGroupInfo

isShowGroupInfo :boolean

Show group name and/or group description

Type(s)

boolean

isShowNoAnswer

isShowNoAnswer :boolean

Show "No answer"

Type(s)

boolean

isShowQnumCode

isShowQnumCode :boolean

Show question number and/or code

Type(s)

boolean

isShowWelcome

isShowWelcome :boolean

Show welcome screen

Type(s)

boolean

isShowProgress

isShowProgress :boolean

how progress bar

Type(s)

boolean

showsurveypolicynotice

showsurveypolicynotice :boolean

Show the security notice

Type(s)

boolean

isNoKeyboard

isNoKeyboard :boolean

Show on-screen keyboard

Type(s)

boolean

isAllowEditAfterCompletion

isAllowEditAfterCompletion :boolean

Allow multiple responses or update responses with one token

Type(s)

boolean

defaultlanguage

defaultlanguage :\SurveyLanguageSetting

Type(s)

\SurveyLanguageSetting

isDateExpired

isDateExpired :boolean

Whether survey is expired depending on the current time and survey configuration status

Type(s)

boolean