ILIAS  release_8 Revision v8.23
ilSurveyImporter Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilSurveyImporter:
+ Collaboration diagram for ilSurveyImporter:

Public Member Functions

 __construct ()
 
 init ()
 
 setSurvey (ilObjSurvey $a_val)
 Set current survey object (being imported). More...
 
 getSurvey ()
 
- Public Member Functions inherited from ilXmlImporter
 __construct ()
 
 setImport (ilImport $a_val)
 
 getImport ()
 
 init ()
 
 setInstallId (string $a_val)
 
 getInstallId ()
 
 setInstallUrl (string $a_val)
 
 getInstallUrl ()
 
 setSchemaVersion (string $a_val)
 
 getSchemaVersion ()
 
 setImportDirectory (string $a_val)
 
 getImportDirectory ()
 
 setSkipEntities (array $a_val)
 
 getSkipEntities ()
 
 exportedFromSameInstallation ()
 
 importXmlRepresentation (string $a_entity, string $a_id, string $a_xml, ilImportMapping $a_mapping)
 
 finalProcessing (ilImportMapping $a_mapping)
 
 afterContainerImportProcessing (ilImportMapping $mapping)
 

Protected Member Functions

 parseXmlFileNames ()
 Create qti and xml file name. More...
 

Protected Attributes

ilSurveyDataSet $ds
 
ilLogger $log
 
ilLogger $svy_log
 
ILIAS SurveyQuestionPool Export ImportManager $spl_import_manager
 
- Protected Attributes inherited from ilXmlImporter
array $skip_entities = array()
 
ilImport $imp
 
string $install_id
 
string $install_url
 
string $schema_version
 
string $import_directory
 

Static Protected Attributes

static ilObjSurvey $survey
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Importer class for files

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

Definition at line 23 of file class.ilSurveyImporter.php.

Constructor & Destructor Documentation

◆ __construct()

ilSurveyImporter::__construct ( )

Definition at line 31 of file class.ilSurveyImporter.php.

References $DIC, and ILIAS\GlobalScreen\Provider\__construct().

32  {
34  global $DIC;
35 
36  $this->log = $DIC["ilLog"];
37 
38  $this->spl_import_manager = $DIC->surveyQuestionPool()
39  ->internal()
40  ->domain()
41  ->import();
42  }
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ getSurvey()

◆ init()

ilSurveyImporter::init ( )

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

References ilLoggerFactory\getLogger().

45  : void
46  {
47  $this->ds = new ilSurveyDataSet();
48  $this->ds->setDSPrefix("ds");
49  $this->ds->setImport($this);
50 
51  $this->svy_log = ilLoggerFactory::getLogger("svy");
52  }
static getLogger(string $a_component_id)
Get component logger.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ parseXmlFileNames()

ilSurveyImporter::parseXmlFileNames ( )
protected

Create qti and xml file name.

Definition at line 182 of file class.ilSurveyImporter.php.

References $GLOBALS, $xml, and ilXmlImporter\getImportDirectory().

Referenced by getSurvey().

182  : array
183  {
184  $GLOBALS['ilLog']->write(__METHOD__ . ': ' . $this->getImportDirectory());
185 
186  $basename = basename($this->getImportDirectory());
187  $xml = $this->getImportDirectory() . '/' . $basename . '.xml';
188 
189  return array($xml);
190  }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
$xml
Definition: metadata.php:351
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSurvey()

ilSurveyImporter::setSurvey ( ilObjSurvey  $a_val)

Set current survey object (being imported).

This is done statically, since the survey import uses multiple input files being processed for every survey and all of these need the current survey object (ilSurveyImporter is intantiated multiple times)

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

Referenced by getSurvey().

60  : void
61  {
62  self::$survey = $a_val;
63  }
+ Here is the caller graph for this function:

Field Documentation

◆ $ds

ilSurveyDataSet ilSurveyImporter::$ds
protected

Definition at line 25 of file class.ilSurveyImporter.php.

◆ $log

ilLogger ilSurveyImporter::$log
protected

Definition at line 26 of file class.ilSurveyImporter.php.

◆ $spl_import_manager

ILIAS SurveyQuestionPool Export ImportManager ilSurveyImporter::$spl_import_manager
protected

Definition at line 29 of file class.ilSurveyImporter.php.

◆ $survey

ilObjSurvey ilSurveyImporter::$survey
staticprotected

Definition at line 27 of file class.ilSurveyImporter.php.

◆ $svy_log

ilLogger ilSurveyImporter::$svy_log
protected

Definition at line 28 of file class.ilSurveyImporter.php.


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