3 require_once
"Modules/TestQuestionPool/classes/questions/LogicalAnswerCompare/Expressions/ilAssLacResultOfAnswerOfQuestionExpression.php";
4 require_once
"Modules/TestQuestionPool/classes/questions/LogicalAnswerCompare/Exception/ilAssLacExpressionNotSupportedByQuestion.php";
5 require_once
"Modules/TestQuestionPool/classes/questions/LogicalAnswerCompare/Exception/ilAssLacQuestionNotExist.php";
6 require_once
"Modules/TestQuestionPool/classes/questions/LogicalAnswerCompare/Exception/ilAssLacOperatorNotSupportedByExpression.php";
7 require_once
"Modules/TestQuestionPool/classes/questions/LogicalAnswerCompare/Exception/ilAssLacUnsupportedExpression.php";
8 require_once
"Modules/TestQuestionPool/classes/questions/LogicalAnswerCompare/Exception/ilAssLacUnsupportedOperation.php";
9 require_once
"Modules/TestQuestionPool/classes/questions/LogicalAnswerCompare/Exception/ilAssLacAnswerIndexNotExist.php";
10 require_once
"Modules/TestQuestionPool/classes/questions/LogicalAnswerCompare/Exception/ilAssLacQuestionNotReachable.php";
11 require_once
"Modules/TestQuestionPool/classes/questions/LogicalAnswerCompare/Exception/ilAssLacAnswerValueNotExist.php";
12 require_once
"Modules/TestQuestionPool/classes/questions/LogicalAnswerCompare/Exception/ilAssLacUnableToParseCondition.php";
13 require_once
"Modules/TestQuestionPool/classes/questions/LogicalAnswerCompare/Exception/ilAssLacDuplicateElement.php";
42 if(count($composite->nodes) > 0)
44 $this->
validate($composite->nodes[0]);
45 $this->
validate($composite->nodes[1]);
57 $question_expression = $composite->nodes[0];
58 $answer_expression = $composite->nodes[1];
59 $question_index = $composite->nodes[0]->getQuestionIndex();
61 $question = $this->object_loader->getQuestion($question_index);
68 $answer_index = $question_expression->getAnswerIndex()-1;
83 foreach($answer_expression->getOrdering() as $order)
86 foreach($answer_expression->getOrdering() as $element)
88 if($element == $order)
101 if($question instanceof assClozeTest)
103 $this->
validateClozeTest($answer_index, $question, $answer_expression, $question_index);
117 ($composite->nodes[0] instanceof ilAssLacExpressionInterface &&
119 ($composite->nodes[0] instanceof ilAssLacSolutionExpressionInterface)
134 private function validateClozeTest($answer_index, $question, $answer_expression, $question_index)
136 if($answer_index !== null)
138 $options = $question->getAvailableAnswerOptions($answer_index);
153 if($answer_expression instanceof ilAssLacStringResultExpression)
155 foreach(
$options->getItems($this->getNonShuffler()) as $item)
157 if($item->getAnswertext() == $answer_expression->getText())
166 foreach(
$options->getItems($question->getShuffler()) as $item)
168 if($item->getOrder() == $answer_expression->getNumericValue()-1)
204 $answer_options = $question->getAvailableAnswerOptions($answer_index);
205 if($answer_options == null)
219 if($question == null)
254 if(!in_array($answer_expression::$identifier, $expressions))
269 if(!in_array($pattern, $operators))
277 require_once
'Services/Randomization/classes/class.ilArrayElementOrderKeeper.php';
checkOperatorExistForExpression($operators, $answer_expression, $pattern)
validate(ilAssLacAbstractComposite $composite)
Class for horizontal ordering questions.
Class ResultOfAnswerOfCurrentQuestion for the expression R[m].
Class ResultOfAnswerOfQuestion for the expression Qn[m].
validateClozeTest($answer_index, $question, $answer_expression, $question_index)
Class EmptyAnswerExpression.
Class StringResultExpression for the expression ~TEXT~.
validateSubTree(ilAssLacAbstractComposite $composite)
__construct($object_loader)
checkAnswerExpressionExist($expressions, $answer_expression, $question_index)
Class NumericResultExpression for the expression n#.
Class CompositeValidator.
if(!is_array($argv)) $options
Class QuestionExpressionInterface.
Class SolutionExpressionInterface.
Class NumberOfResultExpression fot the expression +n+.
isResultOfAnswerExpression($expression)
checkQuestionExists($question, $index)
Class for ordering questions.
Class PercentageResultExpression for the expression n%.
Class ExpressionInterface.
checkIfAnswerIndexOfQuestionExists($question, $question_index, $answer_index)
Class OrderingResultExpression for the expression $a,..,n,m$.