questionId2questionSeq[$questionNum]) ? $this->questionId2questionSeq[$questionNum] : -1; $groupSeq = isset($this->questionId2groupSeq[$questionNum]) ? $this->questionId2groupSeq[$questionNum] : -1; } $stringToParse = htmlspecialchars_decode($eqn,ENT_QUOTES); $result = $this->em->ProcessBooleanExpression($stringToParse,$groupSeq, $questionSeq); $hasErrors = $this->em->HasErrors(); $prettyPrint = ''; if (($this->debugLevel & LEM_PRETTY_PRINT_ALL_SYNTAX) == LEM_PRETTY_PRINT_ALL_SYNTAX) { $prettyPrint= $this->em->GetPrettyPrintString(); } if (!is_null($questionNum)) { $jsVars = $this->em->GetJSVarsUsed(); if(count ($jsVars)){ $relevanceVars = implode('|',$this->em->GetJSVarsUsed()); $relevanceJS = $this->em->GetJavaScriptEquivalentOfExpression(); if (!isset($this->subQrelInfo[$questionNum])) { $this->subQrelInfo[$questionNum] = array(); } $this->subQrelInfo[$questionNum][$rowdivid] = array( 'qid' => $questionNum, 'eqn' => $eqn, 'prettyPrintEqn' => $prettyPrint, 'result' => $result, 'numJsVars' => count($jsVars), 'relevancejs' => $relevanceJS, 'relevanceVars' => $relevanceVars, 'rowdivid' => $rowdivid, 'type'=>$type, 'qtype'=>$qtype, 'sgqa'=>$sgqa, 'hasErrors'=>$hasErrors, ); } else { $this->subQrelInfo[$questionNum][$rowdivid] = false; } } return $result; }