3require_once
"Modules/TestQuestionPool/classes/questions/LogicalAnswerCompare/Expressions/ilAssLacResultOfAnswerOfQuestionExpression.php";
4require_once
"Modules/TestQuestionPool/classes/questions/LogicalAnswerCompare/Exception/ilAssLacExpressionNotSupportedByQuestion.php";
5require_once
"Modules/TestQuestionPool/classes/questions/LogicalAnswerCompare/Exception/ilAssLacQuestionNotExist.php";
6require_once
"Modules/TestQuestionPool/classes/questions/LogicalAnswerCompare/Exception/ilAssLacOperatorNotSupportedByExpression.php";
7require_once
"Modules/TestQuestionPool/classes/questions/LogicalAnswerCompare/Exception/ilAssLacUnsupportedExpression.php";
8require_once
"Modules/TestQuestionPool/classes/questions/LogicalAnswerCompare/Exception/ilAssLacUnsupportedOperation.php";
9require_once
"Modules/TestQuestionPool/classes/questions/LogicalAnswerCompare/Exception/ilAssLacAnswerIndexNotExist.php";
10require_once
"Modules/TestQuestionPool/classes/questions/LogicalAnswerCompare/Exception/ilAssLacQuestionNotReachable.php";
11require_once
"Modules/TestQuestionPool/classes/questions/LogicalAnswerCompare/Exception/ilAssLacAnswerValueNotExist.php";
12require_once
"Modules/TestQuestionPool/classes/questions/LogicalAnswerCompare/Exception/ilAssLacUnableToParseCondition.php";
13require_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)
103 $this->
validateClozeTest($answer_index, $question, $answer_expression, $question_index);
134 private function validateClozeTest($answer_index, $question, $answer_expression, $question_index)
136 if($answer_index !==
null)
138 $options = $question->getAvailableAnswerOptions($answer_index);
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';
Class for horizontal ordering questions.
Class for ordering questions.
Class CompositeValidator.
validateSubTree(ilAssLacAbstractComposite $composite)
validateClozeTest($answer_index, $question, $answer_expression, $question_index)
isResultOfAnswerExpression($expression)
__construct($object_loader)
validate(ilAssLacAbstractComposite $composite)
checkQuestionExists($question, $index)
checkAnswerExpressionExist($expressions, $answer_expression, $question_index)
checkOperatorExistForExpression($operators, $answer_expression, $pattern)
checkIfAnswerIndexOfQuestionExists($question, $question_index, $answer_index)
Class EmptyAnswerExpression.
Class NumberOfResultExpression fot the expression +n+.
Class NumericResultExpression for the expression #n#.
Class OrderingResultExpression for the expression $a,..,n,m$.
Class PercentageResultExpression for the expression n%.
Class ResultOfAnswerOfCurrentQuestion for the expression R[m].
Class ResultOfAnswerOfQuestion for the expression Qn[m].
Class StringResultExpression for the expression ~TEXT~.
Class ExpressionInterface.
Class QuestionExpressionInterface.
Class SolutionExpressionInterface.
if(!is_array($argv)) $options