QuestionBaseDataSet

Extends\StaticModel

This is a base class to enable all question tpyes to extend the general settings.

TODO

: Create an xml based solution to use external question type definitions as well

package

Default

Methods

__construct

__construct( $iQuestionId)

Arguments

$iQuestionId

{@inheritdoc}

attributeNames()
inherited

findOne

findOne(string $pk): null|static
inheritedstatic

Arguments

$pk

string

primary key of model

Response

null|static

Returns a preformatted block of the advanced settings for the question editor

getAdvancedOptions(integer $iQuestionID = null,integer $sQuestionType = null,string $sLanguage = null,string $sQuestionTemplate = null): array
deprecated

use getPreformattedBlockOfAdvancedSettings() instead of this function

Throws
\CException

Arguments

$iQuestionID

integer

$sQuestionType

integer

$sLanguage

string

$sQuestionTemplate

string

Response

array

getClearDefaultSwitch

getClearDefaultSwitch()

getEncryptionSwitch

getEncryptionSwitch()

Returns a preformatted block of the general settings for the question editor

getGeneralSettingsArray(integer $iQuestionID = null,integer $sQuestionType = null,string $sLanguage = null,null $question_template = null): array
Throws
\CException

Arguments

$iQuestionID

integer

$sQuestionType

integer

$sLanguage

string

$question_template

null

Response

array

getMandatorySetting

getMandatorySetting()

getOtherSwitch

getOtherSwitch()

Returns a preformatted block of the advanced settings for the question editor (qe).

getPreformattedBlockOfAdvancedSettings(\Question|\QuestionCreate $oQuestion,string $sQuestionTheme = null): array

The advanced settings are the part at the bottom of the qe. They depend on the question type and the question theme. Result should look like: Display --> category repeat_headings --> attributename name title inputtpye formElementId formElementName formElementHelp formElementValue aFormElementOptions answer_width name ... Logic min_answers name ...

Throws
\Exception

when question type attributes are not available

Arguments

$sQuestionTheme

string

Response

array

getQuestionGroupSelector

getQuestionGroupSelector()

getQuestionThemeOption

getQuestionThemeOption( $currentSetQuestionTheme = null)

Arguments

$currentSetQuestionTheme

getRelevanceEquationInput

getRelevanceEquationInput()

getSaveAsDefaultSwitch

getSaveAsDefaultSwitch()

getValidationInput

getValidationInput()

Models attributes as array indexed by primary key

modelsAttributes(): array
inheritedstatic

Response

array

parseFromAttributeHelper

parseFromAttributeHelper( $sAttributeKey, $aAttributeArray, $formElementValue): array

Arguments

$sAttributeKey

$aAttributeArray

$formElementValue

Response

array

Properties

iQuestionId

iQuestionId :

Type(s)

sQuestionType

sQuestionType :

Type(s)

sLanguage

sLanguage :

Type(s)

oQuestion

oQuestion :

Type(s)

aQuestionAttributes

aQuestionAttributes :

Type(s)