package | Default |
---|
__clone()
__construct()
_CreateSubQLevelRelevanceAndValidationEqns(integer|null $onlyThisQseq = null): void
integer|null
_GetVarAttribute( $name, $attr, $default,integer $gseq,integer $qseq)
integer
integer
_ProcessGroupRelevance(integer $groupSeq): void
integer
_ProcessRelevance(string $eqn,string $questionNum = null, $gseq = null,string $jsResultVar = null,string $type = null,integer $hidden): boolean
string
string
string
string
integer
boolean
_ProcessSubQRelevance(string $eqn,string $questionNum = null,string $rowdivid = null,string $type = null,string $qtype = null,string $sgqa = null,string $isExclusive = '',string $irrelevantAndExclusive = ''): boolean
string
string
string
string
string
string
string
string
boolean
_recursivelyFindAntecdentArrayFilters(string $qroot,array $aflist,array $afelist): array
string
array
array
array
_UpdateValuesInDatabase(boolean $finished = false): string
boolean
string
_ValidateGroup(integer $groupSeq,boolean $force = false): array
integer
boolean
: force validation to true, even if there are error
array
Detailed information about this group
_ValidateQuestion(integer $questionSeq,boolean $force = false): array
integer
boolean
: force validation to true, even if there are error, this allow to save in DB even with error
array
Array of information about this question and its subquestions
_ValidateSurvey(boolean $force = false): array
boolean
: force validation to true, even if there are error, used at survey start to fill EM
array
with information on validated question
addFrontendFlashMessage(string $type,string $message,integer $surveyid): void
todo | : validate if it work : unsure it was shown always to user (nojs ?) |
---|
string
Yii type of flash: error
, notice
, 'success'
string
integer
addValidityString(string $sgqa, $value,string $message,boolean $add = true): void
string
: the SGQ (answer column / SGQA)
string
: the message
boolean
: add it to current validity or only og it
checkValidityAnswer(string $type,string $value,string $sgq,array $qinfo,boolean $set = true): boolean
Throws |
|
---|
string
: question type
string
: the value
string
: the sgqa
array
: an array with information from question with mandatory ['qid'=>$qid] , optional (but must be 'other'=>$other)
boolean
: update the invalid string or not. Used for #14649 (invalid default value)
boolean
true : if question is OK to be put in session, false if must be set to null
ConvertConditionsToRelevance(integer $surveyId,integer|null $qid = null): array
integer
integer|null
array
of generated relevance strings, indexed by $qid
convertNonLatinNumerics(string $str,string $lang): string
string
string
string
FinishProcessingGroup(boolean|null $skipReprocessing = false): void
boolean|null
FinishProcessingPage(): void
FinishProcessPublicPage( $applyJavaScriptAnyway = false): string|null
todo | : add directly hidden input in page without return it. |
---|---|
string|null
: hidden inputs needed for relevance
GetAllVarNamesForQ(integer $qseq,string $varname): string
integer
string
string
getAnswerSetsForEM(integer|null $surveyid = null,string|null $lang = null): array
integer|null
string|null
array
getConditionsForEM( $surveyid, $qid = null)
GetDebugTimingMessage(): string
string
getEMlanguage(): \string;
\string;
GetGroupIndexInfo(string $gseq = null): array
string
array
getGroupInfoForEM(integer $surveyid,string|null $sLanguage = null): array
integer
string|null
array
GetGroupSeq(integer $gid): integer
integer
integer
GetLastMoveResult(boolean $clearSubstitutionInfo = false): array|null
boolean
array|null
GetLastPrettyPrintExpression(): string
string
getLEMqcode2sgqa(integer $iSurveyId): array
integer
array
*@example (['gender'] => '38612X10X145')
getLEMsurveyId(): integer
integer
getQuestionAttributesForEM(integer|null $surveyid,integer|null $qid,string|null $lang = ''): array
integer|null
integer|null
string|null
array
GetQuestionIndexInfo(): array
array
GetQuestionSeq(integer $qid): integer
integer
integer
GetQuestionStatus( $qid)
getRegexpValidAttributes(): string
string
GetRelevanceAndTailoringJavaScript( $bReturnArray = false)
GetStepIndexInfo(integer|null $step = null): array
integer|null
array
getUpdatedValues(): array
array
getValidityString(string $sgqa): string|null
string
: the SGQ (answer name)
string|null
GetVarAttribute( $name,string|null $attr, $default,integer $gseq,integer $qseq)
string|null
integer
integer
GroupIsIrrelevantOrHidden(integer $gseq): boolean
integer
boolean
GroupIsRelevant(integer $gid): boolean
integer
boolean
gT(string $string, $escapemode = 'html')
string
htmlSpecialCharsUserValue(string $string): string
string
string
isInitialized(): boolean
boolean
isValidVariable( $varName)
JumpTo(integer $seq,string|false $preview = false,boolean $processPOST = true,boolean $force = false,boolean $changeLang = false): array
integer
string|false
@see var $sPreviewMode
boolean
boolean
boolean
array
$this->lastMoveResult
loadTokenInformation(integer $iSurveyId,string|null $sToken = null,boolean|null $bAnonymize = false): void
If specific token is not given it loads empty values, this is used for question previewing and the like.
integer
string|null
boolean|null
NavigateBackwards(): mixed
mixed
NavigateForwards(boolean $force = false): array|null
boolean
array|null
ngT(string $sTextToTranslate,integer $number, $escapemode = 'html')
string
integer
ProcessAllNeededRelevance(string|null $onlyThisQseq = null, $groupSeq = null): void
This generates needed JavaScript for dynamic relevance, and sets flags about which questions and groups are relevant
string|null
ProcessCurrentResponses()
ProcessRelevance(string $eqn,string $questionNum = null,string $jsResultVar = null,string $type = null,integer $hidden): boolean
string
string
string
string
integer
boolean
ProcessStepString(string $string,array $replacementFields = array(),integer $numRecursionLevels = 3,boolean $static = false): string
string
array
integer
boolean
string
ProcessString(string $string,integer $questionNum = null,array|null $replacementFields = array(),integer $numRecursionLevels = 1,integer $whichPrettyPrintIteration = 1,boolean $noReplacements = false,boolean $timeit = true,boolean $staticReplacement = false): string
string
integer
array|null
integer
integer
boolean
boolean
boolean
string
QuestionIsRelevant(integer $qid): boolean
integer
boolean
resetTempVars()
see | self::FinishProcessPublicPage, @see self::StartProcessingPage ) |
---|---|
RevertUpgradeConditionsToRelevance(integer|null $surveyId = null,integer|null $qid = null): integer
integer|null
integer|null
integer
setCurrentQset(array $val): void
array
SetDirtyFlag(): void
SetEMLanguage(string|null $lang = null): void
string|null
setKnownVars(mixed $val): void
mixed
setPageRelevanceInfo(mixed $info): void
mixed
SetPreviewMode(string|false $previewmode = false): void
string|false
'question', 'group', false
SetRelevanceTo(integer $seq): void
integer
SetSurveyId(integer|null $sid = null)
integer|null
setTempVars(array $vars)
array
SetThisAsAliasForSGQA(string $sgqa): void
string
setValueToKnowVar(string $var,string $value)
string
string
setVariableAndTokenMappingsForExpressionManager(integer $surveyid,boolean|null $forceRefresh = false,boolean|null $anonymized = false): boolean|null
The long part of this function should only be called once per page display (e.g. only if $fieldMap changes)
todo | Keep method as-is but factor out content to new class; add unit tests for class |
---|
integer
boolean|null
boolean|null
boolean|null
SetVariableValue(string $op,string $name,double $value): integer
string
string
double
integer
ShowStackTrace( $msg = null, &$args = null)
ShowSurveyLogicFile(integer $sid,integer|null $gid = null, $qid = null,integer|null $LEMdebugLevel,boolean|null $assessments = null): array
integer
integer|null
integer|null
boolean|null
array
singleton(): \LimeExpressionManager
SplitStringOnExpressions(string $src): array
string
array
StartProcessingGroup(integer|null $gseq = null,boolean|null $anonymized = false,integer|null $surveyid = null,boolean|null $forceRefresh = false): void
integer|null
boolean|null
integer|null
boolean|null
StartProcessingPage(boolean $allOnOnePage = false,boolean $initializeVars = false): void
boolean
boolean
StartSurvey(integer $surveyid,string $surveyMode = 'group',array $aSurveyOptions = null,boolean $forceRefresh = false,integer $debugLevel): array
integer
string
array
boolean
integer
array
SubQuestionIsRelevant(string $sgqa): boolean
string
boolean
UnitTestConvertConditionsToRelevance(integer|null $surveyId = null,integer|null $qid = null): array
integer|null
integer|null
array
of relevance equations, indexed by $qid
UnitTestProcessStringContainingExpressions()
UnitTestRelevance()
updateReplacementFields( $replacementFields)
UpgradeConditionsToRelevance(integer|null $surveyId = null,integer|null $qid = null): array
integer|null
integer|null
array
of query strings
UpgradeQuestionAttributes(boolean|null $changeDB = false,integer|null $iSurveyID = null,integer|null $onlythisqid = null)
boolean|null
integer|null
integer|null
usingCommaAsRadix(): boolean
boolean
instance :\LimeExpressionManager
em :\ExpressionManager
groupRelevanceInfo :array
var |
---|
array
sid :integer
var |
---|
integer
debugLevel :integer
var |
---|
integer
sPreviewMode :string|false
var |
---|
string|false
knownVars :array
Actual variables are stored in this structure: $knownVars[$sgqa] = array( 'jsName_on' => // the name of the javascript variable if it is defined on the current page - often 'answerSGQA' 'jsName' => // the name of the javascript variable when referenced on different pages - usually 'javaSGQA' 'readWrite' => // 'Y' for yes, 'N' for no - currently not used 'hidden' => // 1 if the question attribute 'hidden' is true, otherwise 0 'question' => // the text of the question (or subquestion) 'qid' => // the numeric question id - e.g. the Q part of the SGQA name 'gid' => // the numeric group id - e.g. the G part of the SGQA name 'grelevance' => // the group level relevance string 'relevance' => // the question level relevance string 'qcode' => // the qcode-style variable name for this question (or subquestion) 'qseq' => // the 0-based index of the question within the survey 'gseq' => // the 0-based index of the group within the survey 'type' => // the single character type code for the question 'sgqa' => // the SGQA name for the variable 'ansList' => // ansArray converted to a JavaScript fragment - e.g. ",'answers':{ 'M':'Male','F':'Female'}" 'ansArray' => // PHP array of answer strings, keyed on the answer code = e.g. array['M']='Male'; 'scale_id' => // '0' for most answers. '1' for second scale within dual-scale questions 'rootVarName' => // the root code / name / title for the question, without any subquestion or answer-level suffix. This is from the title column in the questions table 'subqtext' => // the subquestion text 'rowdivid' => // the JavaScript ID of the row identifier for a question. This is used to show/hide entire question rows 'onlynum' => // 1 if only numbers are allowed for this variable. If so, then extra processing is needed to ensure that can use comma as a decimal separator );
Reserved variables (e.g. TOKEN:xxxx) are stored with this structure: $knownVars[$token] = array( 'code' => // the static value for the variable 'type' => // '' 'jsName_on' => // '' 'jsName' => // '' 'readWrite' => // 'N' - since these are always read-only variables );
var |
---|
array
qcode2sgqa :array|null
example | = '38612X10X145' |
---|---|
var |
array|null
tempVars :array
These are typically the LimeReplacement Fields passed in via templatereplace() Each has the following structure: array( 'code' => // the static value of the variable 'jsName_on' => // '' 'jsName' => // '' 'readWrite' => // 'N' );
var |
---|
array
pageRelevanceInfo :array
Within a page, it contains a sequential list of the results of each relevance equation processed array( 'qid' => // question id -- e.g. 154 'gseq' => // 0-based group sequence -- e.g. 2 'eqn' => // the raw relevance equation parsed -- e.g. "!is_empty(p2_sex)" 'result' => // the Boolean result of parsing that equation in the current context -- e.g. 0 'numJsVars' => // the number of dynamic JavaScript variables used in that equation -- e.g. 1 'relevancejs' => // the actual JavaScript to insert for that relevance equation -- e.g. "LEMif(LEManyNA('p2_sex'),'',( ! LEMempty(LEMval('p2_sex') )))" 'relevanceVars' => // a pipe-delimited list of JavaScript variables upon which that equation depends -- e.g. "java38612X12X153" 'jsResultVar' => // the JavaScript variable in which that result will be stored -- e.g. "java38612X12X154" 'type' => // the single character type of the question -- e.g. 'S' 'hidden' => // 1 if the question should always be hidden 'hasErrors' => // 1 if there were parsing errors processing that relevance equation
var |
---|
array
pageTailorInfo :array|null
var | Array of array of information about HTML id to update with javascript function [[ 'questionNum' : question number 'num' : internal number of javascript function 'id' : id of HTML element 'raw' : Raw Expression 'result' : 'vars' : var used in javascript function 'js' : final javascript function ]] |
---|
array|null
allOnOnePage :boolean
var |
---|
boolean
surveyMode :string
var |
---|
string
surveyOptions :array
For example, array( 'rooturl' => // URL prefix needed to be able to click on a syntax-highlighted variable name and have it open the needed editting window 'hyperlinkSyntaxHighlighting' => // true if should be able to click on variables to edit them 'active' => // 0 for inactive, 1 for active survey 'allowsave' => // 0 for do not allow save; 1 for allow save 'anonymized' => // 1 for anonymous 'assessments' => // 1 for use assessments 'datestamp' => // 1 for use date stamps 'ipaddr' => // 1 for capture IP address 'radix' => // '.' for use period as decimal separator; ',' for use comma as decimal separator 'savetimings' => // "Y" if should save survey timings 'startlanguage' => // the starting language -- e.g. 'en' 'surveyls_dateformat' => // the index of the language specific date format -- e.g. 1 'tablename' => // the name of the table storing the survey data, if active -- e.g. lime_survey_38612 'target' => // the path for uploading files -- e.g. '/temp/files/' 'timeadjust' => // the time offset -- e.g. 0 'tempdir' => // the temporary directory for uploading files -- e.g. '/temp/' );
var |
---|
array
qid2code :array
example | = "38612X11X150|38612X11X150other" |
---|---|
var |
array
jsVar2qid :array
example | = '161' |
---|---|
var |
array
qcode2sgq :array
example | = "38612X10X147" = "26626X37X705sq1#1" |
---|---|
var |
array
alias2varName :array
This maps both the SGQA and qcode alias names to the same 2 dimensional array
example | = array( 'jsName' => // the JavaScript variable name used by EM -- e.g. "java38612X11X147" 'jsPart' => // the JavaScript fragment used in EM's ____ array -- e.g. "'p1_sex':'java38612X11X147'" ); = array( 'jsName' => "java26626X37X705sq1#1" 'jsPart' => "'afDS_sq1_1':'java26626X37X705sq1#1'" ); |
---|---|
var |
array
varNameAttr :array
These fragments are used to create the JavaScript varNameAttr array.
example | = "'java38612X11X147':{ 'jsName':'java38612X11X147','jsName_on':'java38612X11X147','sgqa':'38612X11X147','qid':147,'gid':11,'type':'G','default':'','rowdivid':'','onlynum':'','gseq':1,'answers':{ 'M':'Male','F':'Female'}}" = "'java26626X37X705sq1#1':{ 'jsName':'java26626X37X705sq1#1','jsName_on':'java26626X37X705sq1#1','sgqa':'26626X37X705sq1#1','qid':705,'gid':37,'type':'1','default':'','rowdivid':'26626X37X705sq1','onlynum':'','gseq':1,'answers':{ '0~1':'1|Low','0~2':'2|Medium','0~3':'3|High','1~1':'1|Never','1~2':'2|Sometimes','1~3':'3|Always'}}" |
---|---|
var |
array
qans :array
example | = "4|Child" // this means that code 4 in scale 0 has a coded value of 4 and a display value of 'Child' [705]): ['1~2'] = '2|Sometimes' // this means that the second scale for this question uses the coded value of 2 to represent 'Sometimes' TODO - add example from survey using assessments |
---|---|
var |
array
groupId2groupSeq :array
example | = 0 // means that the first group (gseq=0) has gid=10 |
---|---|
var |
array
questionId2questionSeq :array
example | = 13 // means that that 14th question in the survey has qid=157 |
---|---|
var |
array
questionId2groupSeq :array
example | = 2 // means that qid 157 is in the 3rd page of questions (gseq = 2) |
---|---|
var |
array
groupSeqInfo :array
example | = array( 'qstart' => 9 // the first qseq within that group 'qend' => 13 //the last qseq within that group ); |
---|---|
var |
array
gseq2relevanceStatus :array
example | = 0 // means that the third group (gseq==2) is currently irrelevant |
---|---|
var |
array
qid2validationEqn :array
These are grouped by qid then validation type, such as 'value_range', and 'num_answers'
example | = array( 'eqn' => array( 'value_range' = "((is_empty(26626X34X703.NAOK) || 26626X34X703.NAOK >= (0)) and (is_empty(26626X34X703.NAOK) || 26626X34X703.NAOK <= (5)))" ), 'tips' => array( 'value_range' = "Each answer must be between {fixnum(0)} and {fixnum(5)}" ), 'subqValidEqns' = array( [] = array( 'subqValidSelector' => '' // 'subqValidEqn' => "(is_empty(26626X34X703.NAOK) || 26626X34X703.NAOK >= (0)) && (is_empty(26626X34X703.NAOK) || 26626X34X703.NAOK <= (5))" ), 'sumEqn' => '' // the equation to compute the current sum of the responses 'sumRemainingEqn' => '' // the equation to how much is left (for the question attribute that lets you specify the exact value of the sum of the answers) ); |
---|---|
var |
array
questionSeq2relevance :array
example | = array( 'relevance' => "!is_empty(num)" // the question-level relevance equation 'grelevance' => "" // the group-level relevance equation 'qid' => "699" // the question id 'qseq' => 3 // the 0-index question sequence 'gseq' => 0 // the 0-index group sequence 'jsResultVar_on' => 'answer26626X34X699' // the javascript variable holding the input value 'jsResultVar' => 'java26226X34X699' // the javascript variable (often hidden) holding the value to be submitted 'type' => 'N' // the one character question type 'hidden' => 0 // 1 if it should be always_hidden 'gid' => "34" // group id 'mandatory' => 'N' // 'Y' if mandatory, 'S' if soft mandatory 'eqn' => "" // TODO ?? 'help' => "" // the help text 'qtext' => "Enter a larger number than {num}" // the question text 'code' => 'afDS_sq5_1' // the full variable name 'other' => 'N' // whether the question supports the 'other' option - 'Y' if true 'rowdivid' => '2626X37X705sq5' // the javascript id for the row - in this case, the 5th subquestion 'aid' => 'sq5' // the answer id 'sqid' => '791' // the subquestion's qid (only populated for some question types) ); |
---|---|
var |
array
currentGroupSeq :integer
example | |
---|---|
var |
integer
currentQuestionSeq :integer
example | |
---|---|
var |
integer
currentQID :integer
var |
---|
integer
currentQset :array|null
The array has N entries, where N is the number if qids in the Qset. Each has the following contents:
example | = array( 'info' => array() // this is an exact copy of $questionSeq2relevance[$qseq] -- TODO - remove redundancy 'relevant' => 1 // 1 if the question is currently relevant 'hidden' => 0 // 1 if the question is always hidden 'relEqn' => '' // the relevance equation -- TODO - how different from ['info']['relevance']? 'sgqa' => // pipe-separated list of SGQA codes for this question -- e.g. "26626X37X705sq1#0|26626X37X705sq1#1|26626X37X705sq2#0|26626X37X705sq2#1|26626X37X705sq3#0|26626X37X705sq3#1|26626X37X705sq4#0|26626X37X705sq4#1|26626X37X705sq5#0|26626X37X705sq5#1" 'unansweredSQs' => // pipe-separated list of currently unanswered SGQA codes for this question -- e.g. "26626X37X705sq1#0|26626X37X705sq1#1|26626X37X705sq3#0|26626X37X705sq3#1|26626X37X705sq5#0|26626X37X705sq5#1" 'valid' => 0 // 1 if the current answers pass all of the validation criteria for the question 'validEqn' => // the auto-generated validation criteria, based upon advanced question attributes -- e.g. "((count(if(count(26626X37X705sq1#0.NAOK,26626X37X705sq1#1.NAOK)==2,1,''), if(count(26626X37X705sq2#0.NAOK,26626X37X705sq2#1.NAOK)==2,1,''), if(count(26626X37X705sq3#0.NAOK,26626X37X705sq3#1.NAOK)==2,1,''), if(count(26626X37X705sq4#0.NAOK,26626X37X705sq4#1.NAOK)==2,1,''), if(count(26626X37X705sq5#0.NAOK,26626X37X705sq5#1.NAOK)==2,1,'')) >= (minSelect)) and (count(if(count(26626X37X705sq1#0.NAOK,26626X37X705sq1#1.NAOK)==2,1,''), if(count(26626X37X705sq2#0.NAOK,26626X37X705sq2#1.NAOK)==2,1,''), if(count(26626X37X705sq3#0.NAOK,26626X37X705sq3#1.NAOK)==2,1,''), if(count(26626X37X705sq4#0.NAOK,26626X37X705sq4#1.NAOK)==2,1,''), if(count(26626X37X705sq5#0.NAOK,26626X37X705sq5#1.NAOK)==2,1,'')) <= (maxSelect)))" 'prettyValidEqn' => // syntax-highlighted version of validEqn, only showing syntax errors 'validTip' => // html fragment to insert for the validation tip -- e.g. " Please select between 1 and 3 answer(s) "
'prettyValidTip' => // version of validTip that can be parsed by EM to create dynmamic validation -- e.g. "Please select between {fixnum(minSelect)} and {fixnum(maxSelect)} answer(s) "
'validJS' => // JavaScript fragment that can perform validation. This is the result of parsing validEqn -- e.g. "LEMif(LEManyNA('minSelect', 'maxSelect'),'',(((LEMcount(LEMif(LEMcount(LEMval('26626X37X705sq1#0.NAOK') , LEMval('26626X37X705sq1#1.NAOK') ) == 2, 1, ''), LEMif(LEMcount(LEMval('26626X37X705sq2#0.NAOK') , LEMval('26626X37X705sq2#1.NAOK') ) == 2, 1, ''), LEMif(LEMcount(LEMval('26626X37X705sq3#0.NAOK') , LEMval('26626X37X705sq3#1.NAOK') ) == 2, 1, ''), LEMif(LEMcount(LEMval('26626X37X705sq4#0.NAOK') , LEMval('26626X37X705sq4#1.NAOK') ) == 2, 1, ''), LEMif(LEMcount(LEMval('26626X37X705sq5#0.NAOK') , LEMval('26626X37X705sq5#1.NAOK') ) == 2, 1, '')) >= (LEMval('minSelect') )) && (LEMcount(LEMif(LEMcount(LEMval('26626X37X705sq1#0.NAOK') , LEMval('26626X37X705sq1#1.NAOK') ) == 2, 1, ''), LEMif(LEMcount(LEMval('26626X37X705sq2#0.NAOK') , LEMval('26626X37X705sq2#1.NAOK') ) == 2, 1, ''), LEMif(LEMcount(LEMval('26626X37X705sq3#0.NAOK') , LEMval('26626X37X705sq3#1.NAOK') ) == 2, 1, ''), LEMif(LEMcount(LEMval('26626X37X705sq4#0.NAOK') , LEMval('26626X37X705sq4#1.NAOK') ) == 2, 1, ''), LEMif(LEMcount(LEMval('26626X37X705sq5#0.NAOK') , LEMval('26626X37X705sq5#1.NAOK') ) == 2, 1, '')) <= (LEMval('maxSelect') )))))"
'invalidSQs' => // current list of subquestions that fail validation criteria -- e.g. "26626X37X705sq1#0|26626X37X705sq1#1|26626X37X705sq2#0|26626X37X705sq2#1|26626X37X705sq3#0|26626X37X705sq3#1|26626X37X705sq4#0|26626X37X705sq4#1|26626X37X705sq5#0|26626X37X705sq5#1"
'relevantSQs' => // current list of subquestions that are relevant -- e.g. "26626X37X705sq1#0|26626X37X705sq1#1|26626X37X705sq2#0|26626X37X705sq2#1|26626X37X705sq3#0|26626X37X705sq3#1|26626X37X705sq4#0|26626X37X705sq4#1|26626X37X705sq5#0|26626X37X705sq5#1"
'irrelevantSQs' => // current list of subquestions that are irrelevant -- e.g. "26626X37X705sq2#0|26626X37X705sq2#1|26626X37X705sq4#0|26626X37X705sq4#1"
'subQrelEqn' => // TODO - ??
'mandViolation' => 0 // 1 if the question is mandatory and fails the mandatory criteria
'anyUnanswered' => 1 // 1 if any parts of the question are unanswered
'mandTip' => '' // message to display if the question fails mandatory criteria
'message' => '' // TODO ??
'updatedValues' => // array of values that should be updated for this question, as [$sgqa] = $value
'sumEqn' => '' //
'sumRemainingEqn' => '' //
); |
---|---|
var |
array|null
lastMoveResult :array|null
example | array( 'finished' => 0 // 1 if the survey has been completed and needs to be finalized 'message' => '' // any error message that needs to be displayed 'seq' => 1 // the sequence count, using gseq, or qseq units if in 'group' or 'question' mode, respectively 'mandViolation' => 0 // whether there was any violation of mandatory constraints in the last movement 'valid' => 0 // 1 if the last movement passed all validation constraints. 0 if there were any validation errors 'unansweredSQs' => // pipe-separated list of any subquestions that were not answered 'invalidSQs' => // pipe-separated list of any subquestions that failed validation constraints ); |
---|---|
var |
array|null
indexQseq :array
example | = array( 'qid' => "700" // the question id 'qtext' => 'How old are you?' // the question text 'qcode' => 'age' // the variable name 'qhelp' => '' // the help text 'anyUnanswered' => 0 // 1 if there are any subquestions answered. Used for index display 'anyErrors' => 0 // 1 if there are any errors among the subquestions. Could be used for index display 'show' => 1 // 1 if there are any relevant, non-hidden subquestions. Only if so, then display the index entry 'gseq' => 0 // the group sequence 'gtext' => // text description for the group 'gname' => 'G1' // the group title 'gid' => "34" // the group id 'mandViolation' => 0 // 1 if the question as a whole fails the mandatory criteria 'valid' => 1 // 0 if any part of the question fails validation criteria. ); |
---|---|
var |
array
indexGseq :array
example | = array( 'gtext' => // the description for the group 'gname' => 'G1' // the group title 'gid' => '34' // the group id 'anyUnanswered' => 0 // 1 if any questions within the group are unanswered 'anyErrors' => 0 // 1 if any of the questions within the group fail either validity or mandatory constraints 'valid' => 1 // 1 if at least question in the group is relevant and non-hidden 'mandViolation' => 0 // 1 if at least one relevant, non-hidden question in the group fails mandatory constraints 'show' => 1 // 1 if there is at least one relevant, non-hidden question within the group ); |
---|---|
var |
array
gseq2info :array
example | = array( 'group_order' => 0 // gseq 'gid' => "34" // group id 'group_name' => 'G2' // the group title 'description' => // the description of the group (e.g. gtitle) 'grelevance' => '' // the group-level relevance ); |
---|---|
var |
array
maxGroupSeq :integer
var |
---|
integer
maxQuestionSeq :integer
In question by question mode : $maxQuestionSeq==$SESSION['survey'.surveyid]['maxstep'], use it ?
var |
---|
integer
q2subqInfo :array
One entry per question, indexed on qid
example | = array( 'qid' => 702 // the question id 'qseq' => 6 // the question sequence 'gseq' => 0 // the group sequence 'sgqa' => '26626X34X702' // the root of the SGQA code (reallly just the SGQ) 'varName' => 'afSrcFilter_sq1' // the full qcode variable name - note, if there are subquestions, don't use this one. 'type' => 'M' // the one-letter question type 'fieldname' => '26626X34X702sq1' // the fieldname (used as JavaScript variable name, and also as database column name 'rootVarName' => 'afDS' // the root variable name 'preg' => '/[A-Z]+/' // regular expression validation equation, if any 'subqs' => array() of subquestions, where each contains: 'rowdivid' => '26626X34X702sq1' // the javascript id identifying the question row (so array_filter can hide rows) 'varName' => 'afSrcFilter_sq1' // the full variable name for the subquestion 'jsVarName_on' => 'java26626X34X702sq1' // the JavaScript variable name if the variable is defined on the current page 'jsVarName' => 'java26626X34X702sq1' // the JavaScript variable name to use if the variable is defined on a different page 'csuffix' => 'sq1' // the SGQ suffix to use for a fieldname 'sqsuffix' => '_sq1' // the suffix to use for a qcode variable name ); |
---|---|
var |
array
qattr :array
example | = array( 'array_filter_exclude' => 'afSrcFilter' 'exclude_all_others' => 'sq5' 'max_answers' => '3' 'min_answers' => '1' 'other_replace_text' => '{afSrcFilter_other}' ); |
---|---|
var |
array
subQrelInfo :array
example | = array( 'qid' => '708' // the question id 'eqn' => "((26626X34X702sq2 != ''))" // the auto-generated subquestion-level relevance equation 'prettyPrintEqn' => '' // only generated if there errors - shows syntax highlighting of them 'result' => 0 // result of processing the subquestion-level relevance equation in the current context 'numJsVars' => 1 // the number of on-page javascript variables in 'eqn' 'relevancejs' => // the generated javascript from 'eqn' -- e.g. "LEMif(LEManyNA('26626X34X702sq2'),'',(((LEMval('26626X34X702sq2') != ""))))" 'relevanceVars' => "java26626X34X702sq2" // the pipe-separated list of on-page javascript variables in 'eqn' 'rowdivid' => "26626X37X708sq2" // the javascript id of the question row (so can apply array_filter) 'type' => 'array_filter' // semicolon delimited list of types of subquestion relevance filters applied 'qtype' => 'A' // the single character question type 'sgqa' => "26626X37X708" // the SGQ portion of the fieldname 'hasErrors' => 0 // 1 if there are any parse errors in the subquestion validation equations ); |
---|---|
var |
array
gRelInfo :array
example | = array( 'gseq' => 1 // group sequence 'eqn' => '' // the group-level relevance 'result' => 1 // result of processing the group-level relevance 'numJsVars' => 0 // the number of on-page javascript variables in the group-level relevance equation 'relevancejs' => '' // the javascript version of the relevance equation 'relevanceVars' => '' // the pipe-delimited list of on-page javascript variable names used within the group-level relevance equation 'prettyPrint' => '' // a pretty-print version of the group-level relevance equation, only if there are errors ); |
---|---|
var |
array
runtimeTimings :array
Array of timing information (in seconds) for EM to help with debugging
example | = array( [0]="LimeExpressionManager::NavigateForwards" [1]=1.7079849243164 ); |
---|---|
var |
array
initialized :boolean
var |
---|
boolean
processedRelevance :boolean
var |
---|
boolean
debugTimingMsg :string
var |
---|
string
ParseResultCache :array
example | = array( 'result' => 1 // result of processing the equation in the current scope 'prettyPrint' => '' // syntax-highlighted version of equation if there are any errors 'hasErrors' => 0 // 1 if there are any syntax errors ); |
---|---|
var |
array
multiflexiAnswers :array
example | = array( '1~1' => '1|Never', '1~2' => '2|Sometimes', '1~3' => '3|Always' ); |
---|---|
var |
array
sgqaNaming :Boolean
var |
---|
Boolean
numGroups :integer
var |
---|
integer
numQuestions :integer
var |
---|
integer
sessid :string
var |
---|
string
qrootVarName2arrayFilter :array
var |
---|
array
qid2exclusiveAuto :array
var |
---|
array
invalidAnswerString :array<mixed,string>
...)
var |
---|
array<mixed,string>
updatedValues :array
var |
---|
array