4 require_once
'Services/Xml/classes/class.ilSaxParser.php';
5 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionSkillAssignment.php';
6 require_once
'Modules/TestQuestionPool/classes/questions/class.ilAssQuestionSkillAssignmentImportList.php';
51 $this->parsingActive =
false;
52 $this->characterDataBuffer = null;
53 $this->curQuestionId = null;
54 $this->curAssignment = null;
55 $this->curExpression = null;
57 return parent::__construct($xmlFile);
89 $this->characterDataBuffer =
'';
97 $this->characterDataBuffer .= $characterData;
158 xml_set_object($xmlParser, $this);
159 xml_set_element_handler($xmlParser,
'handlerBeginTag',
'handlerEndTag');
160 xml_set_character_data_handler($xmlParser,
'handlerCharacterData');
165 if ($tagName !=
'QuestionSkillAssignments' && !$this->
isParsingActive()) {
170 case 'QuestionSkillAssignments':
174 case 'TriggerQuestion':
178 case 'TriggeredSkill':
181 $assignment->setImportSkillBaseId((
int) $tagAttributes[
'BaseId']);
182 $assignment->setImportSkillTrefId((
int) $tagAttributes[
'TrefId']);
183 $assignment->initImportSolutionComparisonExpressionList();
187 case 'OriginalSkillTitle':
191 case 'OriginalSkillPath':
195 case 'EvalByQuestionResult':
200 case 'EvalByQuestionSolution':
204 case 'SolutionComparisonExpression':
206 $expression->setPoints((
int) $tagAttributes[
'Points']);
207 $expression->setOrderIndex((
int) $tagAttributes[
'Index']);
221 case 'QuestionSkillAssignments':
225 case 'TriggerQuestion':
229 case 'TriggeredSkill':
234 case 'OriginalSkillTitle':
239 case 'OriginalSkillPath':
244 case 'EvalByQuestionResult':
247 case 'EvalByQuestionSolution':
250 case 'SolutionComparisonExpression':
265 if ($charData !=
"\n") {
267 $charData = preg_replace(
"/\t+/",
" ", $charData);
setCurQuestionId($curQuestionId)
setCurExpression($curExpression)
handlerCharacterData($xmlParser, $charData)
resetCharacterDataBuffer()
handlerEndTag($xmlParser, $tagName)
setParsingActive($parsingActive)
Base class for sax-based expat parsing extended classes need to overwrite the method setHandlers and ...
appendToCharacterDataBuffer($characterData)
setCurAssignment($curAssignment)
handlerBeginTag($xmlParser, $tagName, $tagAttributes)
const EVAL_MODE_BY_QUESTION_SOLUTION
const EVAL_MODE_BY_QUESTION_RESULT