RenderMultipleChoice
extends QuestionBaseRenderer
in package
RenderClass for Boilerplate Question * The ia Array contains the following 0 => string qid 1 => string sgqa 2 => string questioncode 3 => string question 4 => string type 5 => string gid 6 => string mandatory, 7 => string conditionsexist, 8 => string usedinconditions 0 => string used in group.php for question count 10 => string new group id for question in randomization group (GroupbyGroup Mode)
Table of Contents
Constants
- OTHER_POS_AFTER_SUBQUESTION = 'specific'
- OTHER_POS_END = 'end'
- OTHER_POS_START = 'beginning'
Properties
- $bPreview : mixed
- $bRenderDirect : mixed
- $checkconditionFunction : mixed
- $oQuestion : mixed
- $sCoreClass : mixed
- $sHtml : mixed
- $sSGQA : mixed
- $aAnswerOptions : mixed
- $aFieldArray : mixed
- $aPackages : mixed
- $aQuestionAttributes : mixed
- $aScriptFiles : mixed
- $aScripts : mixed
- $aStyles : mixed
- $aSubQuestions : mixed
- $aSurveySessionArray : mixed
- $hasOther : bool
- $mSessionValue : mixed
- $otherPosition : int
- $otherText : string
- $sLanguage : mixed
- $subquestionBeforeOther : string
- $iColumnWidth : mixed
- $iMaxRowsByColumn : mixed
- $iNbCols : mixed
- $inputnames : mixed
- $sCoreClasses : mixed
Methods
- __construct() : mixed
- attributeNames() : mixed
- {@inheritdoc}
- findOne() : null|static
- getCurrentRelevecanceClass() : string
- Return class of a specific row (hidden by relevance)
- getLabelInputWidth() : array<string|int, mixed>
- Find the label / input width
- getMainView() : mixed
- getOtherRow() : mixed
- getRows() : mixed
- includeKeypad() : mixed
- Include Keypad headers
- modelsAttributes() : array<string|int, mixed>
- Models attributes as array indexed by primary key
- render() : mixed
- addScript() : mixed
- applyPackages() : mixed
- applyScriptfiles() : mixed
- applyScripts() : mixed
- applyStyles() : mixed
- getAnswerCount() : mixed
- getFromSurveySession() : mixed
- getQuestionAttribute() : mixed
- getQuestionCount() : mixed
- getQuestionScript() : string|null
- Returns the question script to render depending on the language.
- getTimeSettingRender() : mixed
- registerAssets() : mixed
- setAnsweroptions() : mixed
- setDefaultIfEmpty() : mixed
- setSubquestions() : mixed
Constants
OTHER_POS_AFTER_SUBQUESTION
public
mixed
OTHER_POS_AFTER_SUBQUESTION
= 'specific'
OTHER_POS_END
public
mixed
OTHER_POS_END
= 'end'
OTHER_POS_START
public
mixed
OTHER_POS_START
= 'beginning'
Properties
$bPreview
public
mixed
$bPreview
$bRenderDirect
public
mixed
$bRenderDirect
$checkconditionFunction
public
mixed
$checkconditionFunction
= "checkconditions"
$oQuestion
public
mixed
$oQuestion
$sCoreClass
public
mixed
$sCoreClass
$sHtml
public
mixed
$sHtml
$sSGQA
public
mixed
$sSGQA
$aAnswerOptions
protected
mixed
$aAnswerOptions
= []
$aFieldArray
protected
mixed
$aFieldArray
$aPackages
protected
mixed
$aPackages
= []
$aQuestionAttributes
protected
mixed
$aQuestionAttributes
$aScriptFiles
protected
mixed
$aScriptFiles
= []
$aScripts
protected
mixed
$aScripts
= []
$aStyles
protected
mixed
$aStyles
= []
$aSubQuestions
protected
mixed
$aSubQuestions
= []
$aSurveySessionArray
protected
mixed
$aSurveySessionArray
$hasOther
protected
bool
$hasOther
indicates if the question has the 'Other' option enabled
$mSessionValue
protected
mixed
$mSessionValue
$otherPosition
protected
int
$otherPosition
the position where the 'Other' option should be placed. Possible values: 0 (At end), 1 (At beginning), 3 (After specific subquestion)
$otherText
protected
string
$otherText
the text for the "Other" option
$sLanguage
protected
mixed
$sLanguage
$subquestionBeforeOther
protected
string
$subquestionBeforeOther
the title of the subquestion after which the 'Other' option should be placed (if $otherPosition == 3)
$iColumnWidth
private
mixed
$iColumnWidth
$iMaxRowsByColumn
private
mixed
$iMaxRowsByColumn
$iNbCols
private
mixed
$iNbCols
$inputnames
private
mixed
$inputnames
= []
$sCoreClasses
private
mixed
$sCoreClasses
= 'ls-answers checkbox-list answers-list'
Methods
__construct()
public
__construct(mixed $aFieldArray[, mixed $bRenderDirect = false ]) : mixed
Parameters
- $aFieldArray : mixed
- $bRenderDirect : mixed = false
attributeNames()
{@inheritdoc}
public
attributeNames() : mixed
findOne()
public
static findOne(string $pk) : null|static
Parameters
- $pk : string
-
primary key of model
Return values
null|staticgetCurrentRelevecanceClass()
Return class of a specific row (hidden by relevance)
public
getCurrentRelevecanceClass(string $myfname) : string
Parameters
- $myfname : string
-
The name of the question/row to test
Return values
stringgetLabelInputWidth()
Find the label / input width
public
getLabelInputWidth() : array<string|int, mixed>
Return values
array<string|int, mixed> —labelWidth as integer,inputWidth as integer,defaultWidth as boolean
getMainView()
public
getMainView() : mixed
getOtherRow()
public
getOtherRow() : mixed
getRows()
public
getRows() : mixed
includeKeypad()
Include Keypad headers
public
includeKeypad() : mixed
modelsAttributes()
Models attributes as array indexed by primary key
public
static modelsAttributes() : array<string|int, mixed>
Return values
array<string|int, mixed>render()
public
render([mixed $sCoreClasses = '' ]) : mixed
Parameters
- $sCoreClasses : mixed = ''
addScript()
protected
addScript(mixed $name, mixed $content[, mixed $position = LSYii_ClientScript::POS_BEGIN ][, mixed $appendId = false ]) : mixed
Parameters
- $name : mixed
- $content : mixed
- $position : mixed = LSYii_ClientScript::POS_BEGIN
- $appendId : mixed = false
applyPackages()
protected
applyPackages() : mixed
applyScriptfiles()
protected
applyScriptfiles() : mixed
applyScripts()
protected
applyScripts() : mixed
applyStyles()
protected
applyStyles() : mixed
getAnswerCount()
protected
getAnswerCount([mixed $iScaleId = 0 ]) : mixed
Parameters
- $iScaleId : mixed = 0
getFromSurveySession()
protected
getFromSurveySession(mixed $sIndex[, mixed $default = "" ]) : mixed
Parameters
- $sIndex : mixed
- $default : mixed = ""
getQuestionAttribute()
protected
getQuestionAttribute(mixed $key1[, mixed $key2 = null ]) : mixed
Parameters
- $key1 : mixed
- $key2 : mixed = null
getQuestionCount()
protected
getQuestionCount([mixed $iScaleId = 0 ]) : mixed
Parameters
- $iScaleId : mixed = 0
getQuestionScript()
Returns the question script to render depending on the language.
protected
getQuestionScript() : string|null
If "Use for all languages" is set, the base language's script is used.
Return values
string|nullgetTimeSettingRender()
protected
getTimeSettingRender() : mixed
registerAssets()
protected
registerAssets() : mixed
setAnsweroptions()
protected
setAnsweroptions([mixed $scale_id = null ]) : mixed
Parameters
- $scale_id : mixed = null
setDefaultIfEmpty()
protected
setDefaultIfEmpty(mixed $value, mixed $default) : mixed
Parameters
- $value : mixed
- $default : mixed
setSubquestions()
protected
setSubquestions([mixed $scale_id = null ]) : mixed
Parameters
- $scale_id : mixed = null