function read()
 {
     global $ilDB;
     parent::read();
     $obj_set = $ilDB->queryF('SELECT xml_base FROM sc_resources WHERE obj_id = %s', array('integer'), array($this->getId()));
     $obj_rec = $ilDB->fetchAssoc($obj_set);
     $this->setXmlBase($obj_rec['xml_base']);
 }
 function read()
 {
     global $ilDB;
     parent::read();
     $obj_set = $ilDB->queryF('SELECT default_organization FROM sc_organizations WHERE obj_id = %s', array('integer'), array($this->getId()));
     $obj_rec = $ilDB->fetchAssoc($obj_set);
     $this->setDefaultOrganization($obj_rec["default_organization"]);
 }
 function read()
 {
     global $ilDB;
     parent::read();
     $obj_set = $ilDB->queryF('SELECT * FROM sc_manifest WHERE obj_id = %s', array('integer'), array($this->getId()));
     $obj_rec = $ilDB->fetchAssoc($obj_set);
     $this->setImportId($obj_rec["import_id"]);
     $this->setVersion($obj_rec["version"]);
     $this->setXmlBase($obj_rec["xml_base"]);
 }
 function read()
 {
     global $ilDB;
     parent::read();
     $query = 'SELECT import_id, structure FROM sc_organization WHERE obj_id = %s';
     $obj_set = $ilDB->queryF($query, array('integer'), array($this->getId()));
     $obj_rec = $ilDB->fetchAssoc($obj_set);
     $this->setImportId($obj_rec['import_id']);
     $this->setStructure($obj_rec['structure']);
 }
 function read()
 {
     global $ilDB;
     parent::read();
     $obj_set = $ilDB->queryF('SELECT * FROM sc_resource WHERE obj_id = %s', array('integer'), array($this->getId()));
     $obj_rec = $ilDB->fetchAssoc($obj_set);
     $this->setImportId($obj_rec["import_id"]);
     $this->setResourceType($obj_rec["resourcetype"]);
     $this->setScormType($obj_rec["scormtype"]);
     $this->setHRef($obj_rec["href"]);
     $this->setXmlBase($obj_rec["xml_base"]);
     // read files
     $file_set = $ilDB->queryF('SELECT href FROM sc_resource_file WHERE res_id = %s ORDER BY nr', array('integer'), array($this->getId()));
     while ($file_rec = $ilDB->fetchAssoc($file_set)) {
         $res_file =& new ilSCORMResourceFile();
         $res_file->setHref($file_rec["href"]);
         $this->addFile($res_file);
     }
     // read dependencies
     $dep_set = $ilDB->queryF('SELECT identifierref FROM sc_resource_dependen WHERE res_id = %s ORDER BY nr', array('integer'), array($this->getId()));
     while ($dep_rec = $ilDB->fetchAssoc($dep_set)) {
         $res_dep =& new ilSCORMResourceDependency();
         $res_dep->setIdentifierRef($dep_rec["identifierref"]);
         $this->addDependency($res_dep);
     }
 }
 function read()
 {
     global $ilDB;
     parent::read();
     $obj_set = $ilDB->queryF('SELECT * FROM sc_item WHERE obj_id = %s', array('integer'), array($this->getId()));
     $obj_rec = $ilDB->fetchAssoc($obj_set);
     $this->setImportId($obj_rec["import_id"]);
     $this->setIdentifierRef($obj_rec["identifierref"]);
     if (strtolower($obj_rec["isvisible"]) == "false") {
         $this->setVisible(false);
     } else {
         $this->setVisible(true);
     }
     $this->setParameters($obj_rec["parameters"]);
     $this->setPrereqType($obj_rec["prereq_type"]);
     $this->setPrerequisites($obj_rec["prerequisites"]);
     $this->setMaxTimeAllowed($obj_rec["maxtimeallowed"]);
     $this->setTimeLimitAction($obj_rec["timelimitaction"]);
     $this->setDataFromLms($obj_rec["datafromlms"]);
     $this->setMasteryScore($obj_rec["masteryscore"]);
 }