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() )
172 case 'QuestionSkillAssignments':
176 case 'TriggerQuestion':
180 case 'TriggeredSkill':
183 $assignment->setImportSkillBaseId((
int)$tagAttributes[
'BaseId']);
184 $assignment->setImportSkillTrefId((
int)$tagAttributes[
'TrefId']);
185 $assignment->initImportSolutionComparisonExpressionList();
189 case 'OriginalSkillTitle':
193 case 'OriginalSkillPath':
197 case 'EvalByQuestionResult':
202 case 'EvalByQuestionSolution':
206 case 'SolutionComparisonExpression':
208 $expression->setPoints((
int)$tagAttributes[
'Points']);
209 $expression->setOrderIndex((
int)$tagAttributes[
'Index']);
225 case 'QuestionSkillAssignments':
229 case 'TriggerQuestion':
233 case 'TriggeredSkill':
238 case 'OriginalSkillTitle':
243 case 'OriginalSkillPath':
248 case 'EvalByQuestionResult':
251 case 'EvalByQuestionSolution':
254 case 'SolutionComparisonExpression':
270 if( $charData !=
"\n" )
273 $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