/**
  * Constructor
  *
  * @access	public
  */
 function ilMDSaxParser($a_xml_file = '')
 {
     global $lng, $tree;
     // Enable parsing. E.g qpl' s will set this value to false
     $this->md_parsing_enabled = true;
     parent::ilSaxParser($a_xml_file);
 }
 function ilObjDefReader($a_path, $a_name, $a_type)
 {
     $this->name = $a_name;
     $this->type = $a_type;
     //echo "<br>-".$a_path."-".$this->name."-".$this->type."-";
     parent::ilSaxParser($a_path);
 }
 /**
  * Constructor
  *
  * @param	string		$a_xml_file		xml file
  *
  * @access	public
  */
 function SurveyImportParser($a_spl_id, $a_xml_file = '', $spl_exists = FALSE)
 {
     parent::ilSaxParser($a_xml_file);
     $this->spl_id = $a_spl_id;
     $this->has_error = FALSE;
     $this->characterbuffer = "";
     $this->survey_status = 0;
     $this->activetag = "";
     $this->material = array();
     $this->depth = array();
     $this->path = array();
     $this->metadata = array();
     $this->responses = array();
     $this->variables = array();
     $this->response_id = "";
     $this->matrix = array();
     $this->is_matrix = FALSE;
     $this->adjectives = array();
     $this->spl_exists = $spl_exists;
     $this->survey = NULL;
     $this->in_survey = FALSE;
     $this->anonymisation = 0;
     $this->surveyaccess = "restricted";
     $this->questions = array();
     $this->original_question_id = "";
     $this->constraints = array();
     $this->textblock = "";
     $this->textblocks = array();
     $this->in_questionblock = FALSE;
     $this->questionblocks = array();
     $this->questionblock = array();
     $this->showQuestiontext = 1;
     $this->questionblocktitle = "";
 }
 /**
  * Constructor
  *
  * @param
  * @return
  */
 function __construct($a_file, $a_callback_obj, $a_callback_func)
 {
     $this->callback_obj = $a_callback_obj;
     $this->callback_func = $a_callback_func;
     parent::ilSaxParser($a_file, true);
     $this->startParsing();
 }
 /**
  * Constructor
  *
  * @param	string		$a_xml_file		xml file
  *
  * @access	public
  */
 function ilCategoryImportParser($a_xml_file, $a_parent, $withrol)
 {
     $this->parent_cnt = 0;
     $this->parent[$this->parent_cnt] = $a_parent;
     $this->parent_cnt++;
     $this->withrol = $withrol;
     parent::ilSaxParser($a_xml_file);
 }
 /**
  * Constructor
  *
  * @param   ilObjFile  $file existing file object
  * @param	string		$a_xml_file			xml data
  * @param   int $obj_id obj id of exercise which is to be updated
  * @access	public
  */
 function ilFileXMLParser(&$file, $a_xml_data, $obj_id = -1, $mode = 0)
 {
     parent::ilSaxParser();
     $this->file = $file;
     $this->setXMLContent($a_xml_data);
     $this->obj_id = $obj_id;
     $this->result = false;
     $this->mode = $mode;
 }
 function ilPluginReader($a_path, $a_ctype, $a_cname, $a_slot_id, $a_pname)
 {
     parent::ilSaxParser($a_path);
     die("Deprecated. Plugin information is stored in plugin.php");
     $this->ctype = $a_ctype;
     $this->cname = $a_cname;
     $this->slot_id = $a_slot_id;
     $this->pname = $a_pname;
 }
 /**
  * Constructor
  *
  * @param	object		$a_lm_object	must be of type ilObjLearningModule
  * @param	string		$a_xml_file		xml file
  * @access	public
  */
 function ilSCORMPackageParser(&$a_slm_object, $a_xml_file)
 {
     parent::ilSaxParser($a_xml_file);
     $this->cnt = array();
     $this->current_element = array();
     $this->slm_object =& $a_slm_object;
     $this->tree_created = false;
     $this->parent_stack = array();
     $this->item_stack = array();
 }
 /**
  * Constructor
  *
  * @param	string		$a_xml_file		xml file
  *
  * @access	public
  */
 function ilGroupXMLParser($a_xml, $a_parent_id)
 {
     define('EXPORT_VERSION', 2);
     parent::ilSaxParser(null);
     $this->mode = ilGroupXMLParser::$CREATE;
     $this->grp = null;
     $this->setXMLContent($a_xml);
     // SET MEMBER VARIABLES
     $this->__pushParentId($a_parent_id);
 }
 /**
  * Constructor
  *
  * @param
  * @return
  */
 function __construct($a_top_entity, $a_schema_version, $a_xml, $a_ds, $a_mapping)
 {
     $this->ds = $a_ds;
     $this->mapping = $a_mapping;
     $this->top_entity = $a_top_entity;
     $this->schema_version = $a_schema_version;
     $this->dspref = $this->ds->getDSPrefix() != "" ? $this->ds->getDSPrefix() . ":" : "";
     parent::ilSaxParser();
     $this->setXMLContent($a_xml);
     $this->startParsing();
 }
 function ilObjDefReader($a_path, $a_name, $a_type)
 {
     // init specialized readers
     foreach ($this->readers as $k => $reader) {
         $class = $reader["class"];
         $class_path = "./setup/classes/class." . $class . ".php";
         include_once $class_path;
         $this->readers[$k]["reader"] = new $class();
     }
     $this->name = $a_name;
     $this->type = $a_type;
     //echo "<br>-".$a_path."-".$this->name."-".$this->type."-";
     parent::ilSaxParser($a_path);
 }
 /**
  * Constructor
  *
  * parse
  *
  * @access	public
  */
 function ilStyleDefinition($a_template_id = "")
 {
     global $ilias;
     if ($a_template_id == "") {
         // use function to get the current skin
         $a_template_id = self::getCurrentSkin();
     }
     // remember the template id
     $this->template_id = $a_template_id;
     if ($a_template_id == "default") {
         parent::ilSaxParser("./templates/" . $a_template_id . "/template.xml");
     } else {
         parent::ilSaxParser("./Customizing/global/skin/" . $a_template_id . "/template.xml");
     }
 }
 /**
  * Constructor
  * 
  * setup ILIAS global object
  * @access	public
  */
 function ilObjectDefinition()
 {
     global $ilias;
     $this->readDefinitionData();
     $this->ilias = $ilias;
     parent::ilSaxParser(ILIAS_ABSOLUTE_PATH . "/objects.xml");
     // removing this line leads to segmentation faults in
     // learning module editor with
     // - PHP 5.2.1, libxml 2.6.22, libxslt 1.1.15 (MacOsX)
     // - PHP 5.2.1, libxml 2.6.31, libxslt 1.1.22 (MacOsX)
     // - PHP 5.2.5, libxml 2.6.31, libxslt 1.1.22 (MacOsX)
     // - PHP 5.2.0-8+etch7, libxml 2.6.27, libxslt 1.1.19
     // - PHP 5.2.0, libxml, libxml 2.6.26, libxslt 1.1.17 (OpenSuse 10.2)
     // (needs further investigation)
     // OK with:
     // - PHP 5.1.2, libxml 2.6.24, libxslt 1.1.15
     //
     // Replacing all "=&" with "=" in xml5compliance seems to solve the problem
     //
     //		$this->startParsing();
 }
 /**
  * Constructor
  *
  * @param   ilExercise  $exercise   existing exercise object
  * @param	string		$a_xml_file			xml data
  * @param   int $obj_id obj id of exercise which is to be updated
  * @access	public
  */
 function ilExerciseXMLParser(&$exercise, $a_xml_data, $obj_id = -1)
 {
     // @todo: needs to be revised for multiple assignments per exercise
     parent::ilSaxParser();
     $this->exercise = $exercise;
     // get all assignments and choose first one if exists, otherwise create
     $assignments = ilExAssignment::getAssignmentDataOfExercise($exercise->getId());
     if (count($assignments) > 0) {
         $this->assignment = new ilExAssignment($assignments[0]["id"]);
     } else {
         $this->assignment = new ilExAssignment();
         $this->assignment->setExerciseId($exercise->getId());
         $this->assignment->save();
     }
     include_once "./Modules/Exercise/classes/class.ilFSStorageExercise.php";
     $this->storage = new ilFSStorageExercise($this->exercise->getId(), $this->assignment->getId());
     $this->storage->create();
     $this->storage->init();
     $this->setXMLContent($a_xml_data);
     $this->obj_id = $obj_id;
     $this->result = false;
 }
 /**
  * Constructor
  *
  * @param
  * @return
  */
 function __construct($a_file)
 {
     parent::ilSaxParser($a_file, true);
     $this->startParsing();
 }
 /**
  * Constructor
  *
  * @param	string		$a_xml_file		xml file
  * @param	int			$a_mode			IL_EXTRACT_ROLES | IL_USER_IMPORT | IL_VERIFY
  * @param	int			$a_conflict_rue	IL_FAIL_ON_CONFLICT | IL_UPDATE_ON_CONFLICT | IL_IGNORE_ON_CONFLICT
  *
  * @access	public
  */
 function ilUserImportParser($a_xml_file = '', $a_mode = IL_USER_IMPORT, $a_conflict_rule = IL_FAIL_ON_CONFLICT)
 {
     global $lng, $tree, $ilias, $ilUser, $styleDefinition;
     $this->roles = array();
     $this->mode = $a_mode;
     $this->conflict_rule = $a_conflict_rule;
     $this->error_level = IL_IMPORT_SUCCESS;
     $this->protocol = array();
     $this->logins = array();
     $this->userCount = 0;
     $this->localRoleCache = array();
     $this->parentRolesCache = array();
     $this->ilincdata = array();
     $this->send_mail = false;
     $this->mapping_mode = IL_USER_MAPPING_LOGIN;
     // get all active style  instead of only assigned ones -> cannot transfer all to another otherwise
     $this->userStyles = array();
     include_once "./Services/Style/classes/class.ilObjStyleSettings.php";
     include_once './Services/Style/classes/class.ilStyleDefinition.php';
     $templates = ilStyleDefinition::_getAllTemplates();
     if (is_array($templates)) {
         foreach ($templates as $template) {
             // get styles information of template
             $styleDef =& new ilStyleDefinition($template["id"]);
             $styleDef->startParsing();
             $styles = $styleDef->getStyles();
             foreach ($styles as $style) {
                 if (!ilObjStyleSettings::_lookupActivatedStyle($template["id"], $style["id"])) {
                     continue;
                 }
                 $this->userStyles[] = $template["id"] . ":" . $style["id"];
             }
         }
     }
     $settings = $ilias->getAllSettings();
     if ($settings["usr_settings_hide_skin_style"] == 1) {
         $this->hideSkin = TRUE;
     } else {
         $this->hideSkin = FALSE;
     }
     if ($settings["usr_settings_disable_skin_style"] == 1) {
         $this->disableSkin = TRUE;
     } else {
         $this->disableSkin = FALSE;
     }
     include_once "Services/Mail/classes/class.ilAccountMail.php";
     $this->acc_mail = new ilAccountMail();
     $this->acc_mail->useLangVariablesAsFallback(true);
     parent::ilSaxParser($a_xml_file);
 }
 /**
  * Constructor
  *
  * @access	public
  */
 function ilMDSaxParser($a_xml_file = '')
 {
     global $lng, $tree;
     parent::ilSaxParser($a_xml_file);
 }
 /**
  * Constructor
  *
  * @param	object		$a_content_object	must be of type ilObjContentObject
  *											ilObjTest or ilObjQuestionPool
  * @param	string		$a_xml_file			xml data
  * @param	string		$a_subdir			subdirectory in import directory
  * @access	public
  */
 function ilObjectXMLParser($a_xml_data = '', $throwException = false)
 {
     parent::ilSaxParser('', $throwException);
     $this->setXMLContent($a_xml_data);
 }
 /**
  * Constructor
  *
  * @param	string		$a_xml_file		xml file
  * @param	int			$a_mode			IL_EXTRACT_ROLES | IL_USER_IMPORT
  *
  * @access	public
  */
 function ilStyleImportParser($a_xml_file, &$a_style_obj)
 {
     global $lng, $tree;
     $this->style_obj =& $a_style_obj;
     parent::ilSaxParser($a_xml_file);
 }
 /**
  * Constructor
  *
  * @param	string		$a_xml_file		xml file
  *
  * @access	public
  */
 function ilXMLChecker($a_xml_file = '')
 {
     parent::ilSaxParser($a_xml_file);
     $this->has_error = FALSE;
 }
Exemple #21
0
 function ilQTIParser($a_xml_file, $a_mode = IL_MO_PARSE_QTI, $a_qpl_id = 0, $a_import_idents = "")
 {
     global $lng;
     $this->setParserMode($a_mode);
     parent::ilSaxParser($a_xml_file);
     $this->qpl_id = $a_qpl_id;
     $this->import_idents = array();
     if (is_array($a_import_idents)) {
         $this->import_idents =& $a_import_idents;
     }
     $this->lng =& $lng;
     $this->hasRootElement = FALSE;
     $this->import_mapping = array();
     $this->assessments = array();
     $this->assessment = NULL;
     $this->section = NULL;
     $this->path = array();
     $this->items = array();
     $this->item = NULL;
     $this->depth = array();
     $this->do_nothing = FALSE;
     $this->qti_element = "";
     $this->in_presentation = FALSE;
     $this->in_objectives = FALSE;
     $this->in_reponse = FALSE;
     $this->render_type = NULL;
     $this->render_hotspot = NULL;
     $this->response_label = NULL;
     $this->material = NULL;
     $this->response = NULL;
     $this->assessmentcontrol = NULL;
     $this->objectives = NULL;
     $this->matimage = NULL;
     $this->resprocessing = NULL;
     $this->outcomes = NULL;
     $this->decvar = NULL;
     $this->respcondition = NULL;
     $this->setvar = NULL;
     $this->displayfeedback = NULL;
     $this->itemfeedback = NULL;
     $this->flow_mat = array();
     $this->question_counter = 1;
     $this->flow = 0;
     $this->gap_index = 0;
     $this->presentation = NULL;
     $this->mattext = NULL;
     $this->matapplet = NULL;
     $this->sametag = FALSE;
     $this->in_assessment = FALSE;
     $this->characterbuffer = "";
     $this->metadata = array("label" => "", "entry" => "");
 }
 /**
  * constructor
  * @param	string	xml version
  * @param	string	output encoding
  * @param	string	input encoding
  * @access	public
  */
 function ilCopyWizardSettingsXMLParser($xml)
 {
     parent::ilSaxParser('', true);
     $this->setXMLContent($xml);
 }
 /**
  * Constructor
  * @param	string		$a_xml_data			xml data
  * @access	public
  */
 function ilXMLResultSetParser($a_xml_data = '')
 {
     parent::ilSaxParser();
     $this->setXMLContent($a_xml_data);
 }
 /**
  * Constructor
  * @access	public
  */
 function ilnetucateResponse($a_str)
 {
     $xml_str = $this->validateInput($a_str);
     parent::ilSaxParser($xml_str);
     $this->startParsing();
 }