Public Member Functions | Static Public Member Functions | Data Fields

ilObject Class Reference

Class ilObject Basic functions for all objects. More...

Inheritance diagram for ilObject:

Public Member Functions

 ilObject ($a_id=0, $a_reference=true)
 Constructor public.
 withReferences ()
 determines wehter objects are referenced or not (got ref ids or not)
 read ($a_force_db=false)
 read object data from db into object
 getId ()
 get object id public
 setId ($a_id)
 set object id public
 setRefId ($a_id)
 set reference id public
 getRefId ()
 get reference id public
 getType ()
 get object type public
 setType ($a_type)
 set object type public
 getTitle ()
 get object title public
 setTitle ($a_title)
 set object title
 getDescription ()
 get object description
 setDescription ($a_desc)
 set object description
 getLongDescription ()
 get object long description (stored in object_description)
 getImportId ()
 get import id
 setImportId ($a_import_id)
 set import id
 _lookupObjIdByImportId ($a_import_id)
 getOwner ()
 get object owner
 getOwnerName ()
 _lookupOwnerName ($a_owner_id)
 lookup owner name for owner id
 setOwner ($a_owner)
 set object owner
 getCreateDate ()
 get create date public
 getLastUpdateDate ()
 get last update date public
 setObjDataRecord ($a_record)
 set object_data record (note: this method should only be called from the ilObjectFactory class)
 create ()
 create
 update ()
 update object in db
 MDUpdateListener ($a_element)
 Meta data update listener.
 createMetaData ()
 create meta data entry
 updateMetaData ()
 update meta data entry
 deleteMetaData ()
 delete meta data entry
 updateOwner ()
 update owner of object in db
 _getIdForImportId ($a_import_id)
 get current object id for import id (static)
 _getAllReferences ($a_id)
 get all reference ids of object
 _lookupTitle ($a_id)
 lookup object title
 _lookupDescription ($a_id)
 lookup object description
 _lookupLastUpdate ($a_id, $a_as_string=false)
 lookup last update
 _lookupObjId ($a_id)
 _setDeletedDate ($a_ref_id)
 only called in ilTree::saveSubTree
 _resetDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes
 _writeTitle ($a_obj_id, $a_title)
 write title to db (static)
 _writeDescription ($a_obj_id, $a_desc)
 write description to db (static)
 _writeImportId ($a_obj_id, $a_import_id)
 write import id to db (static)
 _lookupType ($a_id, $a_reference=false)
 lookup object type
 _isInTrash ($a_ref_id)
 checks wether object is in trash
 _hasUntrashedReference ($a_obj_id)
 checks wether an object has at least one reference that is not in trash
 _lookupObjectId ($a_ref_id)
 lookup object id
 _getObjectsDataForType ($a_type, $a_omit_trash=false)
 get all objects of a certain type
 putInTree ($a_parent_ref)
 maybe this method should be in tree object!?
 setPermissions ($a_parent_ref)
 set permissions of object
 createReference ()
 creates reference for object
 countReferences ()
 count references of object
 ilClone ($a_parent_ref)
 ilClone object into tree basic clone function.
 delete ()
 delete object or referenced object (in the case of a referenced object, object data is only deleted if last reference is deleted) This function removes an object entirely from system!!
 initDefaultRoles ()
 init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type If you want to setup default local roles you MUST overwrite this method in derived object classes (see ilObjForum for an example) public
 createRoleFolder ()
 creates a local role folder
 notify ($a_event, $a_ref_id, $a_parent_non_rbac_id, $a_node_id, $a_params=0)
 notifys an object about an event occured Based on the event passed, each object may decide how it reacts.
 setRegisterMode ($a_bool)
 isUserRegistered ($a_user_id=0)
 requireRegistration ()
 getXMLZip ()
 getHTMLDirectory ()

Static Public Member Functions

 _exists ($a_id, $a_reference=false)
 checks if an object exists in object_data

Data Fields

 $ilias
 $lng
 $id
 $ref_id
 $type
 $title
 $desc
 $long_desc
 $owner
 $create_date
 $last_update
 $import_id
 $register = false
 $referenced
 $objectList
 $max_title
 $max_desc
 $add_dots
 $obj_data_record
 object_data record

Detailed Description

Class ilObject Basic functions for all objects.

Author:
Stefan Meyer <smeyer@databay.de>
Alex Killing <alex.killing@gmx.de>
Version:
Id:
class.ilObject.php 12989 2007-01-13 00:25:38Z akill

Definition at line 33 of file class.ilObject.php.


Member Function Documentation

ilObject::_exists ( a_id,
a_reference = false 
) [static]

checks if an object exists in object_data

public

Parameters:
integer object id or reference id
boolean ture if id is a reference, else false (default)
Returns:
boolean true if object exists

Definition at line 1355 of file class.ilObject.php.

References $ilias, and $q.

Referenced by _lookupOwnerName(), ilPageObject::collectMediaObjects(), ilObjRoleFolderGUI::confirmedDeleteObject(), ilPageObject::delete(), ilObjRole::delete(), ilObjContentObject::exportHTML(), ilObjContentObject::exportXMLMediaObjects(), ilForum::fetchPostNodeData(), ilPageObject::getContentObject(), ilObjStyleSheet::getContentStylePath(), ilObjExercise::getMemberListData(), ilPageObject::getMultimediaXML(), ilObjGroup::getNewRegistrations(), ilObjForumListGUI::getProperties(), ilForumExport::getUserData(), ilForum::getUserData(), ilPageObjectGUI::showPage(), ilObjSCORMLearningModuleGUI::showTrackingItem(), and ilPageObject::update().

        {
                global $ilias;
                
                if ($a_reference)
                {
                        $q = "SELECT * FROM object_data ".
                                 "LEFT JOIN object_reference ON object_reference.obj_id=object_data.obj_id ".
                                 "WHERE object_reference.ref_id='".$a_id."'";
                }
                else
                {
                        $q = "SELECT * FROM object_data WHERE obj_id='".$a_id."'";
                }
                
                $r = $ilias->db->query($q);

                return $r->numRows() ? true : false;
        }

Here is the caller graph for this function:

ilObject::_getAllReferences ( a_id  ) 

get all reference ids of object

Parameters:
int $a_id object id

Definition at line 821 of file class.ilObject.php.

References $q.

Referenced by ilObjectXMLWriter::__appendObject(), ilRepositorySearchGUI::__fillGroupTable(), ilLPListOfProgressGUI::__initDetails(), ilLPCollections::__read(), ilPersonalDesktopGUI::__showActiveChatsOfUser(), ilObjGlossaryAccess::_checkGoto(), ilObjContentObjectAccess::_checkGoto(), ilObjStyleSheet::_getClonableContentStyles(), ilLPCollections::_getItems(), ilObjGroup::_getMembers(), ilStructureObjectGUI::_goto(), ilLMPageObjectGUI::_goto(), ilGlossaryTermGUI::_goto(), _hasUntrashedReference(), ilSoapCourseAdministration::assignCourseMember(), ilSoapGroupAdministration::assignGroupMember(), ilWebAccessChecker::checkAccess(), ilSoapCourseAdministration::deleteCourse(), ilSoapCourseAdministration::excludeCourseMember(), ilSoapGroupAdministration::excludeGroupMember(), ilSearchResult::filter(), ilSoapCourseAdministration::getCourseXML(), ilMail::getEmailsOfRecipients(), ilSoapObjectAdministration::getRefIdsByImportId(), ilSoapObjectAdministration::getRefIdsByObjId(), ilMail::getUserIds(), ilSoapCourseAdministration::isAssignedToCourse(), ilSoapGroupAdministration::isAssignedToGroup(), ilSoapObjectAdministration::removeFromSystemByImportId(), ilCronForumNotification::sendNotifications(), ilNoteGUI::showTargets(), ilSoapCourseAdministration::updateCourse(), and ilSoapObjectAdministration::updateObjects().

        {
                global $ilDB;

                $q = "SELECT * FROM object_reference WHERE obj_id = ".
                        $ilDB->quote($a_id);
                $obj_set = $ilDB->query($q);
                $ref = array();

                while ($obj_rec = $obj_set->fetchRow(DB_FETCHMODE_ASSOC))
                {
                        $ref[$obj_rec["ref_id"]] = $obj_rec["ref_id"];
                }

                return $ref;
        }

Here is the caller graph for this function:

ilObject::_getIdForImportId ( a_import_id  ) 

get current object id for import id (static)

Parameters:
int $a_import_id import id
Returns:
int id

Definition at line 798 of file class.ilObject.php.

References $q.

        {
                global $ilDB;
                
                $q = "SELECT * FROM object_data WHERE import_id = ".$ilDB->quote($a_import_id).
                        " ORDER BY create_date DESC LIMIT 1";
                $obj_set = $ilDB->query($q);

                if ($obj_rec = $obj_set->fetchRow(DB_FETCHMODE_ASSOC))
                {
                        return $obj_rec["obj_id"];
                }
                else
                {
                        return 0;
                }
        }

ilObject::_getObjectsDataForType ( a_type,
a_omit_trash = false 
)

get all objects of a certain type

Parameters:
string $a_type desired object type
boolean $a_omit_trash omit objects, that are in trash only (default: false)
Returns:
array array of object data arrays ("id", "title", "type", "description")

Definition at line 1081 of file class.ilObject.php.

References $q, and _hasUntrashedReference().

        {
                global $ilDB;

                $q = "SELECT * FROM object_data WHERE type = ".$ilDB->quote($a_type);
                $obj_set = $ilDB->query($q);

                $objects = array();
                while ($obj_rec = $obj_set->fetchRow(DB_FETCHMODE_ASSOC))
                {
                        if ((!$a_omit_trash) || ilObject::_hasUntrashedReference($obj_rec["obj_id"]))
                        {
                                $objects[$obj_rec["title"].".".$obj_rec["obj_id"]] = array("id" => $obj_rec["obj_id"],
                                        "type" => $obj_rec["type"], "title" => $obj_rec["title"],
                                        "description" => $obj_rec["description"]);
                        }
                }
                ksort($objects);
                return $objects;
        }

Here is the call graph for this function:

ilObject::_hasUntrashedReference ( a_obj_id  ) 
ilObject::_isInTrash ( a_ref_id  ) 

checks wether object is in trash

Definition at line 1035 of file class.ilObject.php.

References $tree.

Referenced by _hasUntrashedReference(), ilSoapObjectAdministration::addObject(), and ilSoapObjectAdministration::getObjectByReference().

        {
                global $tree;

                return $tree->isSaved($a_ref_id);
        }

Here is the caller graph for this function:

ilObject::_lookupDescription ( a_id  ) 

lookup object description

Parameters:
int $a_id object id

Definition at line 855 of file class.ilObject.php.

Referenced by ilObjStyleSettingsGUI::editContentStylesObject(), ilSearchResult::getResultsForPresentation(), ilSearchresultGUI::showResults(), and ilObjStyleSheetFolderGUI::viewObject().

        {
                global $ilObjDataCache;

                return $ilObjDataCache->lookupDescription($a_id);
        }

Here is the caller graph for this function:

ilObject::_lookupLastUpdate ( a_id,
a_as_string = false 
)

lookup last update

Parameters:
int $a_id object id

Definition at line 867 of file class.ilObject.php.

References formatDate().

Referenced by ilObjFileListGUI::getProperties().

        {
                global $ilObjDataCache;
                
                if ($a_as_string)
                {
                        include_once("classes/class.ilFormat.php");
                        return ilFormat::formatDate($ilObjDataCache->lookupLastUpdate($a_id), "datetime", true);
                }
                else
                {
                        return $ilObjDataCache->lookupLastUpdate($a_id);
                }
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilObject::_lookupObjectId ( a_ref_id  ) 

lookup object id

Parameters:
int $a_id object id

Definition at line 1064 of file class.ilObject.php.

Referenced by ilObjContentObjectGUI::addMenuEntry(), ilObjiLincClassroomGUI::create(), ilObjiLincClassroomGUI::displayEditForm(), ilContainerGUI::editPageContentObject(), ilSAHSPresentationGUI::executeCommand(), ilRepositoryExplorer::isClickable(), ilObjSurveyGUI::propertiesObject(), ilObjTestGUI::propertiesObject(), and ilObjiLincClassroomGUI::save().

        {
                global $ilObjDataCache;

                return (int) $ilObjDataCache->lookupObjId($a_ref_id);
        }

Here is the caller graph for this function:

ilObject::_lookupObjId ( a_id  ) 

Definition at line 882 of file class.ilObject.php.

Referenced by ilObjCategoryGUI::__buildFilterSelect(), ilObjSurveyGUI::_goto(), ilObjLinkResourceGUI::_goto(), ilObjCourseGUI::_goto(), ilObjSAHSLearningModuleGUI::_goto(), ilObjGlossaryGUI::_goto(), ilObjFileBasedLMGUI::_goto(), ilObjContentObjectGUI::_goto(), ilObjGroupGUI::_goto(), ilObjForumGUI::_goto(), ilObjFileGUI::_goto(), ilObjExerciseGUI::_goto(), ilObjCategoryGUI::_goto(), ilObjChatGUI::_goto(), ilObjTestGUI::_goto(), ilObjUserGUI::addAdminLocatorItems(), ilObjStyleSheetGUI::addAdminLocatorItems(), ilObjRoleTemplateGUI::addAdminLocatorItems(), ilObjRoleGUI::addAdminLocatorItems(), ilObjContentObjectGUI::addLocations(), ilSoapCourseAdministration::assignCourseMember(), ilSoapGroupAdministration::assignGroupMember(), ilTableOfContentsExplorer::buildTitle(), ilObjAdvancedEditingGUI::clearCategoryPageObject(), ilUserResult::createLink(), ilSoapCourseAdministration::deleteCourse(), ilObjStyleSettingsGUI::editContentStylesObject(), ilSoapCourseAdministration::excludeCourseMember(), ilSoapGroupAdministration::excludeGroupMember(), ilSoapCourseAdministration::getCourseXML(), ilObjMediaObjectGUI::getMapAreaLinkString(), ilLMPresentationGUI::ilLocator(), ilObjectListGUI::insertPath(), ilSoapCourseAdministration::isAssignedToCourse(), ilSoapGroupAdministration::isAssignedToGroup(), ilObjCategoryGUI::listUsersObject(), ilObjRoleGUI::permObject(), ilStartUpGUI::processStartingPage(), ilAdvancedSearchGUI::saveResult(), ilSearchGUI::saveResult(), ilSearchresultGUI::showResults(), ilSearchGUI::showSearch(), ilNoteGUI::showTargets(), ilObjAdvancedEditingGUI::undoLastCategoryChangeObject(), and ilSoapCourseAdministration::updateCourse().

        {
                global $ilObjDataCache;

                return (int) $ilObjDataCache->lookupObjId($a_id);
        }

Here is the caller graph for this function:

ilObject::_lookupObjIdByImportId ( a_import_id  ) 

Definition at line 429 of file class.ilObject.php.

References $query, $res, and $row.

Referenced by ilSoapObjectAdministration::addObject(), ilSoapObjectAdministration::getObjIdByImportId(), ilSoapObjectAdministration::getRefIdsByImportId(), and ilSoapObjectAdministration::removeFromSystemByImportId().

        {
                global $ilDB;

                $query = "SELECT * FROM object_data ".
                        "WHERE import_id = '".$a_import_id."' ".
                        "ORDER BY create_date DESC";
                $res = $ilDB->query($query);
                while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
                {
                        return $row->obj_id;
                }
                return 0;
        }

Here is the caller graph for this function:

ilObject::_lookupOwnerName ( a_owner_id  ) 

lookup owner name for owner id

Definition at line 469 of file class.ilObject.php.

References $lng, $owner, and _exists().

Referenced by getOwnerName().

        {
                global $lng;

                if ($a_owner_id != -1)
                {
                        if (ilObject::_exists($a_owner_id))
                        {
                                $owner = new ilObjUser($a_owner_id);
                        }
                }

                if (is_object($owner))
                {
                        $own_name = $owner->getFullname();
                }
                else
                {
                        $own_name = $lng->txt("unknown");
                }

                return $own_name;
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilObject::_lookupTitle ( a_id  ) 

lookup object title

Parameters:
int $a_id object id

Definition at line 843 of file class.ilObject.php.

Referenced by ilObjCategoryGUI::__buildFilterSelect(), ilRegistrationSettingsGUI::__buildRoleSelection(), ilRegistrationSettingsGUI::__prepareAutomaticRoleList(), ilPersonalDesktopGUI::__showActiveChatsOfUser(), ilObjCourseGUI::__showWaitingList(), ilRegistrationGUI::__validateRole(), ilObjStyleSheet::_getStandardStyles(), ilObjSurveyGUI::_goto(), ilObjLinkResourceGUI::_goto(), ilObjCourseGUI::_goto(), ilStructureObjectGUI::_goto(), ilObjSAHSLearningModuleGUI::_goto(), ilObjGlossaryGUI::_goto(), ilObjFileBasedLMGUI::_goto(), ilObjContentObjectGUI::_goto(), ilLMPageObjectGUI::_goto(), ilGlossaryTermGUI::_goto(), ilObjGroupGUI::_goto(), ilObjForumGUI::_goto(), ilObjFileGUI::_goto(), ilObjExerciseGUI::_goto(), ilObjCategoryGUI::_goto(), ilObjChatGUI::_goto(), ilObjTestGUI::_goto(), ilObjStyleSheetGUI::addAdminLocatorItems(), ilObjRoleTemplateGUI::addAdminLocatorItems(), ilObjContentObjectGUI::addLocations(), ilObjContentObjectGUI::addMenuEntry(), ilPersonalDesktopGUI::addParentRow(), ilObjStyleSheetFolder::addStyle(), ilObjStyleSettings::addStyle(), ilObjStyleSettingsGUI::confirmDeleteIndividualStyles(), ilObjMediaPoolGUI::confirmRemove(), ilPageEditorGUI::copyLinkedMediaToClipboard(), ilObjMediaPool::deleteChild(), ilObjStyleSheetGUI::deleteObject(), ilObjStyleSheetFolderGUI::deleteStyleObject(), ilObjStyleSettingsGUI::deleteStyleObject(), ilAccessHandler::doConditionCheck(), ilObjStyleSettingsGUI::editContentStylesObject(), ilRegistrationSettingsGUI::editRoles(), ilPageEditorGUI::executeCommand(), ilObjUserTracking::getAccessPerUserDetail(), ilObjSysUserTracking::getAccessPerUserDetail(), ilObjUserTracking::getAccessTotalPerObj(), ilObjSysUserTracking::getAccessTotalPerObj(), ilObjUser::getClipboardObjects(), ilHistoryGUI::getHistoryTable(), ilObjMediaObjectGUI::getMapAreaLinkString(), ilObjUser::getProfileAsString(), ilSearchResult::getResultsForPresentation(), ilLMPresentationGUI::ilLocator(), ilObjMediaPoolGUI::insertFromClipboard(), ilObjectListGUI::insertPath(), ilObjectListGUI::insertPreconditions(), ilGlossaryPresentationGUI::listDefinitions(), ilGlossaryPresentationGUI::listTermByGiven(), ilObjCategoryGUI::listUsersObject(), ilObjRoleGUI::permObject(), ilStartUpGUI::processStartingPage(), ilObjContentObjectGUI::properties(), ilAccountMail::replacePlaceholders(), ilAdvancedSearchGUI::saveResult(), ilSearchGUI::saveResult(), ilFeedbackGUI::showBarometerById(), ilPageObjectGUI::showMediaFullscreen(), ilPageObjectGUI::showPage(), ilLMPresentationGUI::showPreconditionsOfPage(), ilSearchresultGUI::showResults(), ilSearchGUI::showSearch(), ilNoteGUI::showTargets(), ilObjMediaObjectGUI::showUsagesObject(), and ilPDNotesGUI::view().

        {
                global $ilObjDataCache;

                return $ilObjDataCache->lookupTitle($a_id);
        }

Here is the caller graph for this function:

ilObject::_lookupType ( a_id,
a_reference = false 
)

lookup object type

Parameters:
int $a_id object id

Definition at line 999 of file class.ilObject.php.

References $q.

Referenced by ilSoapUserAdministration::__validateUserData(), ilHistory::_createEntry(), ilConditionHandler::_getConditionsOfTarget(), ilHistory::_getEntriesForObject(), ilObjContentObjectGUI::addMenuEntry(), ilPersonalDesktopGUI::addParentRow(), ilSoapRBACAdministration::addRoleFromTemplate(), ilContainerGUI::addToDeskObject(), ilSoapCourseAdministration::assignCourseMember(), ilObjRoleGUI::assignDesktopItemObject(), ilSoapGroupAdministration::assignGroupMember(), ilWebAccessChecker::checkAccess(), ilAccessHandler::checkAccessOfUser(), ilObjMediaPoolGUI::confirmRemove(), ilObjMediaPoolGUI::copyToClipboard(), ilObjMediaPool::deleteChild(), ilSoapCourseAdministration::deleteCourse(), ilObjSystemFolderGUI::displayList(), ilObjectGUI::displayList(), ilContainerGUI::editPageContentObject(), SurveyTextQuestionGUI::editQuestion(), SurveyOrdinalQuestionGUI::editQuestion(), SurveyNominalQuestionGUI::editQuestion(), SurveyMetricQuestionGUI::editQuestion(), assTextSubsetGUI::editQuestion(), assTextQuestionGUI::editQuestion(), assSingleChoiceGUI::editQuestion(), assOrderingQuestionGUI::editQuestion(), assNumericGUI::editQuestion(), assMultipleChoiceGUI::editQuestion(), assMatchingQuestionGUI::editQuestion(), assJavaAppletGUI::editQuestion(), assImagemapQuestionGUI::editQuestion(), assClozeTestGUI::editQuestion(), ilSoapCourseAdministration::excludeCourseMember(), ilSoapGroupAdministration::excludeGroupMember(), ilRepositoryGUI::executeCommand(), ilAdministrationGUI::executeCommand(), ilSearchResult::filter(), ilSoapCourseAdministration::getCourseXML(), ilLMPresentationGUI::getLinkXML(), ilLMPageObjectGUI::getLinkXML(), ilGlossaryPresentationGUI::getLinkXML(), ilObjectListGUI::getListItemHTML(), ilObjExercise::getMemberListData(), ilObjGroup::getNewRegistrations(), ilHistoryGUI::ilHistoryGUI(), ilInternalLinkGUI::ilInternalLinkGUI(), ilRepositoryGUI::ilRepositoryGUI(), ilSoapCourseAdministration::isAssignedToCourse(), ilSoapGroupAdministration::isAssignedToGroup(), ilObjectGUI::prepareOutput(), ilObjSurveyGUI::propertiesObject(), ilObjTestGUI::propertiesObject(), ilObjectGUI::redirectToRefId(), ilContainerGUI::removeFromDeskObject(), ilAccountMail::replacePlaceholders(), ilAdvancedSearchGUI::saveResult(), ilSearchGUI::saveResult(), ilMainMenuGUI::setTemplateVars(), ilNoteGUI::showTargets(), ilObjectGUI::showUpperIcon(), ilSoapCourseAdministration::updateCourse(), ilPDNotesGUI::view(), and ilPCParagraph::xml2output().

        {
                global $ilObjDataCache;

                if($a_reference)
                {
                        return $ilObjDataCache->lookupType($ilObjDataCache->lookupObjId($a_id));
                }
                return $ilObjDataCache->lookupType($a_id);

                global $ilDB;

                if ($a_reference === true)
                {
                        $q = "SELECT type FROM object_reference as obr, object_data as obd ".
                                "WHERE obr.ref_id = ".$ilDB->quote($a_id)." ".
                                "AND obr.obj_id = obd.obj_id ";
                        
                        #$q = "SELECT type FROM object_data as obj ".
                        #        "LEFT JOIN object_reference as ref ON ref.obj_id=obj.obj_id ".
                        #        "WHERE ref.ref_id = '".$a_id."'";
                }
                else
                {
                        $q = "SELECT type FROM object_data WHERE obj_id = ".$ilDB->quote($a_id);
                }

                $obj_set = $ilDB->query($q);
                $obj_rec = $obj_set->fetchRow(DB_FETCHMODE_ASSOC);

                return $obj_rec["type"];
        }

Here is the caller graph for this function:

ilObject::_resetDeletedDate ( a_ref_id  ) 

only called in ilObjectGUI::insertSavedNodes

Definition at line 904 of file class.ilObject.php.

References $q.

Referenced by ilTree::insertNode().

        {
                global $ilDB;
                
                $q = "UPDATE object_reference SET deleted= ".$ilDB->quote("0000-00-00 00:00:00").
                        " WHERE ref_id = ".$ilDB->quote($a_ref_id);
                $ilDB->query($q);
        }

Here is the caller graph for this function:

ilObject::_setDeletedDate ( a_ref_id  ) 

only called in ilTree::saveSubTree

Definition at line 892 of file class.ilObject.php.

References $q.

Referenced by ilTree::saveSubTree().

        {
                global $ilDB;
                
                $q = "UPDATE object_reference SET deleted=now() ".
                        "WHERE ref_id = ".$ilDB->quote($a_ref_id);
                $ilDB->query($q);
        }

Here is the caller graph for this function:

ilObject::_writeDescription ( a_obj_id,
a_desc 
)

write description to db (static)

Parameters:
int $a_obj_id object id
string $a_desc description public

Definition at line 940 of file class.ilObject.php.

References $desc, $q, $query, $res, ilUtil::prepareDBString(), and ilUtil::shortenText().

Referenced by ilObjMediaObject::MDUpdateListener(), and MDUpdateListener().

        {
                global $ilDB,$objDefinition;


                $desc = ilUtil::shortenText($a_desc,MAXLENGTH_OBJ_DESC,true);

                $q = "UPDATE object_data ".
                        "SET ".
                        "description = ".$ilDB->quote($desc).",".
                        "last_update = now() ".
                        "WHERE obj_id = ".$ilDB->quote($a_obj_id);

                $ilDB->query($q);

                if($objDefinition->isRBACObject($this->getType()))
                {
                        // Update long description
                        $res = $ilDB->query("SELECT * FROM object_description WHERE obj_id = '".$a_obj_id."'");
                        if($res->numRows())
                        {
                                $query = "UPDATE object_description SET description = '".
                                        ilUtil::prepareDBString($a_desc)."' ".
                                        "WHERE obj_id = '".$this->getId()."'";
                        }
                        else
                        {
                                $query = "INSERT INTO object_description SET obj_id = '".$this->getId()."', ".
                                        "description = '".ilUtil::prepareDBString($a_desc)."'";
                        }
                        $ilDB->query($query);
                }
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilObject::_writeImportId ( a_obj_id,
a_import_id 
)

write import id to db (static)

Parameters:
int $a_obj_id object id
string $a_import_id import id public

Definition at line 981 of file class.ilObject.php.

References $q.

Referenced by ilCourseXMLParser::handlerBeginTag(), ilObjGlossaryGUI::importFileObject(), and ilObjContentObjectGUI::importFileObject().

        {
                global $ilDB;

                $q = "UPDATE object_data ".
                        "SET ".
                        "import_id = ".$ilDB->quote($a_import_id).",".
                        "last_update = now() ".
                        "WHERE obj_id = ".$ilDB->quote($a_obj_id);

                $ilDB->query($q);
        }

Here is the caller graph for this function:

ilObject::_writeTitle ( a_obj_id,
a_title 
)

write title to db (static)

Parameters:
int $a_obj_id object id
string $a_title title public

Definition at line 920 of file class.ilObject.php.

References $q.

Referenced by ilObjMediaObject::MDUpdateListener(), MDUpdateListener(), and ilObjSAHSLearningModuleGUI::uploadObject().

        {
                global $ilDB;

                $q = "UPDATE object_data ".
                        "SET ".
                        "title = ".$ilDB->quote($a_title).",".
                        "last_update = now() ".
                        "WHERE obj_id = ".$ilDB->quote($a_obj_id);

                $ilDB->query($q);
        }

Here is the caller graph for this function:

ilObject::countReferences (  ) 

count references of object

public

Returns:
integer number of references for this object

Definition at line 1172 of file class.ilObject.php.

References $q, and $row.

Referenced by delete().

        {
                if (!isset($this->id))
                {
                        $message = "ilObject::countReferences(): No obj_id given!";
                        $this->ilias->raiseError($message,$this->ilias->error_obj->WARNING);
                }

                $q = "SELECT COUNT(ref_id) AS num FROM object_reference ".
                        "WHERE obj_id = '".$this->id."'";
                $row = $this->ilias->db->getRow($q);

                return $row->num;
        }

Here is the caller graph for this function:

ilObject::create (  ) 

create

note: title, description and type should be set when this function is called

public

Returns:
integer object id

Reimplemented in ilObjFile, ilObjMediaObject, ilObjNoteFolder, ilObjRole, ilObjFileBasedLM, ilObjMediaPool, ilObjSAHSLearningModule, and ilObjLinkResource.

Definition at line 547 of file class.ilObject.php.

References $log, $owner, $q, $query, getDescription(), getImportId(), getLongDescription(), getOwner(), getTitle(), ilUtil::prepareDBString(), setOwner(), and ilUtil::shortenText().

Referenced by ilObjSurveyQuestionPool::create(), ilObjSurvey::create(), ilObjCourse::create(), ilObjGlossary::create(), ilObjContentObject::create(), ilObjStyleSheet::create(), ilObjTest::create(), ilObjQuestionPool::create(), ilObjStyleSheet::createFromXMLFile(), and ilObjNote::createObject().

        {
                global $ilDB, $log,$ilUser,$objDefinition;

                if (!isset($this->type))
                {
                        $message = get_class($this)."::create(): No object type given!";
                        $this->ilias->raiseError($message,$this->ilias->error_obj->WARNING);
                }

                // write log entry
                $log->write("ilObject::create(), start");

                $this->title = ilUtil::shortenText($this->getTitle(), $this->max_title, $this->add_dots);
                $this->desc = ilUtil::shortenText($this->getDescription(), $this->max_desc, $this->add_dots);
                
                // determine owner
                if ($this->getOwner() > 0)
                {
                        $owner = $this->getOwner();
                }
                else
                {
                        $owner = $ilUser->getId();
                }

                $q = "INSERT INTO object_data ".
                         "(type,title,description,owner,create_date,last_update,import_id) ".
                         "VALUES ".
                         "('".$this->type."',".$ilDB->quote($this->getTitle()).",'".ilUtil::prepareDBString($this->getDescription())."',".
                         "'".$owner."',now(),now(),'".
                        $this->getImportId()."')";

                $ilDB->query($q);

                $this->id = $ilDB->getLastInsertId();


                
                // Save long form of description if is rbac object
                if($objDefinition->isRBACObject($this->getType()))
                {
                        $query = "INSERT INTO object_description SET ".
                                "obj_id = '".$this->id."', ".
                                "description = '".ilUtil::prepareDBString($this->getLongDescription())."'";
                        
                        $ilDB->query($query);
                }
                

                // the line ($this->read();) messes up meta data handling: meta data,
                // that is not saved at this time, gets lost, so we query for the dates alone
                //$this->read();
                $q = "SELECT last_update, create_date FROM object_data".
                         " WHERE obj_id = '".$this->id."'";
                $obj_set = $this->ilias->db->query($q);
                $obj_rec = $obj_set->fetchRow(DB_FETCHMODE_ASSOC);
                $this->last_update = $obj_rec["last_update"];
                $this->create_date = $obj_rec["create_date"];

                // set owner for new objects
                $this->setOwner($owner);

                // write log entry
                $log->write("ilObject::create(), finished, obj_id: ".$this->id.", type: ".
                        $this->type.", title: ".$this->getTitle());

                return $this->id;
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilObject::createMetaData (  ) 

create meta data entry

Reimplemented in ilObjFile, and ilObjMediaObject.

Definition at line 713 of file class.ilObject.php.

References getId(), getLongDescription(), getTitle(), and getType().

Referenced by ilObjSurveyQuestionPool::create(), ilObjSurvey::create(), ilObjLinkResource::create(), ilObjCourse::create(), ilObjSAHSLearningModule::create(), ilObjGlossary::create(), ilObjFileBasedLM::create(), ilObjContentObject::create(), ilObjTest::create(), and ilObjQuestionPool::create().

        {
                include_once 'Services/MetaData/classes/class.ilMDCreator.php';

                global $ilUser;

                $md_creator = new ilMDCreator($this->getId(),0,$this->getType());
                $md_creator->setTitle($this->getTitle());
                $md_creator->setTitleLanguage($ilUser->getPref('language'));
                $md_creator->setDescription($this->getLongDescription());
                $md_creator->setDescriptionLanguage($ilUser->getPref('language'));
                $md_creator->setKeywordLanguage($ilUser->getPref('language'));
                $md_creator->setLanguage($ilUser->getPref('language'));
                $md_creator->create();

                return true;
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilObject::createReference (  ) 

creates reference for object

public

Returns:
integer reference_id of object

Reimplemented in ilObjQuestionPool, ilObjTest, ilObjMediaObject, ilObjStyleSheet, ilObjMediaObject, and ilObjSurvey.

Definition at line 1145 of file class.ilObject.php.

References $q.

        {
                global $ilDB;

                if (!isset($this->id))
                {
                        $message = "ilObject::createNewReference(): No obj_id given!";
                        $this->raiseError($message,$this->ilias->error_obj->WARNING);
                }

                $q = "INSERT INTO object_reference ".
                         "(obj_id) VALUES ('".$this->id."')";
                $this->ilias->db->query($q);

                $this->ref_id = $ilDB->getLastInsertId();
                $this->referenced = true;

                return $this->ref_id;
        }

ilObject::createRoleFolder (  ) 

creates a local role folder

public

Parameters:
string rolefolder title
string rolefolder description
object parent object where the rolefolder is attached to
Returns:
object rolefolder object

Definition at line 1321 of file class.ilObject.php.

References $rbacreview, getId(), and getRefId().

Referenced by ilObjiLincCourse::initDefaultRoles(), ilObjCourse::initDefaultRoles(), ilObjContentObject::initDefaultRoles(), ilObjGroup::initDefaultRoles(), ilObjForum::initDefaultRoles(), and ilObjChat::initDefaultRoles().

        {
                global $rbacreview;
                
                // does a role folder already exists?
                // (this check is only 'to be sure' that no second role folder is created under one object.
                // the if-construct should never return true)
                if ($rolf_data = $rbacreview->getRoleFolderofObject($this->getRefId()))
                {
                        $rfoldObj = $this->ilias->obj_factory->getInstanceByRefId($rolf_data["ref_id"]);
                }
                else
                {
                        include_once ("classes/class.ilObjRoleFolder.php");
                        $rfoldObj = new ilObjRoleFolder();
                        $rfoldObj->setTitle($this->getId());
                        $rfoldObj->setDescription(" (ref_id ".$this->getRefId().")");
                        $rfoldObj->create();
                        $rfoldObj->createReference();
                        $rfoldObj->putInTree($this->getRefId());
                        $rfoldObj->setPermissions($this->getRefId());
                }
                
                return $rfoldObj;
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilObject::delete (  ) 

delete object or referenced object (in the case of a referenced object, object data is only deleted if last reference is deleted) This function removes an object entirely from system!!

public

Returns:
boolean true if object was removed completely; false if only a references was removed

Reimplemented in ilObjQuestionPool, ilObjTest, ilObjChat, ilObjAdvancedEditing, ilObjAssessmentFolder, ilObjAuthSettings, ilObjCategory, ilObjExercise, ilObjExternalToolsSettings, ilObjFile, ilObjForum, ilObjGroup, ilObjLibFolder, ilObjObjectFolder, ilObjRecoveryFolder, ilObjRole, ilObjRoleFolder, ilObjRoleTemplate, ilObjRootFolder, ilObjStyleSettings, ilObjStyleSheet, ilObjStyleSheetFolder, ilObjSystemFolder, ilObjSysUserTracking, ilObjUser, ilObjUserFolder, ilObj< module_name >, ilObjAICCLearningModule, ilObjContentObject, ilObjFileBasedLM, ilObjGlossary, ilObjMediaPool, ilObjSAHSLearningModule, ilObjMediaObject, ilObjCourse, ilObjiLincClassroom, ilObjiLincCourse, ilObjLinkResource, ilObjSurvey, and ilObjSurveyQuestionPool.

Definition at line 1232 of file class.ilObject.php.

References $log, $q, $query, $rbacadmin, countReferences(), getId(), getRefId(), getTitle(), getType(), and ilUtil::removeItemFromDesktops().

        {
                global $rbacadmin, $log;

                $remove = false;

                // delete object_data entry
                if ((!$this->referenced) || ($this->countReferences() == 1))
                {
                        // delete entry in object_data
                        $q = "DELETE FROM object_data ".
                                "WHERE obj_id = '".$this->getId()."'";
                        $this->ilias->db->query($q);

                        // delete long description
                        $query = "DELETE FROM object_description WHERE obj_id = '".$this->getId()."'";
                        $this->ilias->db->query($query);

                        // write log entry
                        $log->write("ilObject::delete(), deleted object, obj_id: ".$this->getId().", type: ".
                                $this->getType().", title: ".$this->getTitle());
                        
                        $remove = true;
                }
                else
                {
                        // write log entry
                        $log->write("ilObject::delete(), object not deleted, number of references: ".
                                $this->countReferences().", obj_id: ".$this->getId().", type: ".
                                $this->getType().", title: ".$this->getTitle());
                }

                // delete object_reference entry
                if ($this->referenced)
                {
                        // delete entry in object_reference
                        $q = "DELETE FROM object_reference ".
                                "WHERE ref_id = '".$this->getRefId()."'";
                        $this->ilias->db->query($q);

                        // write log entry
                        $log->write("ilObject::delete(), reference deleted, ref_id: ".$this->getRefId().
                                ", obj_id: ".$this->getId().", type: ".
                                $this->getType().", title: ".$this->getTitle());

                        // DELETE PERMISSION ENTRIES IN RBAC_PA
                        // DONE: method overwritten in ilObjRole & ilObjUser.
                        // this call only applies for objects in rbac (not usr,role,rolt)
                        // TODO: Do this for role templates too
                        $rbacadmin->revokePermission($this->getRefId(),0,false);

                        // Remove desktop items
                        ilUtil::removeItemFromDesktops($this->getRefId());
                }

                // remove conditions
                if ($this->referenced)
                {
                        $ch =& new ilConditionHandler();
                        $ch->delete($this->getRefId());
                        unset($ch);
                }

                

                return $remove;
        }

Here is the call graph for this function:

ilObject::deleteMetaData (  ) 

delete meta data entry

Reimplemented in ilObjMediaObject.

Definition at line 759 of file class.ilObject.php.

References getId(), and getType().

Referenced by ilObjSurveyQuestionPool::delete(), ilObjSurvey::delete(), ilObjLinkResource::delete(), ilObjCourse::delete(), ilObjSAHSLearningModule::delete(), ilObjGlossary::delete(), ilObjFileBasedLM::delete(), ilObjContentObject::delete(), ilObjAICCLearningModule::delete(), ilObjFile::delete(), ilObjTest::delete(), and ilObjQuestionPool::delete().

        {
                // Delete meta data
                include_once('Services/MetaData/classes/class.ilMD.php');
                $md = new ilMD($this->getId(), 0, $this->getType());
                $md->deleteAll();
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilObject::getCreateDate (  ) 

get create date public

Returns:
string creation date

Definition at line 511 of file class.ilObject.php.

Referenced by ilObjUser::getProfileAsString().

        {
                return $this->create_date;
        }

Here is the caller graph for this function:

ilObject::getDescription (  ) 

get object description

public

Returns:
string object description

Reimplemented in ilObjQuestionPool, ilObjContentObject, ilObjGlossary, and ilObjMediaObject.

Definition at line 375 of file class.ilObject.php.

Referenced by ilObjExercise::__formatSubject(), create(), ilObjStyleSheet::ilClone(), ilClone(), ilObjSurvey::to_xml(), ilObjTest::to_xml(), ilObjiLincClassroom::update(), ilObjForum::update(), and update().

        {
                return $this->desc;
        }

Here is the caller graph for this function:

ilObject::getHTMLDirectory (  ) 

Reimplemented in ilObjChat.

Definition at line 1425 of file class.ilObject.php.

        {
                return false;
        }

ilObject::getId (  ) 

get object id public

Returns:
integer object id

Reimplemented in ilObjMediaObject.

Definition at line 287 of file class.ilObject.php.

Referenced by ilObjChat::__initChatRecording(), ilObjUser::addDesktopItem(), ilObjUser::addObjectToClipboard(), ilObjTest::addQTIMaterial(), ilObjContentObject::checkTree(), ilObjQuestionPool::copyQuestion(), ilObjMediaPool::create(), ilObjGlossary::create(), ilObjStyleSheet::create(), ilObjFile::create(), ilContainer::createContainerDirectory(), ilObjSurveyQuestionPool::createExportDirectory(), ilObjSurvey::createExportDirectory(), ilObjGlossary::createExportDirectory(), ilObjContentObject::createExportDirectory(), ilObjTest::createExportDirectory(), ilObjQuestionPool::createExportDirectory(), ilObjStyleSheet::createFromXMLFile(), ilObjSurveyQuestionPool::createImportDirectory(), ilObjSurvey::createImportDirectory(), ilObjGlossary::createImportDirectory(), ilObjContentObject::createImportDirectory(), ilObjContentObject::createLMTree(), ilObjFile::createMetaData(), createMetaData(), ilObjNote::createObject(), createRoleFolder(), ilObjLinkResource::delete(), ilObjCourse::delete(), ilObjSAHSLearningModule::delete(), ilObjFileBasedLM::delete(), ilObjContentObject::delete(), ilObjAICCLearningModule::delete(), ilObjUser::delete(), ilObjStyleSheet::delete(), ilObjRoleTemplate::delete(), ilObjRole::delete(), ilObjGroup::delete(), ilObjForum::delete(), ilObjFile::delete(), delete(), ilObjSurveyQuestionPool::deleteAllData(), ilObjGroup::deleteApplicationListEntry(), deleteMetaData(), ilObjQuestionPool::deleteQuestionpool(), ilObjStyleSheet::deleteStylePar(), ilObjSurvey::deleteSurveyRecord(), ilObjTest::deleteTest(), ilObjQuestionPool::duplicateQuestion(), ilObjTest::evalTotalPassedAverageTime(), ilObjFile::export(), ilObjGlossary::exportHTML(), ilObjContentObject::exportHTML(), ilObjContentObject::exportHTMLPages(), ilObjContentObject::exportSCORM(), ilObjGroup::exportXML(), ilObjGlossary::exportXMLMetaData(), ilObjContentObject::exportXMLMetaData(), ilObjTest::exportXMLMetaData(), ilObjQuestionPool::exportXMLMetaData(), ilObjContentObject::exportXMLPageObjects(), ilObjTest::fromXML(), ilObjUser::getAppliedUsers(), ilContainer::getBigIconPath(), ilContainer::getContainerDirectory(), ilObjForum::getCountUnread(), ilObjSAHSLearningModule::getDataDirectory(), ilObjFileBasedLM::getDataDirectory(), ilObjFile::getDirectory(), ilObjGroup::getExpirationDateTime(), ilObjGroup::getExpirationTimestamp(), ilObjUser::getGroupMemberships(), ilObjTest::getImagePath(), ilObjTest::getImagePathWeb(), ilObjExercise::getMemberListData(), ilObjGroup::getNewRegistrations(), ilObjGroup::getPassword(), ilObjUser::getPersonalPicturePath(), ilObjQuestionPool::getPrintviewQuestions(), ilObjSurveyQuestionPool::getQuestionsTable(), ilObjQuestionPool::getQuestionsTable(), ilObjGroup::getRegistrationFlag(), ilContainer::getSmallIconPath(), ilObjGlossary::getTermList(), ilObjSCORMLearningModule::getTrackedItems(), ilObjAICCLearningModule::getTrackedItems(), ilObjAICCLearningModule::getTrackingData(), ilObjSCORMLearningModule::getTrackingDataAgg(), ilObjSCORMLearningModule::getTrackingDataPerUser(), ilObjSCORMLearningModule::getTrackingItems(), ilObjAICCLearningModule::getTrackingItems(), ilObjStyleSheet::ilClone(), ilObjForum::ilClone(), ilObjFile::ilClone(), ilObjExercise::ilClone(), ilClone(), ilObjChat::ilObjChat(), ilObjChatServer::ilObjChatServer(), ilObjSurveyQuestionPool::importObject(), ilObjiLincCourse::initDefaultRoles(), ilObjCourse::initDefaultRoles(), ilObjContentObject::initDefaultRoles(), ilObjGroup::initDefaultRoles(), ilObjForum::initDefaultRoles(), ilObjChat::initDefaultRoles(), ilObjLinkResource::initLinkResourceItemsObject(), ilObjCourse::initWaitingList(), ilObjUser::isChild(), ilObjUser::isDesktopItem(), ilObjFile::MDUpdateListener(), MDUpdateListener(), ilObjGlossary::modifyExportIdentifier(), ilObjSurveyQuestionPool::paste(), ilObjQuestionPool::pasteFromClipboard(), ilObjFolder::putInTree(), putInTree(), ilObjMediaPool::read(), ilObjContentObject::read(), ilObjStyleSheetFolder::read(), ilObjStyleSheet::read(), ilObjStyleSettings::read(), ilObjRoleFolder::read(), ilObjExercise::read(), ilObjChatServer::read(), ilObjChat::read(), ilObjAICCLearningModule::readObject(), ilContainer::removeBigIcon(), ilContainer::removeSmallIcon(), ilObjFile::replaceFile(), ilObjStyleSheet::replaceStylePar(), ilObjiLincCourse::saveActivationStatus(), ilObjiLincCourse::saveAKClassValues(), ilContainer::saveIcons(), ilObjSurvey::saveToDb(), ilObjTest::saveToDb(), ilObjGroup::setExpirationDateTime(), ilObjGroup::setPassword(), ilObjGroup::setRegistrationFlag(), ilObjSurveyQuestionPool::to_xml(), ilObjSurvey::to_xml(), ilObjiLincCourse::update(), ilObjSAHSLearningModule::update(), ilObjStyleSheetFolder::update(), ilObjStyleSettings::update(), ilObjForum::update(), update(), ilObjFile::updateMetaData(), updateMetaData(), ilObjTest::updateMetaData(), ilObjQuestionPool::updateMetaData(), ilObjUser::writeAccepted(), and ilObjStyleSheet::writeCSSFile().

        {
                return $this->id;
        }

Here is the caller graph for this function:

ilObject::getImportId (  ) 

get import id

public

Returns:
string import id

Reimplemented in ilObjContentObject, and ilObjMediaObject.

Definition at line 413 of file class.ilObject.php.

Referenced by create().

        {
                return $this->import_id;
        }

Here is the caller graph for this function:

ilObject::getLastUpdateDate (  ) 

get last update date public

Returns:
string date of last update

Definition at line 521 of file class.ilObject.php.

        {
                return $this->last_update;
        }

ilObject::getLongDescription (  ) 

get object long description (stored in object_description)

public

Returns:
string object description

Definition at line 402 of file class.ilObject.php.

Referenced by create(), createMetaData(), update(), and updateMetaData().

        {
                return strlen($this->long_desc) ? $this->long_desc : $this->desc;
        }

Here is the caller graph for this function:

ilObject::getOwner (  ) 

get object owner

public

Returns:
integer owner id

Definition at line 450 of file class.ilObject.php.

Referenced by create(), and getOwnerName().

        {
                return $this->owner;
        }

Here is the caller graph for this function:

ilObject::getOwnerName (  ) 

Definition at line 461 of file class.ilObject.php.

References _lookupOwnerName(), and getOwner().

Referenced by ilObjUserTracking::getAccessTotalPerObj(), and ilObjSysUserTracking::getAccessTotalPerObj().

        {
                return ilObject::_lookupOwnerName($this->getOwner());
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilObject::getRefId (  ) 
ilObject::getTitle (  ) 
ilObject::getType (  ) 

get object type public

Returns:
string object type

Definition at line 328 of file class.ilObject.php.

Referenced by ilObjExercise::__formatBody(), ilObjMediaObject::create(), ilObjMediaObject::createMetaData(), ilObjFile::createMetaData(), createMetaData(), delete(), ilObjMediaObject::deleteMetaData(), deleteMetaData(), ilObjGlossary::exportHTML(), ilObjContentObject::exportHTML(), ilObjContentObject::exportHTMLPages(), ilObjContentObject::exportSCORM(), ilObjContentObject::exportXML(), ilObjGlossary::exportXMLMetaData(), ilObjContentObject::exportXMLMetaData(), ilObjTest::exportXMLMetaData(), ilObjQuestionPool::exportXMLMetaData(), ilObjMediaObject::getXML(), ilObjStyleSheet::ilClone(), ilClone(), ilObjGroup::isMember(), ilObjMediaObject::MDUpdateListener(), ilObjFile::MDUpdateListener(), MDUpdateListener(), ilObjSurveyQuestionPool::notify(), ilObjSurvey::notify(), ilObjSAHSLearningModule::notify(), ilObjMediaPool::notify(), ilObjGlossary::notify(), ilObjFileBasedLM::notify(), ilObjContentObject::notify(), ilObj< module_name >::notify(), ilObjSysUserTracking::notify(), ilObjStyleSheetFolder::notify(), ilObjStyleSettings::notify(), ilObjRecoveryFolder::notify(), ilObjForum::notify(), ilObjExternalToolsSettings::notify(), ilObjAuthSettings::notify(), ilObjAssessmentFolder::notify(), ilObjAdvancedEditing::notify(), ilObjTest::notify(), ilObjQuestionPool::notify(), putInTree(), ilObjSurvey::saveToDb(), ilObjTest::saveToDb(), setPermissions(), ilObjSurveyQuestionPool::to_xml(), ilObjSurvey::to_xml(), ilObjMediaObject::update(), ilObjMediaObject::updateMetaData(), ilObjFile::updateMetaData(), updateMetaData(), ilObjTest::updateMetaData(), and ilObjQuestionPool::updateMetaData().

        {
                return $this->type;
        }

Here is the caller graph for this function:

ilObject::getXMLZip (  ) 

Reimplemented in ilObjFile, ilObjContentObject, ilObjDlBook, and ilObjGlossary.

Definition at line 1421 of file class.ilObject.php.

        {
                return false;
        }

ilObject::ilClone ( a_parent_ref  ) 

ilClone object into tree basic clone function.

Register new object in object_data, creates reference and insert reference ID in tree. All object specific data must be copied in the ilClone function of the appropriate object class. Look in ilObjForum::ilClone() for example code

public

Parameters:
integer $a_parent_ref ref id of parent object
Returns:
integer new ref id

Reimplemented in ilObjQuestionPool, ilObjTest, ilObjChat, ilObjAdvancedEditing, ilObjAssessmentFolder, ilObjAuthSettings, ilObjCategory, ilObjExercise, ilObjExternalToolsSettings, ilObjFile, ilObjGroup, ilObjObjectFolder, ilObjRecoveryFolder, ilObjRole, ilObjRoleFolder, ilObjRoleTemplate, ilObjRootFolder, ilObjStyleSettings, ilObjStyleSheetFolder, ilObjSystemFolder, ilObjSysUserTracking, ilObjUserFolder, ilObj< module_name >, ilObjContentObject, ilObjFileBasedLM, ilObjGlossary, ilObjMediaPool, ilObjSAHSLearningModule, ilObjiLincCourse, ilObjLinkResource, ilObjSurvey, and ilObjSurveyQuestionPool.

Definition at line 1198 of file class.ilObject.php.

References $log, getDescription(), getId(), getRefId(), getTitle(), getType(), and ilObject().

        {
                global $log;
                
                $new_obj = new ilObject();
                $new_obj->setTitle($this->getTitle());
                $new_obj->setType($this->getType());
                $new_obj->setDescription($this->getDescription());
                $new_obj->create();
                $new_ref_id = $new_obj->createReference();
                $new_obj->putInTree($a_parent_ref);
                $new_obj->setPermissions($a_parent_ref);

                unset($new_obj);
                
                // write log entry
                $log->write("ilObject::ilClone(), ref_id: ".$this->getRefId().",obj_id: ".$this->getId().", type: ".
                        $this->getType().", title: ".$this->getTitle().
                        ", new ref_id: ".$new_obj->getRefId().", new obj_id:".$new_obj->getId());
        
                // ... and finally always return new reference ID!!
                return $new_ref_id;
        }

Here is the call graph for this function:

ilObject::ilObject ( a_id = 0,
a_reference = true 
)

Constructor public.

Parameters:
integer reference_id or object_id
boolean treat the id as reference_id (true) or object_id (false)

Definition at line 109 of file class.ilObject.php.

References $ilBench, $ilias, $lng, and read().

Referenced by ilClone(), ilObjAdvancedEditing::ilObjAdvancedEditing(), ilObjAICCLearningModule::ilObjAICCLearningModule(), ilObjAssessmentFolder::ilObjAssessmentFolder(), ilObjAuthSettings::ilObjAuthSettings(), ilObjChat::ilObjChat(), ilObjChatServer::ilObjChatServer(), ilContainer::ilObjContainer(), ilObjContentObject::ilObjContentObject(), ilObjCourse::ilObjCourse(), ilObjExercise::ilObjExercise(), ilObjExternalToolsSettings::ilObjExternalToolsSettings(), ilObjFile::ilObjFile(), ilObjFileBasedLM::ilObjFileBasedLM(), ilObjFolder::ilObjFolder(), ilObjForum::ilObjForum(), ilObjGlossary::ilObjGlossary(), ilObjGroup::ilObjGroup(), ilObjHACPLearningModule::ilObjHACPLearningModule(), ilObjiLincCourse::ilObjiLincCourse(), ilObjLanguage::ilObjLanguage(), ilObjLanguageFolder::ilObjLanguageFolder(), ilObjLibFolder::ilObjLibFolder(), ilObjLinkResource::ilObjLinkResource(), ilObjMail::ilObjMail(), ilObjMediaObject::ilObjMediaObject(), ilObjMediaPool::ilObjMediaPool(), ilObjNote::ilObjNote(), ilObjNoteFolder::ilObjNoteFolder(), ilObjObjectFolder::ilObjObjectFolder(), ilObjPaymentSettings::ilObjPaymentSettings(), ilObjQuestionPool::ilObjQuestionPool(), ilObjRecoveryFolder::ilObjRecoveryFolder(), ilObjRole::ilObjRole(), ilObjRoleFolder::ilObjRoleFolder(), ilObjRoleTemplate::ilObjRoleTemplate(), ilObjRootFolder::ilObjRootFolder(), ilObjSAHSLearningModule::ilObjSAHSLearningModule(), ilObjSCORMLearningModule::ilObjSCORMLearningModule(), ilObjSearchSettings::ilObjSearchSettings(), ilObjStyleSettings::ilObjStyleSettings(), ilObjStyleSheet::ilObjStyleSheet(), ilObjStyleSheetFolder::ilObjStyleSheetFolder(), ilObjSurvey::ilObjSurvey(), ilObjSurveyQuestionPool::ilObjSurveyQuestionPool(), ilObjSystemFolder::ilObjSystemFolder(), ilObjSysUserTracking::ilObjSysUserTracking(), ilObjTest::ilObjTest(), ilObjTypeDefinition::ilObjTypeDefinition(), ilObjUser::ilObjUser(), ilObjUserFolder::ilObjUserFolder(), and ilObjUserTracking::ilObjUserTracking().

        {
                global $ilias, $lng, $ilBench;

                $ilBench->start("Core", "ilObject_Constructor");

                if (DEBUG)
                {
                        echo "<br/><font color=\"red\">type(".$this->type.") id(".$a_id.") referenced(".$a_reference.")</font>";
                }

                $this->ilias =& $ilias;
                $this->lng =& $lng;

                $this->max_title = MAXLENGTH_OBJ_TITLE;
                $this->max_desc = MAXLENGTH_OBJ_DESC;
                $this->add_dots = true;

                $this->referenced = $a_reference;
                $this->call_by_reference = $a_reference;

                if ($a_id == 0)
                {
                        $this->referenced = false;              // newly created objects are never referenced
                }                                                                       // they will get referenced if createReference() is called

                if ($this->referenced)
                {
                        $this->ref_id = $a_id;
                }
                else
                {
                        $this->id = $a_id;
                }
                // read object data
                if ($a_id != 0)
                {
                        $this->read();
                }

                $ilBench->stop("Core", "ilObject_Constructor");
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilObject::initDefaultRoles (  ) 

init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type If you want to setup default local roles you MUST overwrite this method in derived object classes (see ilObjForum for an example) public

Returns:
array empty array

Reimplemented in ilObjQuestionPool, ilObjTest, ilObjChat, ilObjAdvancedEditing, ilObjAssessmentFolder, ilObjAuthSettings, ilObjExternalToolsSettings, ilObjForum, ilObjGroup, ilObjRecoveryFolder, ilObjStyleSettings, ilObjStyleSheetFolder, ilObjSysUserTracking, ilObj< module_name >, ilObjContentObject, ilObjFileBasedLM, ilObjMediaPool, ilObjCourse, and ilObjiLincCourse.

Definition at line 1307 of file class.ilObject.php.

        {
                return array();
        }

ilObject::isUserRegistered ( a_user_id = 0  ) 

Reimplemented in ilObjGroup.

Definition at line 1410 of file class.ilObject.php.

        {
                return false;
        }

ilObject::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.

Parameters:
string $a_element

Reimplemented in ilObjFile, and ilObjMediaObject.

Definition at line 677 of file class.ilObject.php.

References $id, _writeDescription(), _writeTitle(), getId(), getType(), setDescription(), and setTitle().

Referenced by ilObjSurveyQuestionPool::importObject().

        {
                include_once 'Services/MetaData/classes/class.ilMD.php';

                switch($a_element)
                {
                        case 'General':

                                // Update Title and description
                                $md = new ilMD($this->getId(),0, $this->getType());
                                if(!is_object($md_gen = $md->getGeneral()))
                                {
                                        return false;
                                }

                                ilObject::_writeTitle($this->getId(),$md_gen->getTitle());
                                $this->setTitle($md_gen->getTitle());

                                foreach($md_gen->getDescriptionIds() as $id)
                                {
                                        $md_des = $md_gen->getDescription($id);
                                        ilObject::_writeDescription($this->getId(),$md_des->getDescription());
                                        $this->setDescription($md_des->getDescription());
                                        break;
                                }

                                break;

                        default:
                }
                return true;
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilObject::notify ( a_event,
a_ref_id,
a_parent_non_rbac_id,
a_node_id,
a_params = 0 
)

notifys an object about an event occured Based on the event passed, each object may decide how it reacts.

TODO: add optional array to pass parameters

public

Parameters:
string event
integer reference id of object where the event occured
integer reference id of node in the tree which is actually notified
array passes optional parameters if required
Returns:
boolean

Reimplemented in ilObjQuestionPool, ilObjTest, ilObjAdvancedEditing, ilObjAssessmentFolder, ilObjAuthSettings, ilObjExternalToolsSettings, ilObjForum, ilObjGroup, ilObjRecoveryFolder, ilObjRootFolder, ilObjStyleSettings, ilObjStyleSheetFolder, ilObjSysUserTracking, ilObj< module_name >, ilObjContentObject, ilObjFileBasedLM, ilObjGlossary, ilObjMediaPool, ilObjSAHSLearningModule, ilObjiLincCourse, ilObjSurvey, and ilObjSurveyQuestionPool.

Definition at line 1387 of file class.ilObject.php.

References $tree.

        { 
                global $tree;
                
                $parent_id = (int) $tree->getParentId($a_node_id);
                
                if ($parent_id != 0)
                {
                        $obj_data =& $this->ilias->obj_factory->getInstanceByRefId($a_node_id);
                        $obj_data->notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$parent_id,$a_params);
                }
                                
                return true;
        }

ilObject::putInTree ( a_parent_ref  ) 

maybe this method should be in tree object!?

Todo:
role/rbac stuff

Reimplemented in ilObjFolder, and ilObjContentObject.

Definition at line 1107 of file class.ilObject.php.

References $log, $tree, getId(), getRefId(), getTitle(), and getType().

        {
                global $tree, $log;

                $tree->insertNode($this->getRefId(), $a_parent_ref);
                
                // write log entry
                $log->write("ilObject::putInTree(), parent_ref: $a_parent_ref, ref_id: ".
                        $this->getRefId().", obj_id: ".$this->getId().", type: ".
                        $this->getType().", title: ".$this->getTitle());

        }

Here is the call graph for this function:

ilObject::read ( a_force_db = false  ) 

read object data from db into object

Parameters:
boolean public

Reimplemented in ilObjQuestionPool, ilObjTest, ilObjForum, ilObjRoleFolder, ilObjCourse, ilObjSurvey, and ilObjSurveyQuestionPool.

Definition at line 167 of file class.ilObject.php.

References $ilBench, $q, $query, $res, $row, and setDescription().

Referenced by ilObject().

        {
                global $objDefinition, $ilBench, $ilDB;

                $ilBench->start("Core", "ilObject_read");

                if (isset($this->obj_data_record) && !$a_force_db)
                {
                        $obj = $this->obj_data_record;
                }
                else if ($this->referenced)
                {
                        // check reference id
                        if (!isset($this->ref_id))
                        {
                                $message = "ilObject::read(): No ref_id given! (".$this->type.")";
                                $this->ilias->raiseError($message,$this->ilias->error_obj->WARNING);
                        }

                        // read object data
                        $ilBench->start("Core", "ilObject_read_readData");
                        /* old query (very slow)
                        $q = "SELECT * FROM object_data ".
                                 "LEFT JOIN object_reference ON object_data.obj_id=object_reference.obj_id ".
                                 "WHERE object_reference.ref_id='".$this->ref_id."'"; */

                        $q = "SELECT * FROM object_data, object_reference WHERE object_data.obj_id=object_reference.obj_id ".
                                 "AND object_reference.ref_id= ".$ilDB->quote($this->ref_id);
                        $object_set = $this->ilias->db->query($q);
                        $ilBench->stop("Core", "ilObject_read_readData");

                        // check number of records
                        if ($object_set->numRows() == 0)
                        {
                                $message = "ilObject::read(): Object with ref_id ".$this->ref_id." not found! (".$this->type.")";
                                $this->ilias->raiseError($message,$this->ilias->error_obj->WARNING);
                        }

                        $obj = $object_set->fetchRow(DB_FETCHMODE_ASSOC);
                }
                else
                {
                        // check object id
                        if (!isset($this->id))
                        {
                                $message = "ilObject::read(): No obj_id given! (".$this->type.")";
                                $this->ilias->raiseError($message,$this->ilias->error_obj->WARNING);
                        }

                        // read object data
                        $q = "SELECT * FROM object_data ".
                                 "WHERE obj_id = ".$ilDB->quote($this->id);
                        $object_set = $this->ilias->db->query($q);

                        // check number of records
                        if ($object_set->numRows() == 0)
                        {
                                $message = "ilObject::read(): Object with obj_id: ".$this->id." (".$this->type.") not found!";
                                $this->ilias->raiseError($message,$this->ilias->error_obj->WARNING);
                        }

                        $obj = $object_set->fetchRow(DB_FETCHMODE_ASSOC);
                }

                $this->id = $obj["obj_id"];
                $this->type = $obj["type"];
                $this->title = $obj["title"];
                $this->desc = $obj["description"];
                $this->owner = $obj["owner"];
                $this->create_date = $obj["create_date"];
                $this->last_update = $obj["last_update"];
                $this->import_id = $obj["import_id"];

                if($objDefinition->isRBACObject($this->getType()))
                {
                        // Read long description
                        $query = "SELECT * FROM object_description WHERE obj_id = ".$ilDB->quote($this->id);
                        $res = $this->ilias->db->query($query);
                        while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
                        {
                                $this->setDescription($row->description);
                        }
                }

                // multilingual support systemobjects (sys) & categories (db)
                $ilBench->start("Core", "ilObject_Constructor_getTranslation");
                $translation_type = $objDefinition->getTranslationType($this->type);

                if ($translation_type == "sys")
                {
                        $this->title = $this->lng->txt("obj_".$this->type);
                        $this->desc = $this->lng->txt("obj_".$this->type."_desc");
                }
                elseif ($translation_type == "db")
                {
                        $q = "SELECT title,description FROM object_translation ".
                                 "WHERE obj_id = ".$ilDB->quote($this->id)." ".
                                 "AND lang_code = ".$ilDB->quote($this->ilias->account->getCurrentLanguage())." ".
                                 "AND NOT lang_default = 1";
                        $r = $this->ilias->db->query($q);
                        $row = $r->fetchRow(DB_FETCHMODE_OBJECT);

                        if ($row)
                        {
                                $this->title = $row->title;
                                $this->setDescription($row->description);
                                #$this->desc = $row->description;
                        }
                }

                $ilBench->stop("Core", "ilObject_Constructor_getTranslation");

                $ilBench->stop("Core", "ilObject_read");
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilObject::requireRegistration (  ) 

Definition at line 1415 of file class.ilObject.php.

        {
                return $this->register;
        }

ilObject::setDescription ( a_desc  ) 

set object description

public

Parameters:
string $a_desc object description

Reimplemented in ilObjQuestionPool, ilObjContentObject, ilObjGlossary, and ilObjMediaObject.

Definition at line 386 of file class.ilObject.php.

References ilUtil::shortenText().

Referenced by ilObjRole::assignData(), ilObjNote::createObject(), ilObjSurvey::from_xml(), ilObjTest::fromXML(), ilObjLanguage::install(), MDUpdateListener(), ilObjiLincClassroom::read(), ilObjRoleFolder::read(), read(), ilObjLanguage::uninstall(), and ilObjNote::updateNote().

        {
                // Shortened form is storted in object_data. Long form is stored in object_description
                $this->desc = ilUtil::shortenText($a_desc, $this->max_desc, $this->add_dots);

                $this->long_desc = $a_desc;

                return true;
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilObject::setId ( a_id  ) 

set object id public

Parameters:
integer $a_id object id

Reimplemented in ilObjMediaObject.

Definition at line 297 of file class.ilObject.php.

Referenced by ilObjUser::ilObjUser().

        {
                $this->id = $a_id;
        }

Here is the caller graph for this function:

ilObject::setImportId ( a_import_id  ) 

set import id

public

Parameters:
string $a_import_id import id

Reimplemented in ilObjContentObject, and ilObjMediaObject.

Definition at line 424 of file class.ilObject.php.

        {
                $this->import_id = $a_import_id;
        }

ilObject::setObjDataRecord ( a_record  ) 

set object_data record (note: this method should only be called from the ilObjectFactory class)

Parameters:
array $a_record assoc. array from table object_data public
Returns:
integer object id

Definition at line 534 of file class.ilObject.php.

        {
                $this->obj_data_record = $a_record;
        }

ilObject::setOwner ( a_owner  ) 

set object owner

public

Parameters:
integer $a_owner owner id

Definition at line 499 of file class.ilObject.php.

Referenced by create(), and ilObjUser::setActive().

        {
                $this->owner = $a_owner;
        }

Here is the caller graph for this function:

ilObject::setPermissions ( a_parent_ref  ) 

set permissions of object

Parameters:
integer reference_id of parent object public

Definition at line 1126 of file class.ilObject.php.

References $ops, $rbacadmin, $rbacreview, getRefId(), and getType().

        {
                global $rbacadmin, $rbacreview;

                $parentRoles = $rbacreview->getParentRoleIds($a_parent_ref);

                foreach ($parentRoles as $parRol)
                {
                        $ops = $rbacreview->getOperationsOfRole($parRol["obj_id"], $this->getType(), $parRol["parent"]);
                        $rbacadmin->grantPermission($parRol["obj_id"], $ops, $this->getRefId());
                }
        }

Here is the call graph for this function:

ilObject::setRefId ( a_id  ) 

set reference id public

Parameters:
integer $a_id reference id

Definition at line 307 of file class.ilObject.php.

        {
                $this->ref_id = $a_id;
                $this->referenced = true;
        }

ilObject::setRegisterMode ( a_bool  ) 

Definition at line 1403 of file class.ilObject.php.

Referenced by ilObjGroup::ilObjGroup(), and ilObjiLincCourse::ilObjiLincCourse().

        {
                $this->register = (bool) $a_bool;
        }

Here is the caller graph for this function:

ilObject::setTitle ( a_title  ) 

set object title

public

Parameters:
string $a_title object title

Reimplemented in ilObjQuestionPool, ilObjMediaObject, ilObjContentObject, ilObjGlossary, ilObjMediaObject, and ilObjSurveyQuestionPool.

Definition at line 359 of file class.ilObject.php.

References ilUtil::shortenText().

Referenced by ilObjRole::assignData(), ilObjNote::createObject(), ilObjSurvey::from_xml(), ilObjTest::fromXML(), MDUpdateListener(), ilObjiLincClassroom::read(), ilObjRoleFolder::read(), ilObjLanguage::uninstall(), and ilObjNote::updateNote().

        {
                if ($a_title == "")
                {
                        $a_title = "NO TITLE";
                }

                $this->title = ilUtil::shortenText($a_title, $this->max_title, $this->add_dots);
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilObject::setType ( a_type  ) 

set object type public

Parameters:
integer $a_type object type

Definition at line 338 of file class.ilObject.php.

Referenced by ilObjNote::createObject().

        {
                $this->type = $a_type;
        }

Here is the caller graph for this function:

ilObject::update (  ) 

update object in db

public

Returns:
boolean true on success

Reimplemented in ilObjQuestionPool, ilObjTest, ilObjAdvancedEditing, ilObjAssessmentFolder, ilObjAuthSettings, ilObjExercise, ilObjExternalToolsSettings, ilObjFile, ilObjForum, ilObjMediaObject, ilObjRecoveryFolder, ilObjRole, ilObjStyleSettings, ilObjStyleSheet, ilObjStyleSheetFolder, ilObjSysUserTracking, ilObjUser, ilObj< module_name >, ilObjContentObject, ilObjFileBasedLM, ilObjGlossary, ilObjMediaPool, ilObjSAHSLearningModule, ilObjMediaObject, ilObjCourse, ilObjiLincCourse, ilObjLinkResource, ilObjPaymentSettings, ilObjSearchSettings, ilObjSurvey, and ilObjSurveyQuestionPool.

Definition at line 623 of file class.ilObject.php.

References $q, $query, $res, getDescription(), getId(), getLongDescription(), getTitle(), and ilUtil::prepareDBString().

Referenced by ilObjLanguage::install(), ilObjLanguage::uninstall(), and ilObjNote::updateNote().

        {
                global $objDefinition, $ilDB;

                $q = "UPDATE object_data ".
                        "SET ".
                        "title = '".ilUtil::prepareDBString($this->getTitle())."',".
                        "description = '".ilUtil::prepareDBString($this->getDescription())."', ".
                        "import_id = '".$this->getImportId()."', ".
                        "last_update = now() ".
                        "WHERE obj_id = '".$this->getId()."'";
                $this->ilias->db->query($q);

                // the line ($this->read();) messes up meta data handling: meta data,
                // that is not saved at this time, gets lost, so we query for the dates alone
                //$this->read();
                $q = "SELECT last_update FROM object_data".
                         " WHERE obj_id = ".$ilDB->quote($this->getId());
                $obj_set = $this->ilias->db->query($q);
                $obj_rec = $obj_set->fetchRow(DB_FETCHMODE_ASSOC);
                $this->last_update = $obj_rec["last_update"];

                if($objDefinition->isRBACObject($this->getType()))
                {
                        // Update long description
                        $res = $this->ilias->db->query("SELECT * FROM object_description WHERE obj_id = '".$this->getId()."'");
                        if($res->numRows())
                        {
                                $query = "UPDATE object_description SET description = '".
                                        ilUtil::prepareDBString($this->getLongDescription())."' ".
                                        "WHERE obj_id = '".$this->getId()."'";
                        }
                        else
                        {
                                $query = "INSERT INTO object_description SET obj_id = '".$this->getId()."', ".
                                        "description = '".ilUtil::prepareDBString($this->getLongDescription())."'";
                        }
                        $this->ilias->db->query($query);
                }               

                return true;
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilObject::updateMetaData (  ) 

update meta data entry

Reimplemented in ilObjQuestionPool, ilObjTest, ilObjFile, and ilObjMediaObject.

Definition at line 734 of file class.ilObject.php.

References getId(), getLongDescription(), getTitle(), and getType().

Referenced by ilObjSurveyQuestionPool::update(), ilObjSurvey::update(), ilObjLinkResource::update(), ilObjCourse::update(), ilObjSAHSLearningModule::update(), ilObjGlossary::update(), ilObjFileBasedLM::update(), and ilObjContentObject::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->getId(), 0, $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->getLongDescription());
                        $md_des->update();
                }
                $md_gen->update();

        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilObject::updateOwner (  ) 

update owner of object in db

public

Returns:
boolean true on success

Definition at line 773 of file class.ilObject.php.

References $q.

Referenced by ilObjUser::update().

    {
        $q = "UPDATE object_data ".
            "SET ".
            "owner = '".$this->getOwner()."', ".
            "last_update = now() ".
            "WHERE obj_id = '".$this->getId()."'";
        $this->ilias->db->query($q);

        $q = "SELECT last_update FROM object_data".
             " WHERE obj_id = '".$this->getId()."'";
        $obj_set = $this->ilias->db->query($q);
        $obj_rec = $obj_set->fetchRow(DB_FETCHMODE_ASSOC);
        $this->last_update = $obj_rec["last_update"];

        return true;
    }

Here is the caller graph for this function:

ilObject::withReferences (  ) 

determines wehter objects are referenced or not (got ref ids or not)

Definition at line 155 of file class.ilObject.php.

Referenced by ilObjFolder::putInTree().

        {
                // both vars could differ. this method should always return true if one of them is true without changing their status
                return ($this->call_by_reference) ? true : $this->referenced;
        }

Here is the caller graph for this function:


Field Documentation

ilObject::$add_dots

Definition at line 96 of file class.ilObject.php.

ilObject::$create_date

Definition at line 61 of file class.ilObject.php.

Referenced by ilObjNote::saveNote(), and ilObjNote::updateNote().

ilObject::$desc

Definition at line 58 of file class.ilObject.php.

Referenced by _writeDescription().

ilObject::$id
ilObject::$ilias
ilObject::$import_id

Definition at line 63 of file class.ilObject.php.

ilObject::$last_update

Definition at line 62 of file class.ilObject.php.

ilObject::$lng
ilObject::$long_desc

Definition at line 59 of file class.ilObject.php.

ilObject::$max_desc

Definition at line 90 of file class.ilObject.php.

ilObject::$max_title

Definition at line 84 of file class.ilObject.php.

ilObject::$obj_data_record

object_data record

Definition at line 101 of file class.ilObject.php.

ilObject::$objectList

Definition at line 78 of file class.ilObject.php.

ilObject::$owner

Definition at line 60 of file class.ilObject.php.

Referenced by ilObjSurvey::_addQuestionblock(), _lookupOwnerName(), and create().

ilObject::$ref_id
ilObject::$referenced

Definition at line 71 of file class.ilObject.php.

ilObject::$register = false

Definition at line 64 of file class.ilObject.php.

ilObject::$title
ilObject::$type

The documentation for this class was generated from the following file: