3 include_once(
"./Services/DataSet/classes/class.ilDataSet.php");
18 return array(
"5.1.0");
29 return "http://www.ilias.de/xml/Modules/Scorm2004/" . $a_entity;
38 protected function getTypes($a_entity, $a_version)
40 if ($a_entity ==
"sahs") {
46 "Description" =>
"text",
47 "Editable" =>
"integer",
61 public function readData($a_entity, $a_version, $a_ids, $a_field =
"")
65 if (!is_array($a_ids)) {
66 $a_ids = array($a_ids);
70 if ($a_entity ==
"sahs") {
71 $this->
data = array();
75 foreach ($a_ids as $sahs_id) {
77 $this->
data[] = array(
"Id" => $sahs_id,
112 if ($a_entity ==
"sahs") {
114 include_once
'./Modules/Scorm2004/classes/class.ilObjSCORM2004LearningModule.php';
117 $zip = $export->buildExportFile();
122 $exp_temp = $tmpdir . DIRECTORY_SEPARATOR . basename($zip);
125 $this->temp_dir[$a_set[
"Id"]] = $tmpdir;
128 $a_set[
"Dir"] = $tmpdir;
129 $a_set[
"File"] = basename($zip);
144 if ($a_entity ==
"sahs") {
146 if (isset($this->temp_dir[
$d[
"Id"]]) && is_dir($this->temp_dir[$d[
"Id"]])) {
161 public function importRecord($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version)
165 $new_obj_id = $a_mapping->getMapping(
"Services/Container",
"objs", $a_rec[
"Id"]);
166 include_once(
"./Modules/Scorm2004/classes/class.ilObjSCORM2004LearningModule.php");
169 $lm->setEditable($a_rec[
"Editable"]);
170 $lm->setImportSequencing(
false);
171 $lm->setSequencingExpertMode(
false);
172 $lm->setSubType(
"scorm2004");
174 $dir = str_replace(
"..",
"", $a_rec[
"Dir"]);
177 $file_path = $lm->getDataDirectory() .
"/" . $a_rec[
"File"];
182 $title = $lm->readObject();
187 $lm->setLearningProgressSettingsAtUpload();
getDependencies($a_entity, $a_version, $a_rec, $a_ids)
Determine the dependent sets of data.
static unzip($a_file, $overwrite=false, $a_flat=false)
unzip file
static _writeTitle($a_obj_id, $a_title)
write title to db (static)
static _lookupTitle($a_id)
lookup object title
getImportDirectory()
Get import directory.
getXmlNamespace($a_entity, $a_schema_version)
Get xml namespace.
getXmlRecord($a_entity, $a_version, $a_set)
Get xml record.
static rename($a_source, $a_target)
Rename a file.
readData($a_entity, $a_version, $a_ids, $a_field="")
Read data.
static _lookupDescription($a_id)
lookup object description
Export class for SCORM 2004 object.
static _lookupType($a_id, $a_reference=false)
lookup object type
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
importRecord($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version)
Import record.
static ilTempnam($a_temp_path=null)
Returns a unique and non existing Path for e temporary file or directory.
getTypes($a_entity, $a_version)
Get field types for entity.
getSupportedVersions()
Note: this is currently used for SCORM authoring lms.
static renameExecutables($a_dir)
Rename uploaded executables for security reasons.
Class ilObjSCORM2004LearningModule.
A dataset contains in data in a common structure that can be shared and transformed for different pur...
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
afterXmlRecordWriting($a_entity, $a_schema_version, $d)
for($i=6; $i< 13; $i++) for($i=1; $i< 13; $i++) $d