function create()
 {
     global $ilDB;
     parent::create();
     $query = 'INSERT INTO sc_organization (obj_id, import_id, structure) VALUES(%s, %s, %s)';
     $ilDB->manipulateF($query, array('integer', 'text', 'text'), array($this->getId(), $this->getImportId(), $this->getStructure()));
 }
    function create()
    {
        global $ilDB;
        parent::create();
        $ilDB->manipulateF('
			INSERT INTO sc_organizations (obj_id, default_organization) VALUES (%s, %s)', array('integer', 'text'), array($this->getId(), $this->getDefaultOrganization()));
    }
    function create()
    {
        global $ilDB;
        parent::create();
        $ilDB->manipulateF('
			INSERT INTO sc_resource 
			(obj_id, import_id, resourcetype, scormtype, href, xml_base) 
			VALUES(%s, %s, %s, %s, %s, %s)', array('integer', 'text', 'text', 'text', 'text', 'text'), array($this->getId(), $this->getImportId(), $this->getResourceType(), $this->getScormType(), $this->getHref(), $this->getXmlBase()));
        // save files
        for ($i = 0; $i < count($this->files); $i++) {
            $nextId = $ilDB->nextId('sc_resource_file');
            $ilDB->manipulateF('
				INSERT INTO sc_resource_file (id,res_id, href, nr) 
				VALUES(%s, %s, %s, %s)', array('integer', 'integer', 'text', 'integer'), array($nextId, $this->getId(), $this->files[$i]->getHref(), $i + 1));
        }
        // save dependencies
        for ($i = 0; $i < count($this->dependencies); $i++) {
            $nextId = $ilDB->nextId('sc_resource_dependen');
            $ilDB->manipulateF('
				INSERT INTO sc_resource_dependen (id, res_id, identifierref, nr)
				VALUES(%s, %s, %s, %s)', array('integer', 'integer', 'text', 'integer'), array($nextId, $this->getId(), $this->files[$i]->getHref(), $i + 1));
        }
    }
    function create()
    {
        global $ilDB;
        parent::create();
        $ilDB->manipulateF('
		INSERT INTO sc_manifest (obj_id, import_id, version, xml_base) 
		VALUES (%s,%s,%s,%s)', array('integer', 'text', 'text', 'text'), array($this->getId(), $this->getImportId(), $this->getVersion(), $this->getXmlBase()));
    }
 function create()
 {
     global $ilDB;
     parent::create();
     $str_visible = $this->getVisible() ? 'true' : 'false';
     $ilDB->insert('sc_item', array('obj_id' => array('integer', $this->getId()), 'import_id' => array('text', $this->getImportId()), 'identifierref' => array('text', $this->getIdentifierRef()), 'isvisible' => array('text', $str_visible), 'parameters' => array('text', $this->getParameters()), 'prereq_type' => array('text', $this->getPrereqType()), 'prerequisites' => array('text', $this->getPrerequisites()), 'maxtimeallowed' => array('text', $this->getMaxTimeAllowed()), 'timelimitaction' => array('text', $this->getTimeLimitAction()), 'datafromlms' => array('clob', $this->getDataFromLms()), 'masteryscore' => array('text', $this->getMasteryScore())));
 }
 function create()
 {
     global $ilDB;
     parent::create();
     $ilDB->manipulateF('INSERT INTO sc_resources (obj_id, xml_base) VALUES (%s, %s)', array('integer', 'text'), array($this->getId(), $this->getXmlBase()));
 }