LimeSurvey API - Master branch

QuestionType extends StaticModel
in package

Class QuestionType

Table of Contents

Constants

QT_1_ARRAY_DUAL  = '1'
QT_1_ARRAY_MULTISCALE  = '1'
QT_5_POINT_CHOICE  = '5'
QT_A_ARRAY_5_CHOICE_QUESTIONS  = 'A'
QT_A_ARRAY_5_POINT  = 'A'
QT_ASTERISK_EQUATION  = '*'
QT_B_ARRAY_10_POINT  = 'B'
QT_C_ARRAY_YES_UNCERTAIN_NO  = 'C'
QT_COLON_ARRAY_MULTI_FLEX_NUMBERS  = ':'
QT_COLON_ARRAY_NUMBERS  = ':'
QT_D_DATE  = 'D'
QT_E_ARRAY_INC_SAME_DEC  = 'E'
QT_E_ARRAY_OF_INC_SAME_DEC_QUESTIONS  = 'E'
QT_EXCLAMATION_LIST_DROPDOWN  = '!'
QT_F_ARRAY  = 'F'
QT_F_ARRAY_FLEXIBLE_ROW  = 'F'
QT_G_GENDER  = 'G'
QT_G_GENDER_DROPDOWN  = 'G'
QT_H_ARRAY_COLUMN  = 'H'
QT_H_ARRAY_FLEXIBLE_COLUMN  = 'H'
QT_I_LANGUAGE  = 'I'
QT_K_MULTIPLE_NUMERICAL  = 'K'
QT_K_MULTIPLE_NUMERICAL_QUESTION  = 'K'
QT_L_LIST  = 'L'
QT_M_MULTIPLE_CHOICE  = 'M'
QT_N_NUMERICAL  = 'N'
QT_O_LIST_WITH_COMMENT  = 'O'
QT_P_MULTIPLE_CHOICE_WITH_COMMENTS  = 'P'
QT_Q_MULTIPLE_SHORT_TEXT  = 'Q'
QT_R_RANKING  = 'R'
QT_R_RANKING_STYLE  = 'R'
QT_S_SHORT_FREE_TEXT  = 'S'
QT_SEMICOLON_ARRAY_MULTI_FLEX_TEXT  = ';'
QT_SEMICOLON_ARRAY_TEXT  = ';'
QT_T_LONG_FREE_TEXT  = 'T'
QT_U_HUGE_FREE_TEXT  = 'U'
QT_VERTICAL_FILE_UPLOAD  = '|'
QT_X_BOILERPLATE_QUESTION  = 'X'
QT_X_TEXT_DISPLAY  = 'X'
QT_Y_YES_NO_RADIO  = 'Y'

Properties

$answerscales  : int
$assessable  : int
$class  : string
$code  : string
$description  : string
$fieldDataType  : string
$fieldType  : string
$group  : string
$hasdefaultvalues  : int
$isChar  : bool
$isInteger  : bool
$isNumeric  : bool
$isString  : bool
$isText  : bool
$other  : bool
$question  : Question
$question  : Question
$questionRenderer  : QuestionRenderer
$subquestions  : int

Methods

applyToQuestion()  : mixed
attributeLabels()  : mixed
{@inheritdoc}
attributeNames()  : mixed
{@inheritdoc}
charCodes()  : array<string|int, string>
Get all type codes of that represent data in char (one-character-string)
doubleCodes()  : array<string|int, string>
Get all type codes of that represent data as double
findOne()  : null|static
getFieldDataType()  : string
getFieldType()  : string
getIsChar()  : bool
getIsInteger()  : bool
getIsNumeric()  : bool
getIsString()  : bool
getIsText()  : bool
integerCodes()  : array<string|int, string>
Get all type codes of that represent data as integer
modelsAttributes()  : array<string|int, mixed>
Models attributes as array indexed by primary key
numericCodes()  : array<string|int, string>
Get all type codes of that represent data as double
stringCodes()  : array<string|int, string>
Get all type codes of that represent data in string (text and char)
textCodes()  : array<string|int, string>
Get all type codes of that represent data in text (string longer than char)

Constants

QT_1_ARRAY_MULTISCALE

public mixed QT_1_ARRAY_MULTISCALE = '1'

QT_A_ARRAY_5_CHOICE_QUESTIONS

public mixed QT_A_ARRAY_5_CHOICE_QUESTIONS = 'A'

QT_A_ARRAY_5_POINT

public mixed QT_A_ARRAY_5_POINT = 'A'

QT_ASTERISK_EQUATION

public mixed QT_ASTERISK_EQUATION = '*'

QT_B_ARRAY_10_POINT

public mixed QT_B_ARRAY_10_POINT = 'B'

QT_C_ARRAY_YES_UNCERTAIN_NO

public mixed QT_C_ARRAY_YES_UNCERTAIN_NO = 'C'

QT_COLON_ARRAY_MULTI_FLEX_NUMBERS

public mixed QT_COLON_ARRAY_MULTI_FLEX_NUMBERS = ':'

QT_COLON_ARRAY_NUMBERS

public mixed QT_COLON_ARRAY_NUMBERS = ':'

QT_E_ARRAY_INC_SAME_DEC

public mixed QT_E_ARRAY_INC_SAME_DEC = 'E'

QT_E_ARRAY_OF_INC_SAME_DEC_QUESTIONS

public mixed QT_E_ARRAY_OF_INC_SAME_DEC_QUESTIONS = 'E'

QT_EXCLAMATION_LIST_DROPDOWN

public mixed QT_EXCLAMATION_LIST_DROPDOWN = '!'

QT_F_ARRAY_FLEXIBLE_ROW

public mixed QT_F_ARRAY_FLEXIBLE_ROW = 'F'

QT_G_GENDER_DROPDOWN

public mixed QT_G_GENDER_DROPDOWN = 'G'

QT_H_ARRAY_FLEXIBLE_COLUMN

public mixed QT_H_ARRAY_FLEXIBLE_COLUMN = 'H'

QT_K_MULTIPLE_NUMERICAL

public mixed QT_K_MULTIPLE_NUMERICAL = 'K'

QT_K_MULTIPLE_NUMERICAL_QUESTION

public mixed QT_K_MULTIPLE_NUMERICAL_QUESTION = 'K'

QT_M_MULTIPLE_CHOICE

public mixed QT_M_MULTIPLE_CHOICE = 'M'

QT_O_LIST_WITH_COMMENT

public mixed QT_O_LIST_WITH_COMMENT = 'O'

QT_P_MULTIPLE_CHOICE_WITH_COMMENTS

public mixed QT_P_MULTIPLE_CHOICE_WITH_COMMENTS = 'P'

QT_Q_MULTIPLE_SHORT_TEXT

public mixed QT_Q_MULTIPLE_SHORT_TEXT = 'Q'

QT_R_RANKING_STYLE

public mixed QT_R_RANKING_STYLE = 'R'

QT_S_SHORT_FREE_TEXT

public mixed QT_S_SHORT_FREE_TEXT = 'S'

QT_SEMICOLON_ARRAY_MULTI_FLEX_TEXT

public mixed QT_SEMICOLON_ARRAY_MULTI_FLEX_TEXT = ';'

QT_SEMICOLON_ARRAY_TEXT

public mixed QT_SEMICOLON_ARRAY_TEXT = ';'

QT_T_LONG_FREE_TEXT

public mixed QT_T_LONG_FREE_TEXT = 'T'

QT_U_HUGE_FREE_TEXT

public mixed QT_U_HUGE_FREE_TEXT = 'U'

QT_VERTICAL_FILE_UPLOAD

public mixed QT_VERTICAL_FILE_UPLOAD = '|'

QT_X_BOILERPLATE_QUESTION

public mixed QT_X_BOILERPLATE_QUESTION = 'X'

Properties

$answerscales

public int $answerscales

number of answer scales

$assessable

public int $assessable

whether it can be used inside Assessments / Quizmode

$class

public string $class

the css class for question (container??)

$fieldDataType

public string $fieldDataType

numeric vs string types

$fieldType

public string $fieldType

The type of field question needs for storing data

$hasdefaultvalues

public int $hasdefaultvalues

whether has default values

$isChar

public bool $isChar

Whether the type is char (one-character-string)

$isInteger

public bool $isInteger

Whether the type integer

$isNumeric

public bool $isNumeric

Whether the type numeric (integer, double)

$isString

public bool $isString

Whether the type is string (text or char)

$isText

public bool $isText

Whether the type is text (string longer than char)

$other

public bool $other = \false

allow other (and add subquetsion title other if Y)

$questionRenderer

public QuestionRenderer $questionRenderer

$subquestions

public int $subquestions

whether has subquestions //TODO make it boolean instead

Methods

applyToQuestion()

public applyToQuestion(mixed $oQuestion) : mixed
Parameters
$oQuestion : mixed

attributeLabels()

{@inheritdoc}

public attributeLabels() : mixed

attributeNames()

{@inheritdoc}

public attributeNames() : mixed

charCodes()

Get all type codes of that represent data in char (one-character-string)

public static charCodes() : array<string|int, string>
Return values
array<string|int, string>

doubleCodes()

Get all type codes of that represent data as double

public static doubleCodes() : array<string|int, string>
Return values
array<string|int, string>

findOne()

public static findOne(string $pk) : null|static
Parameters
$pk : string

primary key of model

Return values
null|static

getFieldDataType()

public getFieldDataType() : string
Return values
string

getFieldType()

public getFieldType() : string
Return values
string

getIsChar()

public getIsChar() : bool
Return values
bool

getIsInteger()

public getIsInteger() : bool
Return values
bool

getIsNumeric()

public getIsNumeric() : bool
Return values
bool

getIsString()

public getIsString() : bool
Return values
bool

getIsText()

public getIsText() : bool
Return values
bool

integerCodes()

Get all type codes of that represent data as integer

public static integerCodes() : array<string|int, string>
Return values
array<string|int, string>

modelsAttributes()

Models attributes as array indexed by primary key

public static modelsAttributes([string $language = '' ]) : array<string|int, mixed>
Parameters
$language : string = ''
Return values
array<string|int, mixed>

Still used in QuestionAdministrationController

TODO choose between self::modelsAttributes and QuestionTheme::findQuestionMetaData or QuestionTheme::getAllQuestionMetaData TODO QuestionTheme 1591616914305: Needs to be replaced by @link QuestionTheme::getAllQuestionMetaData() however translations inside the xml need to be inserted first

numericCodes()

Get all type codes of that represent data as double

public static numericCodes() : array<string|int, string>
Return values
array<string|int, string>

stringCodes()

Get all type codes of that represent data in string (text and char)

public static stringCodes() : array<string|int, string>
Return values
array<string|int, string>

textCodes()

Get all type codes of that represent data in text (string longer than char)

public static textCodes() : array<string|int, string>
Return values
array<string|int, string>

        
On this page

Search results