Class ilLMObject. More...
Public Member Functions | |
ilLMObject (&$a_content_obj, $a_id=0) | |
MDUpdateListener ($a_element) | |
Meta data update listener. | |
_lookupNID ($a_lm_id, $a_lm_obj_id, $a_type) | |
lookup named identifier (ILIAS_NID) | |
createMetaData () | |
create meta data entry | |
updateMetaData () | |
update meta data entry | |
deleteMetaData () | |
delete meta data entry | |
setDataRecord ($a_record) | |
this method should only be called by class ilLMObjectFactory | |
read () | |
setTitle ($a_title) | |
set title of lm object | |
getTitle () | |
get title of lm object | |
_lookupTitle ($a_obj_id) | |
_lookupType ($a_obj_id) | |
_writeTitle ($a_obj_id, $a_title) | |
setDescription ($a_description) | |
getDescription () | |
setType ($a_type) | |
getType () | |
setLMId ($a_lm_id) | |
getLMId () | |
setContentObject (&$a_content_obj) | |
& | getContentObject () |
setId ($a_id) | |
getId () | |
getImportId () | |
setImportId ($a_id) | |
setActive ($a_active) | |
set activation | |
getActive () | |
get activation | |
_writeImportId ($a_id, $a_import_id) | |
write import id to db (static) | |
create ($a_upload=false) | |
update () | |
update complete object | |
_isPagePublic ($a_node_id, $a_check_public_mode=false) | |
delete ($a_delete_meta_data=true) | |
delete lm object data | |
_getIdForImportId ($a_import_id) | |
get current object id for import id (static) | |
_exists ($a_id) | |
checks wether a lm content object with specified id exists or not | |
getObjectList ($lm_id, $type="") | |
static | |
_deleteAllObjectData (&$a_cobj) | |
delete all objects of content object (digi book / learning module) | |
_lookupContObjID ($a_id) | |
get learning module / digibook id for lm object | |
_lookupActive ($a_id) | |
lookup activation status | |
_writeActive ($a_id, $a_active) | |
write activation status | |
Static Public Member Functions | |
_writePublicAccessStatus ($a_pages, $a_cont_obj_id) | |
update public access flags in lm_data for all pages of a content object | |
Data Fields | |
$ilias | |
$lm_id | |
$type | |
$id | |
$meta_data | |
$data_record | |
$content_object | |
$title | |
$description | |
$active = true |
Class ilLMObject.
Base class for ilStructureObjects and ilPageObjects (see ILIAS DTD)
Definition at line 36 of file class.ilLMObject.php.
ilLMObject::_deleteAllObjectData | ( | &$ | a_cobj | ) |
delete all objects of content object (digi book / learning module)
Definition at line 625 of file class.ilLMObject.php.
References $query, and ilLMObjectFactory::getInstance().
Referenced by ilObjContentObject::delete().
{ include_once './classes/class.ilNestedSetXML.php'; $query = "SELECT * FROM lm_data ". "WHERE lm_id= '".$a_cobj->getId()."'"; $obj_set = $this->ilias->db->query($query); require_once("content/classes/class.ilLMObjectFactory.php"); while($obj_rec = $obj_set->fetchRow(DB_FETCHMODE_ASSOC)) { $lm_obj =& ilLMObjectFactory::getInstance($a_cobj, $obj_rec["obj_id"],false); if (is_object($lm_obj)) { $lm_obj->delete(true); } } return true; }
ilLMObject::_exists | ( | $ | a_id | ) |
checks wether a lm content object with specified id exists or not
int | $id id |
Definition at line 573 of file class.ilLMObject.php.
References $q, and ilInternalLink::_extractObjIdOfTarget().
Referenced by ilLMPresentationGUI::ilPage().
{ global $ilDB; include_once("content/classes/Pages/class.ilInternalLink.php"); if (is_int(strpos($a_id, "_"))) { $a_id = ilInternalLink::_extractObjIdOfTarget($a_id); } $q = "SELECT * FROM lm_data WHERE obj_id = '".$a_id."'"; $obj_set = $ilDB->query($q); if ($obj_rec = $obj_set->fetchRow(DB_FETCHMODE_ASSOC)) { return true; } else { return false; } }
ilLMObject::_getIdForImportId | ( | $ | a_import_id | ) |
get current object id for import id (static)
import ids can exist multiple times (if the same learning module has been imported multiple times). we get the object id of the last imported object, that is not in trash
int | $a_import_id import id |
Definition at line 545 of file class.ilLMObject.php.
References $lm_id, $q, ilObject::_hasUntrashedReference(), and _lookupContObjID().
Referenced by SurveyQuestion::_resolveInternalLink(), and assQuestion::_resolveInternalLink().
{ global $ilDB; $q = "SELECT * FROM lm_data WHERE import_id = '".$a_import_id."'". " ORDER BY create_date DESC LIMIT 1"; $obj_set = $ilDB->query($q); while ($obj_rec = $obj_set->fetchRow(DB_FETCHMODE_ASSOC)) { $lm_id = ilLMObject::_lookupContObjID($obj_rec["obj_id"]); // link only in learning module, that is not trashed if (ilObject::_hasUntrashedReference($lm_id)) { return $obj_rec["obj_id"]; } } return 0; }
ilLMObject::_isPagePublic | ( | $ | a_node_id, | |
$ | a_check_public_mode = false | |||
) |
Definition at line 491 of file class.ilLMObject.php.
References $ilLog, $lm_id, $q, $row, and ilUtil::yn2tf().
Referenced by ilPublicSectionSelector::formatObject(), ilLMPresentationGUI::getCurrentPageId(), ilLMPresentationGUI::ilLMNavigation(), ilLMPresentationGUI::ilPage(), ilLMExplorer::isClickable(), ilLMPresentationGUI::showPrintView(), and ilLMPresentationGUI::showPrintViewSelection().
{ global $ilDB,$ilLog; if (empty($a_node_id)) { $message = sprintf('ilLMObject::_isPagePublic(): Invalid parameter! $a_node_id is empty'); $ilLog->write($message,$ilLog->WARNING); return false; } if ($a_check_public_mode === true) { $lm_id = ilLMObject::_lookupContObjId($a_node_id); $q = "SELECT public_access_mode FROM content_object WHERE id=".$ilDB->quote($lm_id); $r = $ilDB->query($q); $row = $r->fetchRow(); if ($row[0] == "complete") { return true; } } $q = "SELECT public_access FROM lm_data WHERE obj_id=".$ilDB->quote($a_node_id); $r = $ilDB->query($q); $row = $r->fetchRow(); return ilUtil::yn2tf($row[0]); }
ilLMObject::_lookupActive | ( | $ | a_id | ) |
lookup activation status
Definition at line 664 of file class.ilLMObject.php.
References $query, and ilUtil::yn2tf().
Referenced by ilStructureObjectGUI::activatePages(), ilObjContentObjectGUI::activatePages(), ilLMPresentationGUI::getCurrentPageId(), ilLMEditorExplorer::getNodeStyleClass(), ilLMPresentationGUI::ilLMNavigation(), ilLMTOCExplorer::isVisible(), ilTableOfContentsExplorer::isVisible(), ilObjContentObjectGUI::pages(), and ilStructureObjectGUI::view().
{ global $ilDB; $query = "SELECT * FROM lm_data WHERE obj_id = ".$ilDB->quote($a_id); $obj_set = $ilDB->query($query); $obj_rec = $obj_set->fetchRow(DB_FETCHMODE_ASSOC); return ilUtil::yn2tf($obj_rec["active"]); }
ilLMObject::_lookupContObjID | ( | $ | a_id | ) |
get learning module / digibook id for lm object
Definition at line 650 of file class.ilLMObject.php.
References $query.
Referenced by ilObjContentObjectAccess::_checkGoto(), _getIdForImportId(), ilStructureObjectGUI::_goto(), ilLMPageObjectGUI::_goto(), ilLMPageObject::_splitPage(), ilLMPageObject::_splitPageNext(), ilLMPresentationGUI::getLinkXML(), ilLMPageObjectGUI::getLinkXML(), ilGlossaryPresentationGUI::getLinkXML(), ilGlossaryPresentationGUI::listDefinitions(), ilObjContentObjectGUI::pasteChapter(), ilStructureObjectGUI::pastePage(), ilObjContentObjectGUI::pastePage(), SurveyQuestion::setMaterial(), and ilStructureObjectGUI::view().
{ global $ilDB; $query = "SELECT * FROM lm_data WHERE obj_id = '".$a_id."'"; $obj_set = $ilDB->query($query); $obj_rec = $obj_set->fetchRow(DB_FETCHMODE_ASSOC); return $obj_rec["lm_id"]; }
ilLMObject::_lookupNID | ( | $ | a_lm_id, | |
$ | a_lm_obj_id, | |||
$ | a_type | |||
) |
lookup named identifier (ILIAS_NID)
Definition at line 109 of file class.ilLMObject.php.
References $id.
Referenced by ilTableOfContentsExplorer::buildLinkTarget(), ilObjContentObject::exportPageHTML(), and ilLMPresentationGUI::getLink().
{ include_once 'Services/MetaData/classes/class.ilMD.php'; //echo "-".$a_lm_id."-".$a_lm_obj_id."-".$a_type."-"; $md = new ilMD($a_lm_id, $a_lm_obj_id, $a_type); $md_gen = $md->getGeneral(); foreach($md_gen->getIdentifierIds() as $id) { $md_id = $md_gen->getIdentifier($id); if ($md_id->getCatalog() == "ILIAS_NID") { return $md_id->getEntry(); } } return false; }
ilLMObject::_lookupTitle | ( | $ | a_obj_id | ) |
Definition at line 245 of file class.ilLMObject.php.
References $query.
Referenced by ilSearchResultPresentationGUI::__appendChildLinks(), ilCourseObjectivePresentationGUI::__showLearningMaterials(), ilCourseContentInterface::__showLearningMaterials(), ilObjContentObjectGUI::confirmedDelete(), ilStructureObjectGUI::cutPage(), ilObjMediaObjectGUI::getMapAreaLinkString(), ilStructureObjectGUI::pastePage(), ilObjContentObjectGUI::proceedDragDrop(), ilLMPresentationGUI::showPreconditionsOfPage(), and ilObjMediaObjectGUI::showUsagesObject().
{ global $ilDB; $query = "SELECT * FROM lm_data WHERE obj_id = '".$a_obj_id."'"; $obj_set = $ilDB->query($query); $obj_rec = $obj_set->fetchRow(DB_FETCHMODE_ASSOC); return $obj_rec["title"]; }
ilLMObject::_lookupType | ( | $ | a_obj_id | ) |
Definition at line 256 of file class.ilLMObject.php.
References $query.
Referenced by ilSearchResultPresentationGUI::__appendChildLinks(), ilLMPageObject::_splitPage(), and ilLMPageObject::_splitPageNext().
{ global $ilDB; $query = "SELECT * FROM lm_data WHERE obj_id = '".$a_obj_id."'"; $obj_set = $ilDB->query($query); $obj_rec = $obj_set->fetchRow(DB_FETCHMODE_ASSOC); return $obj_rec["type"]; }
ilLMObject::_writeActive | ( | $ | a_id, | |
$ | a_active | |||
) |
write activation status
Definition at line 678 of file class.ilLMObject.php.
References $query, and ilUtil::tf2yn().
Referenced by ilStructureObjectGUI::activatePages(), and ilObjContentObjectGUI::activatePages().
{ global $ilDB; $query = "UPDATE lm_data ". " SET active = ".$ilDB->quote(ilUtil::tf2yn($a_active)). " WHERE obj_id = '".$a_id."'"; $ilDB->query($query); }
ilLMObject::_writeImportId | ( | $ | a_id, | |
$ | a_import_id | |||
) |
write import id to db (static)
int | $a_id lm object id | |
string | $a_import_id import id public |
Definition at line 367 of file class.ilLMObject.php.
References $q.
Referenced by ilContObjParser::handlerEndTag().
{ global $ilDB; $q = "UPDATE lm_data ". "SET ". "import_id = ".$ilDB->quote($a_import_id).",". "last_update = now() ". "WHERE obj_id = ".$ilDB->quote($a_id); $ilDB->query($q); }
ilLMObject::_writePublicAccessStatus | ( | $ | a_pages, | |
$ | a_cont_obj_id | |||
) | [static] |
update public access flags in lm_data for all pages of a content object
public
array | page ids | |
integer | content object id |
Definition at line 430 of file class.ilLMObject.php.
References $ilErr, $ilLog, $q, and $row.
Referenced by ilObjContentObjectGUI::savePublicSection().
{ global $ilDB,$ilLog,$ilErr,$ilTree; if (!is_array($a_pages)) {$a_pages = array(0); /*$message = sprintf('ilLMObject::_writePublicAccessStatus(): Invalid parameter! $a_pages must be an array'); $ilLog->write($message,$ilLog->WARNING); $ilErr->raiseError($message,$ilErr->MESSAGE); return false;*/ } if (empty($a_cont_obj_id)) { $message = sprintf('ilLMObject::_writePublicAccessStatus(): Invalid parameter! $a_cont_obj_id is empty'); $ilLog->write($message,$ilLog->WARNING); $ilErr->raiseError($message,$ilErr->MESSAGE); return false; } // update structure entries: if at least one page of a chapter is public set chapter to public too $lm_tree = new ilTree($a_cont_obj_id); $lm_tree->setTableNames('lm_tree','lm_data'); $lm_tree->setTreeTablePK("lm_id"); $lm_tree->readRootId(); // get all st entries of cont_obj $q = "SELECT obj_id FROM lm_data " . "WHERE lm_id = ".$ilDB->quote($a_cont_obj_id)." " . "AND type = 'st'"; $r = $ilDB->query($q); // add chapters with a public page to a_pages while ($row = $r->fetchRow()) { $childs = $lm_tree->getChilds($row[0]); foreach ($childs as $page) { if ($page["type"] == "pg" and in_array($page["obj_id"],$a_pages)) { array_push($a_pages, $row[0]); break; } } } // update public access status of all pages of cont_obj $q = "UPDATE lm_data SET " . "public_access = CASE " . "WHEN obj_id IN (".implode(',',$a_pages).") " . "THEN 'y' ". "ELSE 'n' ". "END " . "WHERE lm_id = ".$ilDB->quote($a_cont_obj_id)." " . "AND type IN ('pg','st')"; $ilDB->query($q); return true; }
ilLMObject::_writeTitle | ( | $ | a_obj_id, | |
$ | a_title | |||
) |
Definition at line 268 of file class.ilLMObject.php.
References $query.
Referenced by MDUpdateListener().
{ global $ilDB; $query = "UPDATE lm_data SET ". " title = ".$ilDB->quote($a_title). " WHERE obj_id = ".$ilDB->quote($a_obj_id); $ilDB->query($query); }
ilLMObject::create | ( | $ | a_upload = false |
) |
Reimplemented in ilLMPageObject, and ilStructureObject.
Definition at line 380 of file class.ilLMObject.php.
References $query, ilHistory::_createEntry(), createMetaData(), getActive(), getId(), getImportId(), getLMId(), getTitle(), getType(), setId(), and ilUtil::tf2yn().
{ global $ilDB; // insert object data $query = "INSERT INTO lm_data (title, type, lm_id, import_id, create_date, active) ". "VALUES ('".ilUtil::prepareDBString($this->getTitle())."','".$this->getType()."', ".$this->getLMId().",'".$this->getImportId(). "', now(),".$ilDB->quote(ilUtil::tf2yn($this->getActive())).")"; $this->ilias->db->query($query); $this->setId($this->ilias->db->getLastInsertId()); // create history entry include_once("classes/class.ilHistory.php"); ilHistory::_createEntry($this->getId(), "create", "", $this->content_object->getType().":".$this->getType()); if (!$a_upload) { $this->createMetaData(); } }
ilLMObject::createMetaData | ( | ) |
create meta data entry
Definition at line 131 of file class.ilLMObject.php.
References getDescription(), getId(), getLMId(), getTitle(), and getType().
Referenced by create().
{ include_once 'Services/MetaData/classes/class.ilMDCreator.php'; global $ilUser; $md_creator = new ilMDCreator($this->getLMId(), $this->getId(), $this->getType()); $md_creator->setTitle($this->getTitle()); $md_creator->setTitleLanguage($ilUser->getPref('language')); $md_creator->setDescription($this->getDescription()); $md_creator->setDescriptionLanguage($ilUser->getPref('language')); $md_creator->setKeywordLanguage($ilUser->getPref('language')); $md_creator->setLanguage($ilUser->getPref('language')); $md_creator->create(); return true; }
ilLMObject::delete | ( | $ | a_delete_meta_data = true |
) |
delete lm object data
Reimplemented in ilLMPageObject, and ilStructureObject.
Definition at line 526 of file class.ilLMObject.php.
References $query, and deleteMetaData().
{ $query = "DELETE FROM lm_data WHERE obj_id= '".$this->getId()."'"; $this->ilias->db->query($query); $this->deleteMetaData(); }
ilLMObject::deleteMetaData | ( | ) |
delete meta data entry
Definition at line 178 of file class.ilLMObject.php.
References getId(), getLMId(), and getType().
Referenced by delete().
{ // Delete meta data include_once('Services/MetaData/classes/class.ilMD.php'); $md = new ilMD($this->getLMId(), $this->getId(), $this->getType()); $md->deleteAll(); }
ilLMObject::getActive | ( | ) |
get activation
Definition at line 355 of file class.ilLMObject.php.
Referenced by create(), and update().
{
return $this->active;
}
& ilLMObject::getContentObject | ( | ) |
Definition at line 315 of file class.ilLMObject.php.
Referenced by ilStructureObject::copy(), ilLMPageObject::copy(), ilStructureObject::exportFOPageObjects(), ilLMPageObject::exportXMLPageContent(), and ilStructureObject::exportXMLStructureObjects().
{
return $this->content_object;
}
ilLMObject::getDescription | ( | ) |
Definition at line 284 of file class.ilLMObject.php.
Referenced by ilStructureObject::copy(), ilLMPageObject::copy(), ilLMPageObject::copyToOtherContObject(), and createMetaData().
{
return $this->description;
}
ilLMObject::getId | ( | ) |
Reimplemented in ilLMPageObject.
Definition at line 325 of file class.ilLMObject.php.
Referenced by ilStructureObject::copy(), create(), createMetaData(), ilStructureObject::delete(), ilStructureObject::delete_rec(), deleteMetaData(), ilStructureObject::exportFOPageObjects(), ilStructureObject::exportXML(), ilStructureObject::exportXMLMetaData(), ilStructureObject::exportXMLPageObjects(), ilStructureObject::exportXMLStructureObjects(), MDUpdateListener(), ilStructureObject::modifyExportIdentifier(), update(), and updateMetaData().
{
return $this->id;
}
ilLMObject::getImportId | ( | ) |
Definition at line 330 of file class.ilLMObject.php.
Referenced by create().
{
return $this->import_id;
}
ilLMObject::getLMId | ( | ) |
Definition at line 305 of file class.ilLMObject.php.
Referenced by ilStructureObject::copy(), ilLMPageObject::copy(), ilLMPageObject::copyToOtherContObject(), ilLMPageObject::create(), create(), createMetaData(), deleteMetaData(), ilStructureObject::exportXMLMetaData(), ilLMPageObject::exportXMLMetaData(), MDUpdateListener(), update(), and updateMetaData().
{
return $this->lm_id;
}
ilLMObject::getObjectList | ( | $ | lm_id, | |
$ | type = "" | |||
) |
static
Definition at line 599 of file class.ilLMObject.php.
Referenced by ilLMPageObject::getPageList().
{ global $ilDB; $type_str = ($type != "") ? "AND type = '$type' " : ""; $query = "SELECT * FROM lm_data ". "WHERE lm_id= '".$lm_id."'". $type_str." ". "ORDER BY title"; $obj_set = $ilDB->query($query); $obj_list = array(); while($obj_rec = $obj_set->fetchRow(DB_FETCHMODE_ASSOC)) { $obj_list[] = array("obj_id" => $obj_rec["obj_id"], "title" => $obj_rec["title"], "type" => $obj_rec["type"]); } return $obj_list; }
ilLMObject::getTitle | ( | ) |
get title of lm object
Definition at line 239 of file class.ilLMObject.php.
Referenced by ilStructureObject::copy(), ilLMPageObject::copy(), ilLMPageObject::copyToOtherContObject(), create(), createMetaData(), ilStructureObject::exportFO(), update(), and updateMetaData().
{
return $this->title;
}
ilLMObject::getType | ( | ) |
Definition at line 294 of file class.ilLMObject.php.
Referenced by ilStructureObject::copy(), ilLMPageObject::copy(), ilLMPageObject::copyToOtherContObject(), create(), createMetaData(), deleteMetaData(), ilStructureObject::exportXMLMetaData(), ilLMPageObject::exportXMLMetaData(), MDUpdateListener(), and updateMetaData().
{
return $this->type;
}
ilLMObject::ilLMObject | ( | &$ | a_content_obj, | |
$ | a_id = 0 | |||
) |
object | $a_content_obj content object (digi book or learning module) |
Definition at line 52 of file class.ilLMObject.php.
References $ilias, read(), setContentObject(), and setLMId().
Referenced by ilLMPageObject::ilLMPageObject(), and ilStructureObject::ilStructureObject().
{ global $ilias; $this->ilias =& $ilias; $this->id = $a_id; $this->setContentObject($a_content_obj); $this->setLMId($a_content_obj->getId()); if($a_id != 0) { $this->read(); } }
ilLMObject::MDUpdateListener | ( | $ | a_element | ) |
Meta data update listener.
Important note: Do never call create() or update() method of ilObject here. It would result in an endless loop: update object -> update meta -> update object -> ... Use static _writeTitle() ... methods instead.
string | $a_element |
Definition at line 77 of file class.ilLMObject.php.
References $id, _writeTitle(), getId(), getLMId(), and getType().
{ include_once 'Services/MetaData/classes/class.ilMD.php'; switch($a_element) { case 'General': // Update Title and description $md = new ilMD($this->getLMId(), $this->getId(), $this->getType()); $md_gen = $md->getGeneral(); ilLMObject::_writeTitle($this->getId(),$md_gen->getTitle()); foreach($md_gen->getDescriptionIds() as $id) { $md_des = $md_gen->getDescription($id); // ilLMObject::_writeDescription($this->getId(),$md_des->getDescription()); break; } break; default: } return true; }
ilLMObject::read | ( | ) |
Reimplemented in ilLMPageObject.
Definition at line 196 of file class.ilLMObject.php.
References $ilBench, $query, setActive(), setImportId(), setTitle(), and ilUtil::yn2tf().
Referenced by ilLMObject().
{ global $ilBench, $ilDB; $ilBench->start("ContentPresentation", "ilLMObject_read"); if(!isset($this->data_record)) { $ilBench->start("ContentPresentation", "ilLMObject_read_getData"); $query = "SELECT * FROM lm_data WHERE obj_id = ".$ilDB->quote($this->id).""; $obj_set = $this->ilias->db->query($query); $this->data_record = $obj_set->fetchRow(DB_FETCHMODE_ASSOC); $ilBench->stop("ContentPresentation", "ilLMObject_read_getData"); } $this->type = $this->data_record["type"]; /* $ilBench->start("ContentPresentation", "ilLMObject_read_getMeta"); $this->meta_data =& new ilMetaData($this->type, $this->id); $ilBench->stop("ContentPresentation", "ilLMObject_read_getMeta"); */ $this->setImportId($this->data_record["import_id"]); $this->setTitle($this->data_record["title"]); $this->setActive(ilUtil::yn2tf($this->data_record["active"])); $ilBench->stop("ContentPresentation", "ilLMObject_read"); }
ilLMObject::setActive | ( | $ | a_active | ) |
set activation
boolean | $a_active true/false for active or not |
Definition at line 345 of file class.ilLMObject.php.
Referenced by read().
{ $this->active = $a_active; }
ilLMObject::setContentObject | ( | &$ | a_content_obj | ) |
Definition at line 310 of file class.ilLMObject.php.
Referenced by ilLMObject().
{ $this->content_object =& $a_content_obj; }
ilLMObject::setDataRecord | ( | $ | a_record | ) |
this method should only be called by class ilLMObjectFactory
Definition at line 191 of file class.ilLMObject.php.
{ $this->data_record = $a_record; }
ilLMObject::setDescription | ( | $ | a_description | ) |
Definition at line 279 of file class.ilLMObject.php.
{ $this->description = $a_description; }
ilLMObject::setId | ( | $ | a_id | ) |
Reimplemented in ilLMPageObject.
Definition at line 320 of file class.ilLMObject.php.
Referenced by create().
{
$this->id = $a_id;
}
ilLMObject::setImportId | ( | $ | a_id | ) |
Definition at line 335 of file class.ilLMObject.php.
Referenced by read().
{ $this->import_id = $a_id; }
ilLMObject::setLMId | ( | $ | a_lm_id | ) |
Definition at line 299 of file class.ilLMObject.php.
Referenced by ilLMObject().
{ $this->lm_id = $a_lm_id; }
ilLMObject::setTitle | ( | $ | a_title | ) |
set title of lm object
string | $a_title title of chapter or page |
Definition at line 229 of file class.ilLMObject.php.
Referenced by read().
{ $this->title = $a_title; }
ilLMObject::setType | ( | $ | a_type | ) |
Definition at line 289 of file class.ilLMObject.php.
Referenced by ilLMPageObject::ilLMPageObject(), and ilStructureObject::ilStructureObject().
{ $this->type = $a_type; }
ilLMObject::update | ( | ) |
update complete object
Definition at line 406 of file class.ilLMObject.php.
References $query, getActive(), getId(), getLMId(), getTitle(), ilUtil::tf2yn(), and updateMetaData().
{ global $ilDB; $this->updateMetaData(); $query = "UPDATE lm_data SET ". " lm_id = ".$ilDB->quote($this->getLMId()). " ,title = ".$ilDB->quote($this->getTitle()). " ,active = ".$ilDB->quote(ilUtil::tf2yn($this->getActive())). " WHERE obj_id = ".$ilDB->quote($this->getId()); $ilDB->query($query); }
ilLMObject::updateMetaData | ( | ) |
update meta data entry
Definition at line 152 of file class.ilLMObject.php.
References getId(), getLMId(), getTitle(), and getType().
Referenced by update().
{ include_once("Services/MetaData/classes/class.ilMD.php"); include_once("Services/MetaData/classes/class.ilMDGeneral.php"); include_once("Services/MetaData/classes/class.ilMDDescription.php"); $md =& new ilMD($this->getLMId(), $this->getId(), $this->getType()); $md_gen =& $md->getGeneral(); $md_gen->setTitle($this->getTitle()); // sets first description (maybe not appropriate) $md_des_ids =& $md_gen->getDescriptionIds(); if (count($md_des_ids) > 0) { $md_des =& $md_gen->getDescription($md_des_ids[0]); // $md_des->setDescription($this->getDescription()); $md_des->update(); } $md_gen->update(); }
ilLMObject::$active = true |
Definition at line 47 of file class.ilLMObject.php.
ilLMObject::$content_object |
Definition at line 44 of file class.ilLMObject.php.
ilLMObject::$data_record |
Definition at line 43 of file class.ilLMObject.php.
ilLMObject::$description |
Definition at line 46 of file class.ilLMObject.php.
ilLMObject::$id |
Reimplemented in ilLMPageObject.
Definition at line 41 of file class.ilLMObject.php.
Referenced by _lookupNID(), and MDUpdateListener().
ilLMObject::$ilias |
Reimplemented in ilLMPageObject.
Definition at line 38 of file class.ilLMObject.php.
Referenced by ilLMObject().
ilLMObject::$lm_id |
Definition at line 39 of file class.ilLMObject.php.
Referenced by _getIdForImportId(), _isPagePublic(), ilLMPageObject::_splitPage(), ilLMPageObject::_splitPageNext(), and ilLMPageObject::getPageList().
ilLMObject::$meta_data |
Definition at line 42 of file class.ilLMObject.php.
ilLMObject::$title |
Definition at line 45 of file class.ilLMObject.php.
Referenced by ilLMPageObject::exportFO().
ilLMObject::$type |
Definition at line 40 of file class.ilLMObject.php.
Referenced by ilLMPageObject::_splitPage(), ilLMPageObject::_splitPageNext(), and getObjectList().