function update()
 {
     global $ilDB;
     parent::update();
     $query = 'UPDATE sc_organization SET import_id = %s, structure = %s WHERE obj_id = %s';
     $ilDB->manipulateF($query, array('text', 'text', 'integer'), array($this->getImportId(), $this->getStructure(), $this->getId()));
 }
    function update()
    {
        global $ilDB;
        parent::update();
        $ilDB->manipulateF('
			UPDATE sc_resources SET xml_base = %s WHERE obj_id = %s', array('text', 'integer'), array($this->getXmlBase(), $this->getId()));
    }
    function update()
    {
        global $ilDB;
        parent::update();
        $ilDB->manipulateF('
			UPDATE sc_organizations 
			SET default_organization = %s
			WHERE obj_id = %s', array('text', 'integer'), array($this->getDefaultOrganization(), $this->getId()));
    }
예제 #4
0
    function update()
    {
        global $ilDB;
        parent::update();
        $ilDB->manipulateF('
			UPDATE sc_resource 
			SET import_id = %s,
				resourcetype = %s,
				scormtype = %s,
				href = %s,
				xml_base = %s
			WHERE obj_id = %s', array('text', 'text', 'text', 'text', 'text', 'integer'), array($this->getImportId(), $this->getResourceType(), $this->getScormType(), $this->getHRef(), $this->getXmlBase(), $this->getId()));
        // save files
        $ilDB->manipulateF('DELETE FROM sc_resource_file WHERE res_id = %s', array('integer'), array($this->getId()));
        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
        $ilDB->manipulateF('DELETE FROM sc_resource_dependen WHERE res_id = %s', array('integer'), array($this->getId()));
        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->dependencies[$i]->getIdentifierRef(), $i + 1));
        }
    }
예제 #5
0
    function update()
    {
        global $ilDB;
        parent::update();
        $ilDB->manipulateF('
		UPDATE sc_manifest 
		SET import_id = %s,  
			version = %s,  
			xml_base = %s 
		WHERE obj_id = %s', array('text', 'text', 'text', 'integer'), array($this->getImportId(), $this->getVersion(), $this->getXmlBase(), $this->getId()));
    }
 function update()
 {
     global $ilDB;
     parent::update();
     $str_visible = $this->getVisible() ? 'true' : 'false';
     $ilDB->update('sc_item', array('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())), array('obj_id' => array('integer', $this->getId())));
 }