ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
SurveyImportParserPre38 Class Reference

Survey Question Import Parser. More...

+ Inheritance diagram for SurveyImportParserPre38:
+ Collaboration diagram for SurveyImportParserPre38:

Public Member Functions

 SurveyImportParserPre38 ($a_spl_id, $a_xml_file='', $spl_exists=FALSE)
 Constructor. More...
 
 setSurveyObject (&$a_svy)
 Sets a reference to a survey object public. More...
 
 setHandlers ($a_xml_parser)
 set event handler should be overwritten by inherited class private More...
 
 startParsing ()
 start the parser More...
 
 parse ($a_xml_parser, $a_fp=null)
 parse xml file More...
 
 getParent ($a_xml_parser)
 
 handlerBeginTag ($a_xml_parser, $a_name, $a_attribs)
 handler for begin of element More...
 
 handlerCharacterData ($a_xml_parser, $a_data)
 handler for character data More...
 
 handlerEndTag ($a_xml_parser, $a_name)
 handler for end of element More...
 
 getErrorCode ()
 
 getErrorLine ()
 
 getErrorColumn ()
 
 getErrorMessage ()
 
 getFullError ()
 
 getXMLSize ()
 
 getXMLElements ()
 
 getXMLAttributes ()
 
 getXMLTextSections ()
 
 getXMLTextSize ()
 
 hasError ()
 
- Public Member Functions inherited from ilSaxParser
 ilSaxParser ($a_xml_file='', $throwException=false)
 Constructor setup ILIAS global object public. More...
 
 setXMLContent ($a_xml_content)
 
 getXMLContent ()
 
 getInputType ()
 
 startParsing ()
 stores xml data in array More...
 
 createParser ()
 create parser More...
 
 setOptions ($a_xml_parser)
 set parser options More...
 
 setHandlers ($a_xml_parser)
 set event handler should be overwritten by inherited class private More...
 
 openXMLFile ()
 open xml file More...
 
 parse ($a_xml_parser, $a_fp=null)
 parse xml file More...
 
 freeParser ($a_xml_parser)
 free xml parser handle More...
 
 setThrowException ($throwException)
 set error handling More...
 
- Public Member Functions inherited from PEAR
 PEAR ($error_class=null)
 Constructor. More...
 
 _PEAR ()
 Destructor (the emulated type of...). More...
 
getStaticProperty ($class, $var)
 If you have a class that's mostly/entirely static, and you need static properties, you can use this method to simulate them. More...
 
 registerShutdownFunc ($func, $args=array())
 Use this function to register a shutdown method for static classes. More...
 
 isError ($data, $code=null)
 Tell whether a value is a PEAR error. More...
 
 setErrorHandling ($mode=null, $options=null)
 Sets how errors generated by this object should be handled. More...
 
 expectError ($code=' *')
 This method is used to tell which errors you expect to get. More...
 
 popExpect ()
 This method pops one element off the expected error codes stack. More...
 
 _checkDelExpect ($error_code)
 This method checks unsets an error code if available. More...
 
 delExpect ($error_code)
 This method deletes all occurences of the specified element from the expected error codes stack. More...
 
raiseError ($message=null, $code=null, $mode=null, $options=null, $userinfo=null, $error_class=null, $skipmsg=false)
 This method is a wrapper that returns an instance of the configured error class with this object's default error handling applied. More...
 
throwError ($message=null, $code=null, $userinfo=null)
 Simpler form of raiseError with fewer options. More...
 
 staticPushErrorHandling ($mode, $options=null)
 
 staticPopErrorHandling ()
 
 pushErrorHandling ($mode, $options=null)
 Push a new error handler on top of the error handler options stack. More...
 
 popErrorHandling ()
 Pop the last error handler used. More...
 
 loadExtension ($ext)
 OS independant PHP extension load. More...
 

Data Fields

 $path
 
 $depth
 
 $activequestion
 
 $spl
 
 $error_code
 
 $error_line
 
 $error_col
 
 $error_msg
 
 $has_error
 
 $size
 
 $elements
 
 $attributes
 
 $texts
 
 $text_size
 
 $characterbuffer
 
 $activetag
 
 $material
 
 $metadata
 
 $responses
 
 $response_id
 
 $matrix
 
 $is_matrix
 
 $adjectives
 
 $spl_exists
 
 $in_survey
 
 $survey
 
 $anonymisation
 
 $surveyaccess
 
 $questions
 
 $original_question_id
 
 $constraints
 
 $textblock
 
 $textblocks
 
 $in_questionblock
 
 $questionblock
 
 $questionblocks
 
 $questionblocktitle
 
 $question_title
 
 $in_question
 
 $in_reponse
 
 $question_description
 
- Data Fields inherited from ilSaxParser
 $input_type = null
 
 $xml_content = ''
 
 $ilias
 
 $lng
 
 $xml_file
 
 $throwException = false
 
- Data Fields inherited from PEAR
 $_debug = false
 
 $_default_error_mode = null
 
 $_default_error_options = null
 
 $_default_error_handler = ''
 
 $_error_class = 'PEAR_Error'
 
 $_expected_errors = array()
 

Additional Inherited Members

- Protected Member Functions inherited from ilSaxParser
 handleError ($message, $code)
 use given error handler to handle error message or internal ilias error message handle More...
 

Detailed Description

Survey Question Import Parser.

Author
Helmut Schottmüller helmu.nosp@m.t.sc.nosp@m.hottm.nosp@m.uell.nosp@m.er@ma.nosp@m.c.co.nosp@m.m
Version
$Id$

Definition at line 43 of file class.SurveyImportParserPre38.php.

Member Function Documentation

◆ getErrorCode()

SurveyImportParserPre38::getErrorCode ( )

Definition at line 680 of file class.SurveyImportParserPre38.php.

References $error_code.

◆ getErrorColumn()

SurveyImportParserPre38::getErrorColumn ( )

Definition at line 690 of file class.SurveyImportParserPre38.php.

References $error_col.

◆ getErrorLine()

SurveyImportParserPre38::getErrorLine ( )

Definition at line 685 of file class.SurveyImportParserPre38.php.

References $error_line.

◆ getErrorMessage()

SurveyImportParserPre38::getErrorMessage ( )

Definition at line 695 of file class.SurveyImportParserPre38.php.

References $error_msg.

◆ getFullError()

SurveyImportParserPre38::getFullError ( )

Definition at line 700 of file class.SurveyImportParserPre38.php.

References $error_col.

701  {
702  return "Error: ".$this->error_msg." at line:".$this->error_line ." column:".$this->error_col;
703  }

◆ getParent()

SurveyImportParserPre38::getParent (   $a_xml_parser)

Definition at line 194 of file class.SurveyImportParserPre38.php.

Referenced by handlerEndTag().

195  {
196  if ($this->depth[$a_xml_parser] > 0)
197  {
198  return $this->path[$this->depth[$a_xml_parser]-1];
199  }
200  else
201  {
202  return "";
203  }
204  }
+ Here is the caller graph for this function:

◆ getXMLAttributes()

SurveyImportParserPre38::getXMLAttributes ( )

Definition at line 715 of file class.SurveyImportParserPre38.php.

References $attributes.

◆ getXMLElements()

SurveyImportParserPre38::getXMLElements ( )

Definition at line 710 of file class.SurveyImportParserPre38.php.

References $elements.

◆ getXMLSize()

SurveyImportParserPre38::getXMLSize ( )

Definition at line 705 of file class.SurveyImportParserPre38.php.

References $size.

◆ getXMLTextSections()

SurveyImportParserPre38::getXMLTextSections ( )

Definition at line 720 of file class.SurveyImportParserPre38.php.

References $texts.

◆ getXMLTextSize()

SurveyImportParserPre38::getXMLTextSize ( )

Definition at line 725 of file class.SurveyImportParserPre38.php.

References $text_size.

◆ handlerBeginTag()

SurveyImportParserPre38::handlerBeginTag (   $a_xml_parser,
  $a_name,
  $a_attribs 
)

handler for begin of element

Definition at line 209 of file class.SurveyImportParserPre38.php.

210  {
211  $this->depth[$a_xml_parser]++;
212  $this->path[$this->depth[$a_xml_parser]] = strtolower($a_name);
213  $this->characterbuffer = "";
214  $this->activetag = $a_name;
215  $this->elements++;
216  $this->attributes+=count($a_attribs);
217  switch ($a_name)
218  {
219  case "survey":
220  $this->in_survey = TRUE;
221  if (is_object($this->survey))
222  {
223  if (strlen($a_attribs["title"]))
224  {
225  $this->survey->setTitle($a_attribs["title"]);
226  }
227  }
228  break;
229  case "section":
230  //$this->spl->setTitle($a_attribs["title"]);
231  break;
232  case "item":
233  $this->original_question_id = $a_attribs["ident"];
234  $this->question_title = $a_attribs["title"];
235  $this->in_question = TRUE;
236  break;
237  case "qtimetadata":
238  $this->metadata = array();
239  break;
240  case "qtimetadatafield":
241  array_push($this->metadata, array("label" => "", "entry" => ""));
242  break;
243  case "material":
244  $this->material = array();
245  array_push($this->material, array("text" => "", "image" => "", "label" => $a_attribs["label"]));
246  break;
247  case "render_fib":
248  if (is_object($this->activequestion))
249  {
250  if (strlen($a_attribs["minnumber"]))
251  {
252  $this->activequestion->setMinimum($a_attribs["minnumber"]);
253  }
254  if (strlen($a_attribs["maxnumber"]))
255  {
256  $this->activequestion->setMaximum($a_attribs["maxnumber"]);
257  }
258  }
259  break;
260  case "response_lid":
261  if (is_object($this->activequestion))
262  {
263  if (strcmp($this->activequestion->getQuestiontype(), "SurveyNominalQuestion") == 0)
264  {
265  switch (strtolower($a_attribs["rcardinality"]))
266  {
267  case "single":
268  $this->activequestion->setSubtype(1);
269  break;
270  case "multiple":
271  $this->activequestion->setSubtype(2);
272  break;
273  }
274  }
275  }
276  break;
277  case "response_label":
278  $this->in_response = TRUE;
279  break;
280  }
281  }

◆ handlerCharacterData()

SurveyImportParserPre38::handlerCharacterData (   $a_xml_parser,
  $a_data 
)

handler for character data

Definition at line 286 of file class.SurveyImportParserPre38.php.

References $characterbuffer.

287  {
288  $this->texts++;
289  $this->text_size+=strlen($a_data);
290  $this->characterbuffer .= $a_data;
291  $a_data = $this->characterbuffer;
292  }

◆ handlerEndTag()

SurveyImportParserPre38::handlerEndTag (   $a_xml_parser,
  $a_name 
)

handler for end of element

Definition at line 297 of file class.SurveyImportParserPre38.php.

References $characterbuffer, $data, $original_question_id, getParent(), METRIC_QUESTION_IDENTIFIER, NOMINAL_QUESTION_IDENTIFIER, ORDINAL_QUESTION_IDENTIFIER, and TEXT_QUESTION_IDENTIFIER.

298  {
299  switch ($a_name)
300  {
301  case "questestinterop":
302  if (is_object($this->survey))
303  {
304  // write constraints
305  if (count($this->constraints))
306  {
307  $relations = $this->survey->getAllRelations(TRUE);
308  foreach ($this->constraints as $constraint)
309  {
310  $this->survey->addConstraint($this->questions[$constraint["sourceref"]], $this->questions[$constraint["destref"]], $relations[$constraint["relation"]]["id"], $constraint["value"]);
311  }
312  }
313  // write question blocks
314  if (count($this->questionblocks))
315  {
316  foreach ($this->questionblocks as $data)
317  {
318  $questionblock = $data["questions"];
319  $title = $data["title"];
320  $qblock = array();
321  foreach ($questionblock as $question_id)
322  {
323  array_push($qblock, $this->questions[$question_id]);
324  }
325  $this->survey->createQuestionblock($title, TRUE, $qblock);
326  }
327  }
328  $this->survey->saveToDb();
329 
330  // write textblocks
331  if (count($this->textblocks))
332  {
333  foreach ($this->textblocks as $original_id => $textblock)
334  {
335  $this->survey->saveHeading($textblock, $this->questions[$original_id]);
336  }
337  }
338  }
339  break;
340  case "survey":
341  $this->in_survey = FALSE;
342  break;
343  case "item":
344  if (is_object($this->activequestion))
345  {
346  $this->activequestion->setTitle($this->question_title);
347  $this->activequestion->setDescription($this->question_description);
348  $this->activequestion->saveToDb();
349  if (is_object($this->survey))
350  {
351  // duplicate the question for the survey
352  $question_id = $this->activequestion->duplicate(TRUE);
353  $this->survey->addQuestion($question_id);
354  $this->questions[$this->original_question_id] = $question_id;
355  }
356  }
357  $this->in_question = FALSE;
358  $this->question_description = "";
359  $this->activequestion = NULL;
360  break;
361  case "qticomment":
362  if (strcmp($this->getParent($a_xml_parser), "item") == 0)
363  {
364  if (preg_match("/Questiontype\=(.*)/", $this->characterbuffer, $matches))
365  {
366  $questiontype = $matches[1];
367  switch ($matches[1])
368  {
370  $questiontype = "SurveyMetricQuestion";
371  break;
373  $questiontype = "SurveyMultipleChoiceQuestion";
374  break;
376  $questiontype = "SurveySingleChoiceQuestion";
377  break;
379  $questiontype = "SurveyTextQuestion";
380  break;
381  }
382  if (strlen($questiontype))
383  {
384  include_once "./Modules/SurveyQuestionPool/classes/class.$questiontype.php";
385  $this->activequestion = new $questiontype();
386  $this->activequestion->setObjId($this->spl_id);
387  }
388  else
389  {
390  $this->activequestion = NULL;
391  }
392  }
393  else if (preg_match("/Author\=(.*)/", $this->characterbuffer, $matches))
394  {
395  if (is_object($this->activequestion))
396  {
397  $this->activequestion->setAuthor($matches[1]);
398  }
399  }
400  else if (preg_match("/ILIAS Version\=(.*)/", $this->characterbuffer, $matches))
401  {
402  }
403  else
404  {
405  $this->question_description = $this->characterbuffer;
406  }
407  }
408  if (strcmp($this->getParent($a_xml_parser), "survey") == 0)
409  {
410  if (preg_match("/Author\=(.*)/", $this->characterbuffer, $matches))
411  {
412  if (is_object($this->survey))
413  {
414  $this->survey->setAuthor($matches[1]);
415  }
416  }
417  else if (preg_match("/ILIAS Version\=(.*)/", $this->characterbuffer, $matches))
418  {
419  }
420  else
421  {
422  if (is_object($this->survey))
423  {
424  $this->survey->setDescription($this->characterbuffer);
425  }
426  }
427 
428  }
429  break;
430  case "fieldlabel":
431  $this->metadata[count($this->metadata)-1]["label"] = $this->characterbuffer;
432  break;
433  case "fieldentry":
434  $this->metadata[count($this->metadata)-1]["entry"] = $this->characterbuffer;
435  break;
436  case "qtimetadata":
437  if (strcmp($this->getParent($a_xml_parser), "section") == 0)
438  {
439  foreach ($this->metadata as $meta)
440  {
441  switch ($meta["label"])
442  {
443  case "SCORM":
444  if (!$this->spl_exists)
445  {
446  include_once "./Services/MetaData/classes/class.ilMDSaxParser.php";
447  include_once "./Services/MetaData/classes/class.ilMD.php";
448  include_once "./Modules/SurveyQuestionPool/classes/class.ilObjSurveyQuestionPool.php";
449  $md_sax_parser = new ilMDSaxParser();
450  $md_sax_parser->setXMLContent($value["entry"]);
451  $md_sax_parser->setMDObject($tmp = new ilMD($this->spl_id,0, "spl"));
452  $md_sax_parser->enableMDParsing(true);
453  $md_sax_parser->startParsing();
454  $spl = new ilObjSurveyQuestionPool($this->spl_id, false);
455  $spl->MDUpdateListener("General");
456  break;
457  }
458  }
459  }
460  }
461  if (is_object($this->activequestion))
462  {
463  foreach ($this->metadata as $meta)
464  {
465  switch ($this->activequestion->getQuestionType())
466  {
467  case "SurveyMultipleQuestion":
468  switch ($meta["label"])
469  {
470  case "obligatory":
471  $this->activequestion->setObligatory($meta["entry"]);
472  break;
473  case "orientation":
474  $this->activequestion->setOrientation($meta["entry"]);
475  break;
476  }
477  break;
478  case "SurveySingleChoiceQuestion":
479  switch ($meta["label"])
480  {
481  case "obligatory":
482  $this->activequestion->setObligatory($meta["entry"]);
483  break;
484  case "orientation":
485  $this->activequestion->setOrientation($meta["entry"]);
486  break;
487  }
488  break;
489  case "SurveyMetricQuestion":
490  switch ($meta["label"])
491  {
492  case "obligatory":
493  $this->activequestion->setObligatory($meta["entry"]);
494  break;
495  case "subtype":
496  $this->activequestion->setSubtype($meta["entry"]);
497  break;
498  }
499  break;
500  case "SurveyTextQuestion":
501  switch ($meta["label"])
502  {
503  case "obligatory":
504  $this->activequestion->setObligatory($meta["entry"]);
505  break;
506  case "maxchars":
507  if (strlen($meta["entry"]))
508  {
509  $this->activequestion->setMaxChars($meta["entry"]);
510  }
511  break;
512  }
513  break;
514  }
515  }
516  }
517  if (is_object($this->survey))
518  {
519  foreach ($this->metadata as $meta)
520  {
521  switch ($meta["label"])
522  {
523  case "SCORM":
524  if (strcmp($this->getParent($a_xml_parser), "survey") == 0)
525  {
526  include_once "./Services/MetaData/classes/class.ilMDSaxParser.php";
527  include_once "./Services/MetaData/classes/class.ilMD.php";
528  $md_sax_parser = new ilMDSaxParser();
529  $md_sax_parser->setXMLContent($meta["entry"]);
530  $md_sax_parser->setMDObject($tmp = new ilMD($this->survey->getId(), 0, "svy"));
531  $md_sax_parser->enableMDParsing(TRUE);
532  $md_sax_parser->startParsing();
533  $this->survey->MDUpdateListener("General");
534  }
535  break;
536  case "author":
537  $this->survey->setAuthor($meta["entry"]);
538  break;
539  case "description":
540  $this->survey->setDescription($meta["entry"]);
541  break;
542  case "evaluation_access":
543  $this->survey->setEvaluationAccess($meta["entry"]);
544  break;
545  case "evaluation_access":
546  $this->survey->setEvaluationAccess($meta["entry"]);
547  break;
548  case "anonymize":
549  $this->survey->setAnonymize($meta["entry"]);
550  break;
551  case "status":
552  $this->survey->setStatus($meta["entry"]);
553  break;
554  case "startdate":
555  if (preg_match("/P(\d+)Y(\d+)M(\d+)DT0H0M0S/", $meta["entry"], $matches))
556  {
557  $this->survey->setStartDate(sprintf("%04d-%02d-%02d", $matches[1], $matches[2], $matches[3]));
558  $this->survey->setStartDateEnabled(1);
559  }
560  break;
561  case "enddate":
562  if (preg_match("/P(\d+)Y(\d+)M(\d+)DT0H0M0S/", $meta["entry"], $matches))
563  {
564  $this->survey->setEndDate(sprintf("%04d-%02d-%02d", $matches[1], $matches[2], $matches[3]));
565  $this->survey->setEndDateEnabled(1);
566  }
567  break;
568  case "display_question_titles":
569  if ($meta["entry"])
570  {
571  $this->survey->showQuestionTitles();
572  }
573  break;
574  }
575  if (preg_match("/questionblock_(\d+)/", $meta["label"], $matches))
576  {
577  // handle questionblocks
578  $qb = $meta["entry"];
579  preg_match("/<title>(.*?)<\/title>/", $qb, $matches);
580  $qb_title = $matches[1];
581  preg_match("/<questions>(.*?)<\/questions>/", $qb, $matches);
582  $qb_questions = $matches[1];
583  $qb_questions_array = explode(",", $qb_questions);
584  array_push($this->questionblocks, array(
585  "title" => $qb_title,
586  "questions" => $qb_questions_array
587  ));
588  }
589  if (preg_match("/constraint_(\d+)/", $meta["label"], $matches))
590  {
591  $constraint = $meta["entry"];
592  $constraint_array = explode(",", $constraint);
593  if (count($constraint_array) == 3)
594  {
595  array_push($this->constraints, array(
596  "sourceref" => $matches[1],
597  "destref" => $constraint_array[0],
598  "relation" => $constraint_array[1],
599  "value" => $constraint_array[2]
600  ));
601  }
602  }
603  if (preg_match("/heading_(\d+)/", $meta["label"], $matches))
604  {
605  $heading = $meta["entry"];
606  $this->textblocks[$matches[1]] = $heading;
607  }
608  }
609  }
610  break;
611  case "mattext":
612  $this->material[count($this->material)-1]["text"] = $this->characterbuffer;
613  break;
614  case "matimage":
615  $this->material[count($this->material)-1]["image"] = $this->characterbuffer;
616  break;
617  case "material":
618  if ($this->in_survey)
619  {
620  if (strcmp($this->getParent($a_xml_parser), "objectives") == 0)
621  {
622  if (strcmp($this->material[0]["label"], "introduction") == 0)
623  {
624  if (is_object($this->survey))
625  {
626  $this->survey->setIntroduction($this->material[0]["text"]);
627  }
628  }
629  if (strcmp($this->material[0]["label"], "outro") == 0)
630  {
631  if (is_object($this->survey))
632  {
633  $this->survey->setOutro($this->material[0]["text"]);
634  }
635  }
636  $this->material = array();
637  }
638  }
639  else
640  {
641  switch ($this->getParent($a_xml_parser))
642  {
643  case "response_num":
644  case "response_lid":
645  case "response_str":
646  if (is_object($this->activequestion))
647  {
648  $this->activequestion->setMaterial($this->material[0]["text"], TRUE, $this->material[0]["label"]);
649  }
650  break;
651  case "flow":
652  if (is_object($this->activequestion))
653  {
654  $this->activequestion->setQuestiontext($this->material[0]["text"]);
655  }
656  break;
657  }
658  if (is_object($this->activequestion))
659  {
660  if ($this->in_response)
661  {
662  switch ($this->activequestion->getQuestiontype())
663  {
664  case "SurveyMultipleChoiceQuestion":
665  case "SurveySingleChoiceQuestion":
666  $this->activequestion->categories->addCategory($this->material[0]["text"]);
667  break;
668  }
669  }
670  }
671  }
672  break;
673  case "response_label":
674  $this->in_response = FALSE;
675  break;
676  }
677  $this->depth[$a_xml_parser]--;
678  }
const NOMINAL_QUESTION_IDENTIFIER
const TEXT_QUESTION_IDENTIFIER
const METRIC_QUESTION_IDENTIFIER
Old survey question import/export identifiers.
const ORDINAL_QUESTION_IDENTIFIER
+ Here is the call graph for this function:

◆ hasError()

SurveyImportParserPre38::hasError ( )

Definition at line 730 of file class.SurveyImportParserPre38.php.

References $has_error.

◆ parse()

SurveyImportParserPre38::parse (   $a_xml_parser,
  $a_fp = null 
)

parse xml file

private

Definition at line 165 of file class.SurveyImportParserPre38.php.

References $data, ilSaxParser\getInputType(), and ilSaxParser\getXMLContent().

166  {
167  switch($this->getInputType())
168  {
169  case 'file':
170 
171  while($data = fread($a_fp,4096))
172  {
173  $parseOk = xml_parse($a_xml_parser,$data,feof($a_fp));
174  }
175  break;
176 
177  case 'string':
178  $parseOk = xml_parse($a_xml_parser,$this->getXMLContent());
179  break;
180  }
181  if(!$parseOk
182  && (xml_get_error_code($a_xml_parser) != XML_ERROR_NONE))
183  {
184  $this->error_code = xml_get_error_code($a_xml_parser);
185  $this->error_line = xml_get_current_line_number($a_xml_parser);
186  $this->error_col = xml_get_current_column_number($a_xml_parser);
187  $this->error_msg = xml_error_string($a_xml_parser);
188  $this->has_error = TRUE;
189  return false;
190  }
191  return true;
192  }
+ Here is the call graph for this function:

◆ setHandlers()

SurveyImportParserPre38::setHandlers (   $a_xml_parser)

set event handler should be overwritten by inherited class private

Definition at line 145 of file class.SurveyImportParserPre38.php.

146  {
147  xml_set_object($a_xml_parser,$this);
148  xml_set_element_handler($a_xml_parser,'handlerBeginTag','handlerEndTag');
149  xml_set_character_data_handler($a_xml_parser,'handlerCharacterData');
150  }

◆ setSurveyObject()

SurveyImportParserPre38::setSurveyObject ( $a_svy)

Sets a reference to a survey object public.

Definition at line 135 of file class.SurveyImportParserPre38.php.

136  {
137  $this->survey =& $a_svy;
138  }

◆ startParsing()

SurveyImportParserPre38::startParsing ( )

start the parser

Definition at line 155 of file class.SurveyImportParserPre38.php.

156  {
157  parent::startParsing();
158  }

◆ SurveyImportParserPre38()

SurveyImportParserPre38::SurveyImportParserPre38 (   $a_spl_id,
  $a_xml_file = '',
  $spl_exists = FALSE 
)

Constructor.

Parameters
string$a_xml_filexml file

public

Definition at line 95 of file class.SurveyImportParserPre38.php.

References $spl_exists.

96  {
97  parent::ilSaxParser($a_xml_file);
98  $this->spl_id = $a_spl_id;
99  $this->has_error = FALSE;
100  $this->characterbuffer = "";
101  $this->activetag = "";
102  $this->material = array();
103  $this->depth = array();
104  $this->path = array();
105  $this->metadata = array();
106  $this->responses = array();
107  $this->response_id = "";
108  $this->matrix = array();
109  $this->is_matrix = FALSE;
110  $this->adjectives = array();
111  $this->spl_exists = $spl_exists;
112  $this->survey = NULL;
113  $this->in_survey = FALSE;
114  $this->anonymisation = 0;
115  $this->surveyaccess = "restricted";
116  $this->questions = array();
117  $this->original_question_id = "";
118  $this->constraints = array();
119  $this->textblock = "";
120  $this->textblocks = array();
121  $this->in_questionblock = FALSE;
122  $this->questionblocks = array();
123  $this->questionblock = array();
124  $this->questionblocktitle = "";
125  $this->question_title = "";
126  $this->in_question = FALSE;
127  $this->in_response = FALSE;
128  $this->question_description = "";
129  }

Field Documentation

◆ $activequestion

SurveyImportParserPre38::$activequestion

Definition at line 47 of file class.SurveyImportParserPre38.php.

◆ $activetag

SurveyImportParserPre38::$activetag

Definition at line 60 of file class.SurveyImportParserPre38.php.

◆ $adjectives

SurveyImportParserPre38::$adjectives

Definition at line 67 of file class.SurveyImportParserPre38.php.

◆ $anonymisation

SurveyImportParserPre38::$anonymisation

Definition at line 71 of file class.SurveyImportParserPre38.php.

◆ $attributes

SurveyImportParserPre38::$attributes

Definition at line 56 of file class.SurveyImportParserPre38.php.

Referenced by getXMLAttributes().

◆ $characterbuffer

SurveyImportParserPre38::$characterbuffer

Definition at line 59 of file class.SurveyImportParserPre38.php.

Referenced by handlerCharacterData(), and handlerEndTag().

◆ $constraints

SurveyImportParserPre38::$constraints

Definition at line 75 of file class.SurveyImportParserPre38.php.

◆ $depth

SurveyImportParserPre38::$depth

Definition at line 46 of file class.SurveyImportParserPre38.php.

◆ $elements

SurveyImportParserPre38::$elements

Definition at line 55 of file class.SurveyImportParserPre38.php.

Referenced by getXMLElements().

◆ $error_code

SurveyImportParserPre38::$error_code

Definition at line 49 of file class.SurveyImportParserPre38.php.

Referenced by getErrorCode().

◆ $error_col

SurveyImportParserPre38::$error_col

Definition at line 51 of file class.SurveyImportParserPre38.php.

Referenced by getErrorColumn(), and getFullError().

◆ $error_line

SurveyImportParserPre38::$error_line

Definition at line 50 of file class.SurveyImportParserPre38.php.

Referenced by getErrorLine().

◆ $error_msg

SurveyImportParserPre38::$error_msg

Definition at line 52 of file class.SurveyImportParserPre38.php.

Referenced by getErrorMessage().

◆ $has_error

SurveyImportParserPre38::$has_error

Definition at line 53 of file class.SurveyImportParserPre38.php.

Referenced by hasError().

◆ $in_question

SurveyImportParserPre38::$in_question

Definition at line 84 of file class.SurveyImportParserPre38.php.

◆ $in_questionblock

SurveyImportParserPre38::$in_questionblock

Definition at line 78 of file class.SurveyImportParserPre38.php.

◆ $in_reponse

SurveyImportParserPre38::$in_reponse

Definition at line 85 of file class.SurveyImportParserPre38.php.

◆ $in_survey

SurveyImportParserPre38::$in_survey

Definition at line 69 of file class.SurveyImportParserPre38.php.

◆ $is_matrix

SurveyImportParserPre38::$is_matrix

Definition at line 66 of file class.SurveyImportParserPre38.php.

◆ $material

SurveyImportParserPre38::$material

Definition at line 61 of file class.SurveyImportParserPre38.php.

◆ $matrix

SurveyImportParserPre38::$matrix

Definition at line 65 of file class.SurveyImportParserPre38.php.

◆ $metadata

SurveyImportParserPre38::$metadata

Definition at line 62 of file class.SurveyImportParserPre38.php.

◆ $original_question_id

SurveyImportParserPre38::$original_question_id

Definition at line 74 of file class.SurveyImportParserPre38.php.

Referenced by handlerEndTag().

◆ $path

SurveyImportParserPre38::$path

Definition at line 45 of file class.SurveyImportParserPre38.php.

◆ $question_description

SurveyImportParserPre38::$question_description

Definition at line 86 of file class.SurveyImportParserPre38.php.

◆ $question_title

SurveyImportParserPre38::$question_title

Definition at line 83 of file class.SurveyImportParserPre38.php.

◆ $questionblock

SurveyImportParserPre38::$questionblock

Definition at line 79 of file class.SurveyImportParserPre38.php.

◆ $questionblocks

SurveyImportParserPre38::$questionblocks

Definition at line 80 of file class.SurveyImportParserPre38.php.

◆ $questionblocktitle

SurveyImportParserPre38::$questionblocktitle

Definition at line 81 of file class.SurveyImportParserPre38.php.

◆ $questions

SurveyImportParserPre38::$questions

Definition at line 73 of file class.SurveyImportParserPre38.php.

◆ $response_id

SurveyImportParserPre38::$response_id

Definition at line 64 of file class.SurveyImportParserPre38.php.

◆ $responses

SurveyImportParserPre38::$responses

Definition at line 63 of file class.SurveyImportParserPre38.php.

◆ $size

SurveyImportParserPre38::$size

Definition at line 54 of file class.SurveyImportParserPre38.php.

Referenced by getXMLSize().

◆ $spl

SurveyImportParserPre38::$spl

Definition at line 48 of file class.SurveyImportParserPre38.php.

◆ $spl_exists

SurveyImportParserPre38::$spl_exists

Definition at line 68 of file class.SurveyImportParserPre38.php.

Referenced by SurveyImportParserPre38().

◆ $survey

SurveyImportParserPre38::$survey

Definition at line 70 of file class.SurveyImportParserPre38.php.

◆ $surveyaccess

SurveyImportParserPre38::$surveyaccess

Definition at line 72 of file class.SurveyImportParserPre38.php.

◆ $text_size

SurveyImportParserPre38::$text_size

Definition at line 58 of file class.SurveyImportParserPre38.php.

Referenced by getXMLTextSize().

◆ $textblock

SurveyImportParserPre38::$textblock

Definition at line 76 of file class.SurveyImportParserPre38.php.

◆ $textblocks

SurveyImportParserPre38::$textblocks

Definition at line 77 of file class.SurveyImportParserPre38.php.

◆ $texts

SurveyImportParserPre38::$texts

Definition at line 57 of file class.SurveyImportParserPre38.php.

Referenced by getXMLTextSections().


The documentation for this class was generated from the following file: