ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObject Class Reference

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

+ Inheritance diagram for ilObject:
+ Collaboration 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
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions
 getTitle ()
 get object title public
 getUntranslatedTitle ()
 get untranslated 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
 _getLastUpdateOfObjects ($a_objs)
 Get last update for a set of media objects.
 _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
 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 ()
 cloneObject ($a_target_id, $a_copy_id=0)
 Clone object permissions, put in tree ...
 appendCopyInfo ($a_target_id, $a_copy_id)
 Prepend Copy info if object with same name exists in that container.
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies.
 cloneMetaData ($target_obj)
 Copy meta data.

Static Public Member Functions

static _getIdsForTitle ($title, $type= '')
 _exists ($a_id, $a_reference=false)
 checks if an object exists in object_data
static _getObjectsByType ($a_obj_type="")
 Get objects by type.
static _prepareCloneSelection ($a_ref_ids, $new_type)
 Prepare copy wizard object selection.
static _getIcon ($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)

Data Fields

 $ilias
 $lng
 $id
 $ref_id
 $type
 $title
 $untranslatedTitle
 $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 smeye.nosp@m.r@da.nosp@m.tabay.nosp@m..de
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
Id:
class.ilObject.php 22236 2009-10-29 10:46:16Z 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
integerobject id or reference id
booleanture if id is a reference, else false (default)
Returns
boolean true if object exists

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

References $ilias.

Referenced by _lookupOwnerName(), ilNavigationHistory\addItem(), ilSoapObjectAdministration\addObject(), ilSoapAdministration\checkObjectAccess(), ilPageObject\collectMediaObjects(), ilObjRoleFolderGUI\confirmedDeleteObject(), ilObjRole\delete(), ilNewsItem\delete(), ilPageObject\delete(), ilObjSCORM2004LearningModuleGUI\deleteTrackingForUser(), ilObjSCORMLearningModuleGUI\deleteTrackingForUser(), ilPublicUserProfileGUI\deliverVCard(), ilObjExerciseGUI\downloadAllObject(), ilObjContentObject\exportHTML(), ilObjSCORM2004LearningModule\exportSelected(), ilObjSCORMLearningModule\exportSelected(), ilObjSCORMLearningModule\exportSelectedRaw(), ilForum\fetchPostNodeData(), ilPDNewsTableGUI\fillRow(), ilMediaCastTableGUI\fillRow(), ilLinksTableGUI\fillRow(), ilWikiRecentChangesTableGUI\fillRow(), ilPageHistoryTableGUI\fillRow(), ilWikiContributorsTableGUI\fillRow(), ilWikiPagesTableGUI\fillRow(), ilPageObject\getContentObject(), ilObjStyleSheet\getContentStylePath(), ilSoapCourseAdministration\getCoursesForUser(), ilSoapGroupAdministration\getGroupsForUser(), ilPublicUserProfileGUI\getHTML(), ilGoogleMapGUI\getHtml(), ilObjMediaObject\getLinkedMediaObjects(), ilObjExercise\getMemberListData(), ilNoteGUI\getNoteListHTML(), ilTagging\getObjectsForTagAndUser(), ilObjForumListGUI\getProperties(), ilObjSCORMLearningModule\getTrackedUsers(), ilObjSCORM2004LearningModule\getTrackedUsers(), ilForum\getUser(), ilForumPost\getUserData(), ilForum\getUserData(), ilGoogleMapGUI\getUserListHtml(), ilObjectFeedWriter\ilObjectFeedWriter(), ilNewsForContextBlockGUI\showNews(), ilPageObjectGUI\showPage(), ilObjSCORM2004LearningModuleGUI\showTrackingItems(), ilObjSCORMLearningModuleGUI\showTrackingItems(), ilObjSCORMLearningModuleGUI\showTrackingItemSco(), ilPageObject\update(), and ilObjForumGUI\viewThreadObject().

{
global $ilias, $ilDB;
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= ".$ilDB->quote($a_id);
}
else
{
$q = "SELECT * FROM object_data WHERE obj_id=".$ilDB->quote($a_id);
}
$r = $ilDB->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_idobject id

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

References DB_FETCHMODE_ASSOC.

Referenced by ilObjectXMLWriter\__appendObject(), ilParticipants\__construct(), ilRepositorySearchGUI\__fillGroupTable(), ilAdminUserSearchGUI\__fillGroupTable(), ilLPListOfProgressGUI\__initDetails(), ilLPCollections\__read(), ilCourseObjectiveMaterials\__read(), ilCourseObjectiveQuestion\__read(), ilUsersOnlineBlockGUI\__showActiveChatsOfUser(), ilObjGlossaryAccess\_checkGoto(), ilObjContentObjectAccess\_checkGoto(), ilObjStyleSheet\_getClonableContentStyles(), ilLPStatusCollection\_getCompleted(), ilLPStatusCollection\_getFailed(), ilInternalLink\_getIdForImportId(), ilLPStatusCollection\_getInProgress(), ilLPCollections\_getItems(), ilObjGroup\_getMembers(), ilLPStatusCollection\_getNotAttempted(), ilLPStatusEvent\_getStatusInfo(), ilLMPageObjectGUI\_goto(), ilGlossaryTermGUI\_goto(), ilStructureObjectGUI\_goto(), ilObjForumGUI\_goto(), _hasUntrashedReference(), ilContainerReferenceAccess\_isAccessible(), ilContainerSortingSettings\_lookupSortMode(), ilInfoScreenGUI\addObjectSections(), ilCalendarCategoryGUI\addReferenceLinks(), ilSoapCourseAdministration\assignCourseMember(), ilSoapGroupAdministration\assignGroupMember(), ilUserImportParser\assignToRole(), ilWebAccessChecker\checkAccess(), ilDAVLocks\cleanUp(), ilSoapCourseAdministration\deleteCourse(), ilContainerReferenceAppEventListener\deleteReferences(), ilSoapCourseAdministration\excludeCourseMember(), ilSoapGroupAdministration\excludeGroupMember(), ilECSImportedContentTableGUI\fillRow(), ilShopSearchResult\filter(), ilSearchResult\filter(), ilSoapCourseAdministration\getCoursesForUser(), ilMail\getEmailsOfRecipients(), ilSoapExerciseAdministration\getExerciseXML(), ilSoapFileAdministration\getFileXML(), ilMediaObjectUsagesTableGUI\getFirstWritableRefId(), ilSoapGroupAdministration\getGroupsForUser(), ilChatInvitationGUI\getHTML(), ilCalendarAppointmentPanelGUI\getHTML(), ilSoapSCORMAdministration\getIMSManifestXML(), ilPDSelectedItemsBlockGUI\getObjectsByMembership(), ilSoapObjectAdministration\getRefIdsByImportId(), ilSoapObjectAdministration\getRefIdsByObjId(), ilSoapTestAdministration\getTestResults(), ilMail\getUserIds(), ilECSTaskScheduler\handleDelete(), ilTaggingAppEventListener\handleEvent(), ilObjCourseReferenceListGUI\initItem(), ilObjCategoryReferenceListGUI\initItem(), ilSoapCourseAdministration\isAssignedToCourse(), ilSoapGroupAdministration\isAssignedToGroup(), ilGlossaryPresentationGUI\listDefinitions(), ilMailSearchCoursesGUI\mailCourses(), ilMailSearchGroupsGUI\mailGroups(), ilCalendarCategoryTableGUI\parse(), ilECSReleasedContentTableGUI\parse(), ilContainerReference\read(), ilCalendarCategoryGUI\readPermissions(), ilCalendarCategories\readSelectedCategories(), ilSoapObjectAdministration\removeFromSystemByImportId(), ilForum\sendForumNotifications(), ilCronForumNotification\sendMails(), ilForum\sendThreadNotifications(), ilCalendarAppointmentGUI\showInfoScreen(), ilMailSearchGroupsGUI\showMembers(), ilMailSearchCoursesGUI\showMyCourses(), ilMailSearchGroupsGUI\showMyGroups(), ilPDTaggingBlockGUI\showResourcesForTag(), ilNoteGUI\showTargets(), ilECSSettingsGUI\updateCommunities(), ilSoapCourseAdministration\updateCourse(), ilSoapExerciseAdministration\updateExercise(), ilSoapFileAdministration\updateFile(), 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:

static ilObject::_getIcon (   $a_obj_id = "",
  $a_size = "big",
  $a_type = "",
  $a_offline = false 
)
static

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

References $file_name, $ilSetting, ilContainer\_getContainerDirectory(), ilContainer\_lookupContainerSetting(), _lookupType(), and ilUtil\getImagePath().

Referenced by ilForumLocatorGUI\display(), ilNewsForContextBlockGUI\fillRow(), ilRepositoryExplorer\formatHeader(), ilNavigationHistoryGUI\getHTML(), ilLocatorGUI\getHTML(), ilRepositoryExplorer\getImage(), ilObjectListGUI\insertIconsAndCheckboxes(), and ilNewsForContextBlockGUI\showNews().

{
global $ilSetting;
if ($a_obj_id == "" && $a_type == "")
{
return "";
}
if ($a_type == "")
{
$a_type = ilObject::_lookupType($a_obj_id);
}
if ($a_size == "")
{
$a_size = "big";
}
if ($ilSetting->get("custom_icons") &&
in_array($a_type, array("cat","grp","crs", "root")))
{
require_once("./Services/Container/classes/class.ilContainer.php");
if (ilContainer::_lookupContainerSetting($a_obj_id, "icon_".$a_size))
{
$cont_dir = ilContainer::_getContainerDirectory($a_obj_id);
$file_name = $cont_dir."/icon_".$a_size.".gif";
if (is_file($file_name))
{
return $file_name;
}
}
}
switch($a_size)
{
case "small": $suff = ""; break;
case "tiny": $suff = "_s"; break;
default: $suff = "_b"; break;
}
if (!$a_offline)
{
return ilUtil::getImagePath("icon_".$a_type.$suff.".gif");
}
else
{
return "./images/icon_".$a_type.$suff.".gif";
}
}

+ Here is the call graph for this function:

+ 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_idimport id
Returns
int id

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

References DB_FETCHMODE_ASSOC.

{
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;
}
}
static ilObject::_getIdsForTitle (   $title,
  $type = '' 
)
static

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

References $result, $title, and $type.

Referenced by ilObjRoleGUI\mailToRoleObject().

{
global $ilDB;
$query = "SELECT obj_id FROM object_data WHERE title = ?";
$datatypes = array('text');
$values = array($title);
if($type != '')
{
$query .= " AND type = ?";
$datatypes[] = 'text';
$values[] = $type;
}
$statement = $ilDB->prepare($query, $datatypes);
$result = $ilDB->execute($statement, $values);
$object_ids = array();
while($row = $ilDB->fetchAssoc($result))
{
$object_ids[] = $row['obj_id'];
}
return is_array($object_ids) ? $object_ids : array();
}

+ Here is the caller graph for this function:

ilObject::_getLastUpdateOfObjects (   $a_objs)

Get last update for a set of media objects.

Parameters
array

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

Referenced by ilPageObject\getLastUpdateOfIncludedElements().

{
global $ilDB;
if (!is_array($a_objs))
{
$a_objs = array($a_objs);
}
$types = array();
$st = $ilDB->prepare("SELECT max(last_update) as last_update FROM object_data ".
"WHERE ".$ilDB->getInClause("obj_id", $a_objs),
$ilDB->addTypesToArray($types, "integer", count($a_objs)));
$set = $ilDB->execute($st, $a_objs);
$rec = $ilDB->fetchAssoc($set);
return ($rec["last_update"]);
}

+ Here is the caller graph for this function:

static ilObject::_getObjectsByType (   $a_obj_type = "")
static

Get objects by type.

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

References DB_FETCHMODE_ASSOC.

Referenced by ilLanguage\getInstalledLanguages(), ilObjLanguageFolder\getLanguages(), and ilObjLanguageFolderGUI\refreshObject().

{
global $ilDB;
$order = " ORDER BY title";
// where clause
if ($a_obj_type)
{
$where_clause = "WHERE type = ".
$ilDB->quote($a_obj_type);
}
$q = "SELECT * FROM object_data ".$where_clause.$order;
$r = $ilDB->query($q);
$arr = array();
if ($r->numRows() > 0)
{
while ($row = $r->fetchRow(DB_FETCHMODE_ASSOC))
{
$row["desc"] = $row["description"];
$arr[$row["obj_id"]] = $row;
}
}
return $arr;
}

+ Here is the caller graph for this function:

ilObject::_getObjectsDataForType (   $a_type,
  $a_omit_trash = false 
)

get all objects of a certain type

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

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

References _hasUntrashedReference(), and DB_FETCHMODE_ASSOC.

{
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)

checks wether an object has at least one reference that is not in trash

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

References $ref_id, _getAllReferences(), and _isInTrash().

Referenced by ilLMObject\_getAllObjectsForImportId(), ilGlossaryTerm\_getIdForImportId(), ilLMObject\_getIdForImportId(), _getObjectsDataForType(), ilObjSurveyQuestionPool\_isWriteable(), ilObjQuestionPool\_isWriteable(), ilSoapObjectAdministration\getObjIdsByRefIds(), ilTaggingAppEventListener\handleEvent(), ilMailSearchCoursesGUI\showMyCourses(), and ilMailSearchGroupsGUI\showMyGroups().

{
$ref_ids = ilObject::_getAllReferences($a_obj_id);
foreach($ref_ids as $ref_id)
{
if(!ilObject::_isInTrash($ref_id))
{
return true;
}
}
return false;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObject::_lookupLastUpdate (   $a_id,
  $a_as_string = false 
)

lookup last update

Parameters
int$a_idobject id

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

References ilDatePresentation\formatDate(), and IL_CAL_DATETIME.

Referenced by ilObjFileListGUI\getProperties().

{
global $ilObjDataCache;
if ($a_as_string)
{
return ilDatePresentation::formatDate(new ilDateTime($ilObjDataCache->lookupLastUpdate($a_id),IL_CAL_DATETIME));
}
else
{
return $ilObjDataCache->lookupLastUpdate($a_id);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObject::_lookupObjId (   $a_id)

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

Referenced by ilObjCategoryGUI\__buildFilterSelect(), ilSessionOverviewGUI\__construct(), ilRegistrationGUI\__construct(), ilContainerContentGUI\__forwardToColumnGUI(), ilCourseContentGUI\__forwardToColumnGUI(), ilObjCourseReferenceAccess\_checkAccess(), ilLPStatusCollection\_getCompleted(), ilLPStatusCollection\_getFailed(), ilLPStatusCollection\_getInProgress(), ilObjContentObjectAccess\_getLastAccessedPage(), ilNewsItem\_getNewsItemsOfUser(), ilLPStatusCollection\_getNotAttempted(), ilLPStatusEvent\_getStatusInfo(), ilObjRemoteCourseGUI\_goto(), ilObjCourseReferenceGUI\_goto(), ilObjCategoryReferenceGUI\_goto(), ilObjSAHSLearningModuleGUI\_goto(), ilObjWikiGUI\_goto(), ilObjFileGUI\_goto(), ilObjFileBasedLMGUI\_goto(), ilObjMediaPoolGUI\_goto(), ilObjMediaCastGUI\_goto(), ilObjForumGUI\_goto(), ilObjLinkResourceGUI\_goto(), ilObjSurveyQuestionPoolGUI\_goto(), ilObjGlossaryGUI\_goto(), ilObjCategoryGUI\_goto(), ilObjExerciseGUI\_goto(), ilObjQuestionPoolGUI\_goto(), ilObjChatGUI\_goto(), ilObjGroupGUI\_goto(), ilObjContentObjectGUI\_goto(), ilObjSurveyGUI\_goto(), ilObjCourseGUI\_goto(), ilObjTestGUI\_goto(), ilContainerReferenceAccess\_isAccessible(), ilContainerSortingSettings\_lookupSortMode(), ilObjRoleTemplateGUI\addAdminLocatorItems(), ilObjStyleSheetGUI\addAdminLocatorItems(), ilObjRoleGUI\addAdminLocatorItems(), ilObjUserGUI\addAdminLocatorItems(), ilNavigationHistory\addItem(), ilObjContentObjectGUI\addLocations(), ilPDSelectedItemsBlockGUI\addParentRow(), ilCalendarCategoryGUI\addReferenceLinks(), ilPaymentStatisticGUI\addStatisticWorksheet(), ilObjPaymentSettingsGUI\addStatisticWorksheet(), ilSoapCourseAdministration\assignCourseMember(), ilSoapGroupAdministration\assignGroupMember(), ilDataLoader\assignUsersAsCourseMembers(), ilTableOfContentsExplorer\buildTitle(), ilLearningProgressAccess\checkAccess(), ilAccessHandler\checkAccessOfUser(), ilObjAdvancedEditingGUI\clearCategoryPageObject(), ilContainerSorting\cloneSorting(), ilObjectGUI\confirmedDeleteObject(), ilUserResult\createLink(), ilSoapCourseAdministration\deleteCourse(), ilLMEditorGUI\displayLocator(), ilPCResourcesGUI\edit(), ilObjStyleSettingsGUI\editContentStylesObject(), ilPaymentStatisticGUI\editStatistic(), ilObjPaymentSettingsGUI\editStatisticObject(), ilSoapCourseAdministration\excludeCourseMember(), ilSoapGroupAdministration\excludeGroupMember(), ilRegistrationGUI\fillMembershipLimitation(), ilPDNewsTableGUI\fillRow(), ilLinksTableGUI\fillRow(), ilECSImportedContentTableGUI\fillRow(), ilNewsForContextBlockGUI\fillRow(), ilObjFolderGUI\forwardToTimingsView(), ilDataLoader\generateCalendarEntries(), ilCourseObjectiveMaterialAssignmentTableGUI\getAllSubObjects(), ilObjectGUI\getCenterColumnHTML(), ilObjWikiGUI\getGotoLink(), ilNavigationHistoryGUI\getHTML(), ilCalendarAppointmentPanelGUI\getHTML(), ilLocatorGUI\getHTML(), ilLMPageObjectGUI\getLinkXML(), ilGlossaryPresentationGUI\getLinkXML(), ilLMPresentationGUI\getLinkXML(), ilImageMapEditorGUI\getMapAreaLinkString(), ilNewsItem\getNewsForRefId(), ilContainerContentGUI\getRightColumnHTML(), ilCourseContentGUI\getRightColumnHTML(), ilObjectGUI\getRightColumnHTML(), ilSoapUserAdministration\getUsersForContainer(), ilObjFolder\getViewMode(), ilObjGroup\getViewMode(), ilLMPresentationGUI\ilLocator(), ilObjectFeedWriter\ilObjectFeedWriter(), ilUserFeedWriter\ilUserFeedWriter(), ilCalendarAppointmentGUI\initForm(), ilConditionHandlerInterface\initFormCondition(), ilCalendarCategories\initialize(), ilPCMediaObjectGUI\insertFromPool(), ilPageObject\insertInstIntoIDs(), ilObjectListGUI\insertPath(), ilObjectListGUI\insertSubscribeCommand(), ilSoapCourseAdministration\isAssignedToCourse(), ilSoapGroupAdministration\isAssignedToGroup(), ilHACPPresentationGUI\launchSahs(), ilAICCPresentationGUI\launchSahs(), ilSAHSPresentationGUI\launchSahs(), ilSCORMPresentationGUI\launchSahs(), ilObjCategoryGUI\listUsersObject(), ilObjSessionGUI\membersObject(), ilObjExerciseGUI\membersObject(), ilObjGroupGUI\modifyItemGUI(), ilObjFolderGUI\modifyItemGUI(), ilCourseObjectivesTableGUI\parse(), ilObjRoleGUI\permObject(), ilObjSessionGUI\printAttendanceListObject(), ilObjSessionGUI\printViewMembersObject(), ilStartUpGUI\processStartingPage(), ilObjHACPTracking\putparam(), ilUtil\replaceLinkProperties(), ilAccountMail\replacePlaceholders(), ilContainerReferenceGUI\saveObject(), ilSearchGUI\saveResult(), ilAdvancedSearchGUI\saveResult(), ilHACPResponse\sendParam(), ilPageObjectGUI\setDefaultLinkXml(), ilContainerContentGUI\setOutput(), ilMainMenuGUI\setTemplateVars(), ilInternalLinkGUI\showLinkHelp(), ilNewsForContextBlockGUI\showNews(), ilSearchresultGUI\showResults(), ilSearchGUI\showSearch(), ilPaymentStatisticGUI\showStatistics(), ilNoteGUI\showTargets(), ilObjPaymentSettingsGUI\statisticObject(), ilObjSCORMTracking\store(), ilObjectGUI\undeleteObject(), ilObjAdvancedEditingGUI\undoLastCategoryChangeObject(), ilSoapCourseAdministration\updateCourse(), ilObjSessionGUI\updateMembersObject(), ilContainerReferenceGUI\updateObject(), ilPDNewsGUI\view(), and ilCourseContentGUI\view().

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

+ Here is the caller graph for this function:

ilObject::_lookupObjIdByImportId (   $a_import_id)

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

References $res, and DB_FETCHMODE_OBJECT.

Referenced by ilSoapObjectAdministration\addObject(), ilSoapObjectAdministration\getObjIdByImportId(), ilSoapObjectAdministration\getRefIdsByImportId(), ilAuthECS\loginObserver(), and ilSoapObjectAdministration\removeFromSystemByImportId().

{
global $ilDB;
$query = "SELECT * FROM object_data ".
"WHERE import_id = ".$ilDB->quote($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 518 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_idobject id

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

Referenced by ilObjCategoryGUI\__buildFilterSelect(), ilRegistrationSettingsGUI\__buildRoleSelection(), ilMediaPoolTableGUI\__construct(), ilRegistrationSettingsGUI\__prepareAutomaticRoleList(), ilUsersOnlineBlockGUI\__showActiveChatsOfUser(), ilObjCourseGUI\__showWaitingList(), ilRegistrationGUI\__validateRole(), ilForum\_getModerators(), ilObjStyleSheet\_getStandardStyles(), ilLPStatusEvent\_getStatusInfo(), ilObjRemoteCourseGUI\_goto(), ilLMPageObjectGUI\_goto(), ilObjSAHSLearningModuleGUI\_goto(), ilGlossaryTermGUI\_goto(), ilObjWikiGUI\_goto(), ilObjFileGUI\_goto(), ilObjFileBasedLMGUI\_goto(), ilObjMediaPoolGUI\_goto(), ilStructureObjectGUI\_goto(), ilObjMediaCastGUI\_goto(), ilObjForumGUI\_goto(), ilObjLinkResourceGUI\_goto(), ilObjSurveyQuestionPoolGUI\_goto(), ilObjGlossaryGUI\_goto(), ilObjCategoryGUI\_goto(), ilObjExerciseGUI\_goto(), ilObjQuestionPoolGUI\_goto(), ilObjChatGUI\_goto(), ilObjGroupGUI\_goto(), ilObjContentObjectGUI\_goto(), ilObjSurveyGUI\_goto(), ilObjCourseGUI\_goto(), ilObjTestGUI\_goto(), ilObjUser\_lookupDesktopItems(), ilObjRoleTemplateGUI\addAdminLocatorItems(), ilObjStyleSheetGUI\addAdminLocatorItems(), ilNavigationHistory\addItem(), ilObjContentObjectGUI\addLocations(), ilObjContentObjectGUI\addMenuEntry(), ilPDSelectedItemsBlockGUI\addParentRow(), ilCalendarCategoryGUI\addReferenceLinks(), ilPaymentStatisticGUI\addStatisticWorksheet(), ilObjPaymentSettingsGUI\addStatisticWorksheet(), ilObjStyleSettings\addStyle(), ilObjStyleSheetFolder\addStyle(), ilLDAPRoleAssignments\assignedRoles(), ilObjStyleSettingsGUI\confirmDeleteIndividualStyles(), ilObjLanguageFolderGUI\confirmRefreshSelectedObject(), ilObjMediaPoolGUI\confirmRemove(), ilPageEditorGUI\copyLinkedMediaToClipboard(), ilObjMediaPool\deleteChild(), ilObjStyleSheetGUI\deleteObject(), ilObjStyleSheetFolderGUI\deleteStyleObject(), ilObjStyleSettingsGUI\deleteStyleObject(), ilAccessHandler\doConditionCheck(), ilObjStyleSettingsGUI\editContentStylesObject(), ilRegistrationSettingsGUI\editRoles(), ilPaymentStatisticGUI\editStatistic(), ilObjPaymentSettingsGUI\editStatisticObject(), ilPageEditorGUI\executeCommand(), ilECSSettingsGUI\exportImported(), ilECSSettingsGUI\exportReleased(), ilRegistrationGUI\fillMembershipLimitation(), ilPDNewsTableGUI\fillRow(), ilLinksTableGUI\fillRow(), ilECSImportedContentTableGUI\fillRow(), ilCourseObjectivesTableGUI\fillRow(), ilMediaObjectUsagesTableGUI\fillRow(), ilWaitingListTableGUI\fillRow(), ilSubscriberTableGUI\fillRow(), ilNewsForContextBlockGUI\fillRow(), ilObjUserTracking\getAccessPerUserDetail(), ilObjUserTracking\getAccessTotalPerObj(), ilObjUser\getClipboardChilds(), ilObjUser\getClipboardObjects(), ilHistoryGUI\getHistoryTable(), ilCalendarAppointmentPanelGUI\getHTML(), ilImageMapEditorGUI\getMapAreaLinkString(), ilObjUser\getProfileAsString(), ilShopSearchResult\getResultsForPresentation(), ilSearchResult\getResultsForPresentation(), ilLMPresentationGUI\ilLocator(), ilObjectFeedWriter\ilObjectFeedWriter(), ilUserFeedWriter\ilUserFeedWriter(), ilSoapUserAdministration\importUsers(), ilConditionHandlerInterface\initFormCondition(), ilCourseItemAdministrationGUI\initFormEdit(), ilCourseObjectivesGUI\initFormLimits(), ilObjCourseReferenceListGUI\initItem(), ilObjCategoryReferenceListGUI\initItem(), ilObjMediaPoolGUI\insertFromClipboard(), ilObjectListGUI\insertPath(), ilObjectListGUI\insertPreconditions(), ilGlossaryPresentationGUI\listDefinitions(), ilGlossaryPresentationGUI\listTermByGiven(), ilObjCategoryGUI\listUsersObject(), ilObjGroupGUI\mailMembersObject(), ilObjCourseGUI\mailMembersObject(), ilLDAPRoleAssignmentTableGUI\parse(), ilCalendarSharedRoleListTableGUI\parse(), ilCalendarSharedListTableGUI\parse(), ilCourseObjectiveQuestionsTableGUI\parse(), ilObjRoleGUI\permObject(), ilLDAPSettingsGUI\prepareRoleSelect(), ilECSSettingsGUI\prepareRoleSelect(), ilRadiusSettingsGUI\prepareRoleSelection(), ilStartUpGUI\processStartingPage(), ilObjContentObjectGUI\properties(), ilContainerReference\read(), ilCalendarCategory\read(), ilUtil\replaceLinkProperties(), ilAccountMail\replacePlaceholders(), ilSearchGUI\saveResult(), ilAdvancedSearchGUI\saveResult(), ilFeedbackGUI\showBarometerById(), ilNewsForContextBlockGUI\showFeedUrl(), ilPageObjectGUI\showMediaFullscreen(), ilNewsForContextBlockGUI\showNews(), ilPageObjectGUI\showPage(), ilLMPresentationGUI\showPreconditionsOfPage(), ilPDTaggingBlockGUI\showResourcesForTag(), ilSearchresultGUI\showResults(), ilSearchGUI\showSearch(), ilPaymentStatisticGUI\showStatistics(), ilNoteGUI\showTargets(), ilObjPaymentSettingsGUI\statisticObject(), ilPDNewsGUI\view(), and ilPDNotesGUI\view().

{
global $ilObjDataCache;
$tit = $ilObjDataCache->lookupTitle($a_id);
//echo "<br>LOOKING-$a_id-:$tit";
return $tit;
}

+ Here is the caller graph for this function:

ilObject::_lookupType (   $a_id,
  $a_reference = false 
)

lookup object type

Parameters
int$a_idobject id

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

References DB_FETCHMODE_ASSOC.

Referenced by ilRegistrationGUI\__construct(), ilParticipants\__construct(), ilContainerContentGUI\__forwardToColumnGUI(), ilCourseContentGUI\__forwardToColumnGUI(), ilSoapUserAdministration\__validateUserData(), ilAdvancedMDValues\_appendXMLByObjId(), ilAdvancedMDValues\_cloneValues(), ilHistory\_createEntry(), ilConditionHandler\_getConditionsOfTarget(), ilHistory\_getEntriesForObject(), _getIcon(), ilObjMediaObject\_getMobsOfObject(), ilNewsItem\_getNewsItemsOfUser(), ilObjSurveyGUI\addHeadingObject(), ilObjContentObjectGUI\addMenuEntry(), ilPDSelectedItemsBlockGUI\addParentRow(), ilCalendarCategoryGUI\addReferenceLinks(), ilSoapRBACAdministration\addRoleFromTemplate(), ilContainerGUI\addToDeskObject(), ilSoapCourseAdministration\assignCourseMember(), ilObjRoleGUI\assignDesktopItemObject(), ilSoapGroupAdministration\assignGroupMember(), ilUserImportParser\assignToRole(), ilTestCertificateGUI\certificateEditor(), ilWebAccessChecker\checkAccess(), ilAccessHandler\checkAccessOfUser(), ilObjRoleFolderGUI\confirmedDeleteObject(), ilObjMediaPoolGUI\confirmRemove(), ilObjMediaPoolGUI\copyToClipboard(), delete(), ilPageObject\delete(), ilObjMediaPool\deleteChild(), ilSoapCourseAdministration\deleteCourse(), ilCalendarSharedStatus\deleteStatus(), ilObjSystemFolderGUI\displayList(), ilObjectGUI\displayList(), ilLMEditorGUI\displayLocator(), ilPCResourcesGUI\edit(), ilContainerGUI\editPageContentObject(), SurveyMetricQuestionGUI\editQuestion(), SurveyNominalQuestionGUI\editQuestion(), SurveyOrdinalQuestionGUI\editQuestion(), SurveyTextQuestionGUI\editQuestion(), assTextSubsetGUI\editQuestion(), assJavaAppletGUI\editQuestion(), assMatchingQuestionGUI\editQuestion(), assNumericGUI\editQuestion(), assSingleChoiceGUI\editQuestion(), assMultipleChoiceGUI\editQuestion(), assOrderingQuestionGUI\editQuestion(), assImagemapQuestionGUI\editQuestion(), SurveyMatrixQuestionGUI\editQuestion(), assClozeTestGUI\editQuestion(), ilSoapCourseAdministration\excludeCourseMember(), ilSoapGroupAdministration\excludeGroupMember(), ilAdministrationGUI\executeCommand(), ilRepositoryGUI\executeCommand(), ilObjContentObject\exportHTML(), ilObjContentObject\exportXMLMediaObjects(), assQuestionTypeTemplateGUI\feedback(), assTextQuestionGUI\feedback(), assNumericGUI\feedback(), assTextSubsetGUI\feedback(), assJavaAppletGUI\feedback(), assOrderingQuestionGUI\feedback(), assSingleChoiceGUI\feedback(), assImagemapQuestionGUI\feedback(), assMultipleChoiceGUI\feedback(), assMatchingQuestionGUI\feedback(), assClozeTestGUI\feedback(), ilRegistrationGUI\fillMembershipLimitation(), ilPDNewsTableGUI\fillRow(), ilLinksTableGUI\fillRow(), ilECSImportedContentTableGUI\fillRow(), ilCalendarCategoryTableGUI\fillRow(), ilNewsForContextBlockGUI\fillRow(), ilShopSearchResult\filter(), ilSearchResult\filter(), ilObjectGUI\getCenterColumnHTML(), ilCalendarAppointmentPanelGUI\getHTML(), ilLocatorGUI\getHTML(), ilLMPageObjectGUI\getLinkXML(), ilGlossaryPresentationGUI\getLinkXML(), ilLMPresentationGUI\getLinkXML(), ilObjectListGUI\getListItemHTML(), ilObjExercise\getMemberListData(), ilPageObject\getMultimediaXML(), ilNewsItem\getNewsForRefId(), ilContainerContentGUI\getRightColumnHTML(), ilCourseContentGUI\getRightColumnHTML(), ilObjectGUI\getRightColumnHTML(), ilTaggingAppEventListener\handleEvent(), ilHistoryGUI\ilHistoryGUI(), ilInternalLinkGUI\ilInternalLinkGUI(), ilObjectFeedWriter\ilObjectFeedWriter(), ilRepositoryGUI\ilRepositoryGUI(), ilUserFeedWriter\ilUserFeedWriter(), ilConditionHandlerInterface\initFormCondition(), ilPCMediaObjectGUI\insertFromPool(), ilPageObject\insertInstIntoIDs(), ilObjectListGUI\insertSubscribeCommand(), ilSoapCourseAdministration\isAssignedToCourse(), ilSoapGroupAdministration\isAssignedToGroup(), ilTestScoringGUI\manscoring(), ilObjExerciseGUI\membersObject(), assTextQuestionGUI\outQuestionForTest(), ilCourseObjectivesTableGUI\parse(), ilObjectGUI\prepareOutput(), ilObjSurveyGUI\propertiesObject(), ilObjTestGUI\propertiesObject(), ilCalendarCategory\read(), ilCalendarCategories\readSelectedCategories(), ilObjectGUI\redirectToRefId(), ilContainerGUI\removeFromDeskObject(), ilAccountMail\replacePlaceholders(), ilSearchGUI\saveResult(), ilAdvancedSearchGUI\saveResult(), ilObjFileGUI\saveUnzipObject(), ilPageObjectGUI\setDefaultLinkXml(), ilMainMenuGUI\setTemplateVars(), ilCalendarAppointmentGUI\showInfoScreen(), ilInternalLinkGUI\showLinkHelp(), ilNewsForContextBlockGUI\showNews(), ilPageObjectGUI\showPage(), ilNoteGUI\showTargets(), ilObjectGUI\showUpperIcon(), ilRepositoryExplorer\sortNodes(), ilPageObject\update(), ilSoapCourseAdministration\updateCourse(), ilLMObject\updateInternalLinks(), ilPDNewsGUI\view(), 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:

static ilObject::_prepareCloneSelection (   $a_ref_ids,
  $new_type 
)
static

Prepare copy wizard object selection.

public

Parameters
arrayint array of ref ids

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

References $lng, $res, $title, DB_FETCHMODE_OBJECT, and ilUtil\quoteArray().

Referenced by ilObjSurveyQuestionPool\_getAvailableQuestionpools(), ilObjQuestionPool\_getAvailableQuestionpools(), ilObjSurvey\_getAvailableSurveys(), ilObjTest\_getAvailableTests(), ilObjectGUI\buildCloneSelect(), and ilObjUserFolderGUI\viewObject().

{
global $ilDB,$lng;
$query = "SELECT obj_data.title as obj_title,path_data.title as path_title,child FROM tree ".
"JOIN object_reference as obj_ref ON child = obj_ref.ref_id ".
"JOIN object_data as obj_data ON obj_ref.obj_id = obj_data.obj_id ".
"JOIN object_reference as path_ref ON parent = path_ref.ref_id ".
"JOIN object_data as path_data ON path_ref.obj_id = path_data.obj_id ".
"WHERE child IN (".implode(',',ilUtil::quoteArray($a_ref_ids)).") ".
"ORDER BY obj_data.title ";
$res = $ilDB->query($query);
$options[0] = $lng->txt('obj_'.$new_type.'_select');
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
if(strlen($title = $row->obj_title) > 40)
{
$title = substr($title,0,40).'...';
}
if(strlen($path = $row->path_title) > 40)
{
$path = substr($path,0,40).'...';
}
$options[$row->child] = ($title.' ('.$lng->txt('path').': '.$path.')');
}
return $options ? $options : array();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObject::_resetDeletedDate (   $a_ref_id)

only called in ilObjectGUI::insertSavedNodes

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

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 1008 of file class.ilObject.php.

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_idobject id
string$a_descdescription public

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

References $desc, $res, getId(), 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 = ".
$ilDB->quote($a_obj_id));
if($res->numRows())
{
$query = "UPDATE object_description SET description = ".
$ilDB->quote($a_desc)." ".
"WHERE obj_id = ".$ilDB->quote($this->getId());
}
else
{
$query = "INSERT INTO object_description SET obj_id = ".
$ilDB->quote($this->getId()).", ".
"description = ".$ilDB->quote($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_idobject id
string$a_import_idimport id public

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

Referenced by ilAuthECS\createUser(), 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_idobject id
string$a_titletitle public

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

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::appendCopyInfo (   $a_target_id,
  $a_copy_id 
)

Prepend Copy info if object with same name exists in that container.

public

Parameters
intcopy_id

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

References $title, ilObjFileAccess\_appendNumberOfCopyToFilename(), ilCopyWizardOptions\_getInstance(), getTitle(), and getType().

Referenced by cloneObject().

{
global $tree;
include_once('Services/CopyWizard/classes/class.ilCopyWizardOptions.php');
$cp_options = ilCopyWizardOptions::_getInstance($a_copy_id);
if(!$cp_options->isRootNode($this->getRefId()))
{
return $this->getTitle();
}
$nodes = $tree->getChilds($a_target_id);
$title_unique = false;
require_once 'Modules/File/classes/class.ilObjFileAccess.php';
$numberOfCopy = 1;
while(!$title_unique)
{
$found = 0;
foreach($nodes as $node)
{
if(($title == $node['title']) and ($this->getType() == $node['type']))
{
$found++;
}
}
if($found > 0)
{
}
else
{
break;
}
}
return $title;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObject::cloneDependencies (   $a_target_id,
  $a_copy_id 
)

Clone object dependencies.

public

Parameters
intref_id of target object
intcopy_id

Reimplemented in ilObjCourse, ilObjGroup, ilObjSession, ilContainer, ilObjFolder, and ilCourseStart.

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

{
return true;
}
ilObject::cloneMetaData (   $target_obj)

Copy meta data.

public

Parameters
objecttarget object

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

References getId(), and getType().

Referenced by ilObjLinkResource\cloneObject(), ilObjCourse\cloneObject(), ilObjFile\cloneObject(), ilObjSurvey\cloneObject(), and ilObjTest\cloneObject().

{
include_once "./Services/MetaData/classes/class.ilMD.php";
$md = new ilMD($this->getId(),0,$this->getType());
$md->cloneMD($target_obj->getId(),0,$target_obj->getType());
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObject::cloneObject (   $a_target_id,
  $a_copy_id = 0 
)

Clone object permissions, put in tree ...

public

Parameters
inttarget id
intcopy id for class.ilCopyWizardOptions()
Returns
object new object

Reimplemented in ilObjTest, ilObjSurvey, ilObjQuestionPool, ilObjFile, ilObjCourse, ilObjGroup, ilObjForum, ilObjSession, ilContainer, ilContainerReference, ilObjCategory, ilObjExercise, ilObjLinkResource, ilObjSurveyQuestionPool, ilObjChat, ilObjExternalFeed, and ilObjFolder.

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

References $location, $title, ilAdvancedMDValues\_cloneValues(), appendCopyInfo(), getDescription(), getId(), getRefId(), and getType().

{
global $objDefinition,$ilUser,$rbacadmin, $ilDB;
$location = $objDefinition->getLocation($this->getType());
$class_name = ('ilObj'.$objDefinition->getClassName($this->getType()));
$title = $this->appendCopyInfo($a_target_id,$a_copy_id);
// create instance
include_once($location."/class.".$class_name.".php");
$new_obj = new $class_name(0, false);
$new_obj->setOwner($ilUser->getId());
$new_obj->setTitle($title);
$new_obj->setDescription($this->getDescription());
$new_obj->setType($this->getType());
// Choose upload mode to avoid creation of additional settings, db entries ...
$new_obj->create(true);
$new_obj->createReference();
$new_obj->putInTree($a_target_id);
$new_obj->setPermissions($a_target_id);
$new_obj->initDefaultRoles();
// copy local roles
$rbacadmin->copyLocalRoles($this->getRefId(),$new_obj->getRefId());
include_once('./Services/AdvancedMetaData/classes/class.ilAdvancedMDValues.php');
ilAdvancedMDValues::_cloneValues($this->getId(),$new_obj->getId());
// BEGIN WebDAV: Clone WebDAV properties
$q = "INSERT INTO dav_property (obj_id,node_id,ns,name,value) ".
"SELECT ".$ilDB->quote($new_obj->getId()).",node_id,ns,name,value ".
"FROM dav_property ".
"WHERE obj_id = ".$ilDB->quote($this->getId());
$this->ilias->db->query($q);
// END WebDAV: Clone WebDAV properties
return $new_obj;
}

+ Here is the call graph for this function:

ilObject::countReferences ( )

count references of object

public

Returns
integer number of references for this object

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

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 ilObjGroup, ilObjSession, ilObjFileBasedLM, ilObjFileAccessSettings, ilObjMediaCast, ilObjWiki, ilObjRole, ilObjMediaPool, and ilObjSAHSLearningModule.

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

References $id, $log, $owner, DB_FETCHMODE_ASSOC, getDescription(), getImportId(), getLongDescription(), getOwner(), getTitle(), setOwner(), and ilUtil\shortenText().

Referenced by ilObjGlossary\create(), ilObjLinkResource\create(), ilObjQuestionPool\create(), ilObjSurveyQuestionPool\create(), ilObjContentObject\create(), ilObjFile\create(), ilObjSurvey\create(), ilObjStyleSheet\create(), ilObjRemoteCourse\create(), ilObjMediaObject\create(), ilObjTest\create(), ilObjCourse\create(), and ilObjStyleSheet\createFromXMLFile().

{
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();
}
elseif(is_object($ilUser))
{
$owner = $ilUser->getId();
}
else
{
$owner = 0;
}
$q = "INSERT INTO object_data ".
"(type,title,description,owner,create_date,last_update,import_id) ".
"VALUES ".
"(".
$ilDB->quote($this->type).",".
$ilDB->quote($this->getTitle()).",".
$ilDB->quote($this->getDescription()).",".
$ilDB->quote($owner).",now(),now(),".
$ilDB->quote($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 = ".$ilDB->quote($this->id).",".
"description = ".$ilDB->quote($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 = ".$ilDB->quote($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 ilObjTest, ilObjSurvey, ilObjMediaObject, and ilObjFile.

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

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

Referenced by ilObjGlossary\create(), ilObjLinkResource\create(), ilObjQuestionPool\create(), ilObjSurveyQuestionPool\create(), ilObjSAHSLearningModule\create(), ilObjContentObject\create(), ilObjFileBasedLM\create(), ilObjCourse\create(), and updateMetaData().

{
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 ilObjTest, ilObjSurvey, ilObjMediaObject, ilObjQuestionPool, and ilObjStyleSheet.

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

References $ref_id.

{
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 (".$ilDB->quote($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
stringrolefolder title
stringrolefolder description
objectparent object where the rolefolder is attached to
Returns
object rolefolder object

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

References getId(), and getRefId().

Referenced by ilObjContentObject\initDefaultRoles(), ilObjChat\initDefaultRoles(), ilObjiLincCourse\initDefaultRoles(), ilObjForum\initDefaultRoles(), ilObjCourse\initDefaultRoles(), and ilObjGroup\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 ("./Services/AccessControl/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 ilObjUser, ilObjGlossary, ilObjCourse, ilObjFile, ilObjTest, ilObjGroup, ilObjForum, ilObjStyleSheet, ilObjSession, ilObjSAHSLearningModule, ilObjRemoteCourse, ilObjContentObject, ilObjFileBasedLM, ilObjSurvey, ilObjRole, ilObjWiki, ilObjSurveyQuestionPool, ilObjExercise, ilObjMediaCast, ilContainerReference, ilObjiLincClassroom, ilObjStyleSettings, ilObjiLincCourse, ilObjChat, ilObjStyleSheetFolder, ilObjQuestionPool, ilObjMediaPool, ilObjAuthSettings, ilObjMediaObject, ilObjExternalFeed, ilObjAICCLearningModule, ilObjMediaCastSettings, ilObjNewsSettings, ilObjPersonalDesktopSettings, ilObjTaggingSettings, ilObjLinkResource, ilObjComponentSettings, ilObjSurveyAdministration, ilObjAssessmentFolder, ilObjAdvancedEditing, ilObj< module_name >, ilObjRecoveryFolder, ilObjExternalToolsSettings, ilObjRoleFolder, ilObjCategory, ilObjRootFolder, ilObjUserFolder, ilObjSystemFolder, ilObjObjectFolder, and ilObjRoleTemplate.

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

References $log, ilBlockSetting\_deleteSettingsOfBlock(), _lookupType(), countReferences(), getId(), getRefId(), getTitle(), getType(), and ilUtil\removeItemFromDesktops().

{
global $rbacadmin, $log, $ilDB;
$remove = false;
// delete object_data entry
if ((!$this->referenced) || ($this->countReferences() == 1))
{
// check type match
$db_type = ilObject::_lookupType($this->getId());
if ($this->type != $db_type)
{
$message = "ilObject::delete(): Type mismatch. Object with obj_id: ".$this->id." ".
"was instantiated by type '".$this->type."'. DB type is: ".$db_type;
// write log entry
$log->write($message);
// raise error
$this->ilias->raiseError("ilObject::delete(): Type mismatch. (".$this->type."/".$this->id.")",$this->ilias->error_obj->WARNING);
}
// delete entry in object_data
$q = "DELETE FROM object_data ".
"WHERE obj_id = ".$ilDB->quote($this->getId());
$this->ilias->db->query($q);
// delete long description
$query = "DELETE FROM object_description WHERE obj_id = ".
$ilDB->quote($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 news
include_once("./Services/News/classes/class.ilNewsItem.php");
$news_item = new ilNewsItem();
$news_item->deleteNewsOfContext($this->getId(), $this->getType());
include_once("./Services/Block/classes/class.ilBlockSetting.php");
$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 = ".$ilDB->quote($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
}
// remove conditions
if ($this->referenced)
{
$ch =& new ilConditionHandler();
$ch->delete($this->getRefId());
unset($ch);
}
// BEGIN WebDAV: Delete WebDAV properties
$q = "DELETE FROM dav_property ".
"WHERE obj_id = ".$ilDB->quote($this->getId());
$this->ilias->db->query($q);
// END WebDAV: Delete WebDAV properties
// BEGIN ChangeEvent: Delete read and write events
$q = "DELETE FROM write_event ".
"WHERE obj_id = ".$ilDB->quote($this->getId());
$this->ilias->db->query($q);
$q = "DELETE FROM read_event ".
"WHERE obj_id = ".$ilDB->quote($this->getId());
$this->ilias->db->query($q);
// END ChangeEvent: Delete read and write events
return $remove;
}

+ Here is the call graph for this function:

ilObject::deleteMetaData ( )

delete meta data entry

Reimplemented in ilObjMediaObject.

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

References getId(), and getType().

Referenced by ilObjLinkResource\delete(), ilObjAICCLearningModule\delete(), ilObjQuestionPool\delete(), ilObjSurveyQuestionPool\delete(), ilObjSurvey\delete(), ilObjFileBasedLM\delete(), ilObjContentObject\delete(), ilObjSAHSLearningModule\delete(), ilObjTest\delete(), ilObjFile\delete(), ilObjCourse\delete(), and ilObjGlossary\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 560 of file class.ilObject.php.

References $create_date.

Referenced by ilObjUser\getProfileAsString().

{
}

+ Here is the caller graph for this function:

ilObject::getDescription ( )

get object description

public

Returns
string object description

Reimplemented in ilObjQuestionPool, ilObjContentObject, ilObjMediaObject, and ilObjGlossary.

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

References $desc.

Referenced by ilObjExercise\__formatSubject(), ilObjFile\addNewsNotification(), cloneObject(), create(), ilObjStyleSheet\ilClone(), ilObjSurvey\toXML(), ilObjTest\toXML(), 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 1545 of file class.ilObject.php.

{
return false;
}
ilObject::getId ( )

get object id public

Returns
integer object id

Reimplemented in ilObjMediaObject, and ilCourseStart.

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

References $id.

Referenced by ilObjCourse\__createDefaultSettings(), ilObjCourse\__deleteSettings(), ilObjChat\__initChatRecording(), ilObjCourse\__readSettings(), ilObjContentObject\_deleteStyleAssignments(), _writeDescription(), ilObjUser\addDesktopItem(), ilObjSystemFolder\addHeaderTitleTranslation(), ilObjSurvey\addMaterialTag(), ilObjFile\addNewsNotification(), ilObjUser\addObjectToClipboard(), ilObjStyleSheet\addParameter(), ilObjTest\addQTIMaterial(), ilObjCategory\addTranslation(), ilObjRootFolder\addTranslation(), ilObjUser\addUserDefinedFieldEntry(), ilObjContentObject\checkTree(), ilObjSurvey\cleanupMediaobjectUsage(), ilObjTest\cleanupMediaobjectUsage(), ilObjUser\clipboardDeleteObjectsOfType(), ilObjUser\clipboardHasObjectsOfType(), ilObjFolder\cloneDependencies(), ilContainer\cloneDependencies(), ilObjSession\cloneDependencies(), ilObjGroup\cloneDependencies(), ilObjCourse\cloneDependencies(), cloneMetaData(), ilObjFolder\cloneObject(), ilObjSurveyQuestionPool\cloneObject(), ilObjLinkResource\cloneObject(), ilObjExercise\cloneObject(), ilObjSession\cloneObject(), ilContainer\cloneObject(), ilObjForum\cloneObject(), ilObjGroup\cloneObject(), ilObjCourse\cloneObject(), ilObjFile\cloneObject(), ilObjQuestionPool\cloneObject(), cloneObject(), ilObjSurveyQuestionPool\copyQuestion(), ilObjQuestionPool\copyQuestion(), ilObjGlossary\create(), ilObjMediaPool\create(), ilObjWiki\create(), ilObjMediaCast\create(), ilObjStyleSheet\create(), ilObjRemoteCourse\create(), ilObjSession\create(), ilObjGroup\create(), ilObjCourse\create(), ilObjRemoteCourse\createAuthResource(), ilContainer\createContainerDirectory(), ilObjContentObject\createExportDirectory(), ilObjGlossary\createExportDirectory(), ilObjSurveyQuestionPool\createExportDirectory(), ilObjTest\createExportDirectory(), ilObjQuestionPool\createExportDirectory(), ilObjSurvey\createExportDirectory(), ilObjStyleSheet\createFromXMLFile(), ilObjContentObject\createImportDirectory(), ilObjGlossary\createImportDirectory(), ilObjSurveyQuestionPool\createImportDirectory(), ilObjSurvey\createImportDirectory(), ilObjContentObject\createLMTree(), ilObjFile\createMetaData(), createMetaData(), ilObjFile\createProperties(), ilObjContentObject\createProperties(), createRoleFolder(), ilObjForum\createSettings(), ilObjRoleTemplate\delete(), ilObjCategory\delete(), ilObjLinkResource\delete(), ilObjAICCLearningModule\delete(), ilObjExternalFeed\delete(), ilObjChat\delete(), ilContainerReference\delete(), ilObjMediaCast\delete(), ilObjExercise\delete(), ilObjWiki\delete(), ilObjRole\delete(), ilObjFileBasedLM\delete(), ilObjContentObject\delete(), ilObjRemoteCourse\delete(), ilObjSAHSLearningModule\delete(), ilObjSession\delete(), ilObjStyleSheet\delete(), ilObjForum\delete(), ilObjGroup\delete(), ilObjFile\delete(), ilObjCourse\delete(), ilObjGlossary\delete(), ilObjUser\delete(), delete(), ilObjSurveyQuestionPool\deleteAllData(), deleteMetaData(), ilObjQuestionPool\deleteQuestionpool(), ilObjStyleSheet\deleteStylePar(), ilObjSurvey\deleteSurveyRecord(), ilObjTest\deleteTest(), ilObjSCORM2004LearningModule\deleteTrackingDataOfUsers(), ilObjUser\deleteUserDefinedFieldEntries(), ilObjUser\dropDesktopItem(), ilObjQuestionPool\duplicateQuestion(), ilObjContentObject\executeDragDrop(), ilObjFile\export(), ilObjGlossary\exportHTML(), ilObjContentObject\exportHTML(), ilObjContentObject\exportHTMLPages(), ilObjContentObject\exportSCORM(), ilObjSCORM2004LearningModule\exportSelected(), ilObjGroup\exportXML(), ilObjQuestionPool\exportXMLMetaData(), ilObjGlossary\exportXMLMetaData(), ilObjContentObject\exportXMLMetaData(), ilObjTest\exportXMLMetaData(), ilObjContentObject\exportXMLPageObjects(), ilObjTest\fromXML(), ilObjUser\getAppliedUsers(), ilObjSCORMLearningModule\getAttemptsForUser(), ilObjSCORM2004LearningModule\getAttemptsForUser(), ilObjSurvey\getAuthor(), ilObjTest\getAuthor(), ilContainer\getBigIconPath(), ilObjUser\getClipboardObjects(), ilContainer\getContainerDirectory(), ilObjForum\getCountNew(), ilObjForum\getCountUnread(), ilObjUser\getCourseMemberships(), ilObjSAHSLearningModule\getDataDirectory(), ilObjFileBasedLM\getDataDirectory(), ilObjUser\getDesktopItems(), ilObjTest\getEvaluationAdditionalFields(), ilObjGroup\getExpiration(), ilObjGroup\getExpirationTimestamp(), ilObjExternalFeed\getFeedBlock(), ilContainer\getFirstColumn(), ilObjUser\getGroupMemberships(), ilObjSystemFolder\getHeaderTitleTranslations(), ilObjTest\getImagePath(), ilObjTest\getImagePathWeb(), ilObjExercise\getLastSubmission(), ilObjExercise\getMemberListData(), ilObjSCORMLearningModule\getModuleVersionForUser(), ilObjSCORM2004LearningModule\getModuleVersionForUser(), ilObjUser\getPersonalPicturePath(), ilObjQuestionPool\getPrintviewQuestions(), ilObjSurveyQuestionPool\getQuestionsTable(), ilObjQuestionPool\getQuestionsTable(), ilContainer\getSmallIconPath(), ilContainer\getSubItems(), ilObjGlossary\getTermList(), ilContainer\getTinyIconPath(), ilObjAICCLearningModule\getTrackedItems(), ilObjSCORMLearningModule\getTrackedItems(), ilObjSCORM2004LearningModule\getTrackedItems(), ilObjSCORMLearningModule\getTrackedUsers(), ilObjSCORM2004LearningModule\getTrackedUsers(), ilObjAICCLearningModule\getTrackingData(), ilObjSCORMLearningModule\getTrackingDataAgg(), ilObjSCORM2004LearningModule\getTrackingDataAgg(), ilObjSCORMLearningModule\getTrackingDataAggSco(), ilObjSCORMLearningModule\getTrackingDataPerUser(), ilObjSCORMLearningModule\getTrackingItems(), ilObjAICCLearningModule\getTrackingItems(), ilObjCategory\getTranslations(), ilObjRootFolder\getTranslations(), ilObjFile\getUsages(), ilObjStyleSheet\ilClone(), ilObjChat\ilObjChat(), ilObjChatServer\ilObjChatServer(), ilObjFile\ilObjFile(), ilObjSurvey\importObject(), ilObjSCORM2004LearningModule\importSuccess(), ilObjSession\initAppointments(), ilObjCourse\initCourseMemberObject(), ilObjContentObject\initDefaultRoles(), ilObjChat\initDefaultRoles(), ilObjiLincCourse\initDefaultRoles(), ilObjForum\initDefaultRoles(), ilObjCourse\initDefaultRoles(), ilObjGroup\initDefaultRoles(), ilObjFile\initFileStorage(), ilObjLinkResource\initLinkResourceItemsObject(), ilObjGroup\initParticipants(), ilObjCourse\initWaitingList(), ilObjSurvey\inviteGroup(), ilObjSurvey\inviteRole(), ilObjUser\isChild(), ilObjUser\isDesktopItem(), ilObjTest\logAction(), ilObjForum\markAllThreadsRead(), ilObjForum\markPostRead(), ilObjFile\MDUpdateListener(), MDUpdateListener(), ilObjGlossary\modifyExportIdentifier(), ilObjSurveyQuestionPool\paste(), ilObjQuestionPool\pasteFromClipboard(), ilObjFolder\putInTree(), putInTree(), ilObjRoleFolder\read(), ilObjMediaPool\read(), ilObjChatServer\read(), ilObjGlossary\read(), ilObjSAHSLearningModule\read(), ilObjStyleSettings\read(), ilObjStyleSheetFolder\read(), ilObjChat\read(), ilObjContentObject\read(), ilObjFileBasedLM\read(), ilContainerReference\read(), ilObjMediaCast\read(), ilObjWiki\read(), ilObjFolder\read(), ilObjFile\read(), ilObjExercise\read(), ilObjRemoteCourse\read(), ilObjSession\read(), ilObjStyleSheet\read(), ilObjGroup\read(), ilContainer\read(), ilObjMediaCast\readItems(), ilObjAICCLearningModule\readObject(), ilObjSCORM2004LearningModule\readObject(), ilObjContentObject\readProperties(), ilObjUser\readUserDefinedFields(), ilContainer\removeBigIcon(), ilObjSystemFolder\removeHeaderTitleTranslations(), ilObjUser\removeObjectFromClipboard(), ilContainer\removeSmallIcon(), ilContainer\removeTinyIcon(), ilObjCategory\removeTranslations(), ilObjRootFolder\removeTranslations(), ilObjFile\replaceFile(), ilObjStyleSheet\replaceStylePar(), ilObjUser\resetLastPasswordChange(), ilObjiLincCourse\saveActivationStatus(), ilObjiLincCourse\saveAKClassValues(), ilObjSurvey\saveAuthorToMetadata(), ilObjTest\saveAuthorToMetadata(), ilObjExercise\saveData(), ilContainer\saveIcons(), ilObjUser\setDesktopItemParameters(), ilObjTest\setEvaluationAdditionalFields(), ilObjGroup\setExpirationDateTime(), ilObjSurvey\setInvitation(), ilObjSurveyQuestionPool\toXML(), ilObjSurvey\toXML(), ilObjStyleSheetFolder\update(), ilObjStyleSettings\update(), ilObjNull\update(), ilObjiLincCourse\update(), ilObjFileBasedLM\update(), ilObjMediaCast\update(), ilObjWiki\update(), ilContainerReference\update(), ilObjGlossary\update(), ilObjFile\update(), ilObjExercise\update(), ilObjSAHSLearningModule\update(), ilObjForum\update(), ilObjSession\update(), ilObjGroup\update(), update(), ilObjCourse\update(), ilObjRemoteCourse\updateFromECSContent(), ilObjForum\updateLastAccess(), ilObjQuestionPool\updateMetaData(), ilObjFile\updateMetaData(), updateMetaData(), updateOwner(), ilObjContentObject\updateProperties(), ilObjCourse\updateSettings(), ilObjCategory\updateTranslation(), ilObjUser\updateUserDefinedFields(), ilObjUser\writeAccepted(), ilObjStyleSheet\writeCSSFile(), and ilObjContentObject\writeStyleSheetId().

{
return $this->id;
}

+ Here is the caller graph for this function:

ilObject::getImportId ( )

get import id

public

Returns
string import id

Reimplemented in ilObjMediaObject, and ilObjContentObject.

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

References $import_id.

Referenced by create(), and update().

{
}

+ Here is the caller graph for this function:

ilObject::getLastUpdateDate ( )

get last update date public

Returns
string date of last update

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

References $last_update.

{
}
ilObject::getLongDescription ( )

get object long description (stored in object_description)

public

Returns
string object description

Reimplemented in ilObjLanguageExt.

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

References $desc.

Referenced by create(), createMetaData(), ilObjCourse\prepareAppointments(), ilObjGroup\prepareAppointments(), ilObjSession\prepareCalendarAppointments(), 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 499 of file class.ilObject.php.

References $owner.

Referenced by create(), getOwnerName(), and updateOwner().

{
return $this->owner;
}

+ Here is the caller graph for this function:

ilObject::getOwnerName ( )

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

References _lookupOwnerName(), and getOwner().

Referenced by ilObjUserTracking\getAccessTotalPerObj().

{
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObject::getPresentationTitle ( )

get presentation title Normally same as title Overwritten for sessions

public

Parameters
@return

Reimplemented in ilObjSession.

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

References getTitle().

{
return $this->getTitle();
}

+ Here is the call graph for this function:

ilObject::getRefId ( )

get reference id public

Returns
integer reference id

Reimplemented in ilObjMediaObject, ilCourseStart, and ilObjStyleSheet.

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

References $ref_id.

Referenced by ilObjChat\__formatBody(), ilObjCourse\__getLocalRoles(), ilObjCourse\__setCourseStatus(), ilObjFolder\addAdditionalSubItemInformation(), ilObjGroup\addAdditionalSubItemInformation(), ilObjChat\cloneAutoGeneratedRoles(), ilObjForum\cloneAutoGeneratedRoles(), ilObjGroup\cloneAutoGeneratedRoles(), ilObjCourse\cloneAutoGeneratedRoles(), ilObjFolder\cloneDependencies(), ilObjGroup\cloneDependencies(), ilObjCourse\cloneDependencies(), ilObjForum\cloneObject(), cloneObject(), ilObjTest\cloneObject(), ilObjRoleFolder\createRole(), createRoleFolder(), ilObjRoleFolder\delete(), ilObjChat\delete(), delete(), ilObjSurvey\disinviteUser(), ilObjFolder\downloadFolder(), ilObjDlBook\export(), ilObjiLincCourse\getAdminIds(), ilObjCourse\getDefaultCourseRoles(), ilObjGroup\getDefaultGroupRoles(), ilObjiLincCourse\getDefaultRoles(), ilObjGroup\getGroupAdminIds(), ilObjCourse\getLocalCourseRoles(), ilObjGroup\getLocalGroupRoles(), ilObjiLincCourse\getLocalRoles(), ilContainer\getSubItems(), ilObjSurvey\getSurveyCodesForExport(), ilObjSurvey\getSurveyCodesTableData(), ilObjChat\initDefaultRoles(), ilObjiLincCourse\initDefaultRoles(), ilObjForum\initDefaultRoles(), ilObjCourse\initDefaultRoles(), ilObjGroup\initDefaultRoles(), ilObjGroup\initGroupStatus(), ilObjSurvey\inviteGroup(), ilObjSurvey\inviteRole(), ilObjSurvey\inviteUser(), ilObjRoleFolder\isDeleted(), ilObjGroup\leaveGroup(), ilObjTest\logAction(), ilObjRoleFolder\purge(), ilObjFolder\putInTree(), putInTree(), ilObjExercise\read(), ilObjGroup\readGroupStatus(), ilObjSCORMLearningModule\sendExportFile(), ilObjSurvey\setInvitation(), setPermissions(), and ilObjGroup\updateGroupType().

{
return $this->ref_id;
}

+ Here is the caller graph for this function:

ilObject::getType ( )

get object type public

Returns
string object type

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

References $type.

Referenced by ilObjExercise\__formatBody(), ilObjFile\addNewsNotification(), appendCopyInfo(), ilObjSurvey\cleanupMediaobjectUsage(), ilObjTest\cleanupMediaobjectUsage(), cloneMetaData(), ilObjSurveyQuestionPool\cloneObject(), ilContainer\cloneObject(), ilObjQuestionPool\cloneObject(), cloneObject(), ilObjFile\createMetaData(), ilObjMediaObject\createMetaData(), createMetaData(), ilObjExternalFeed\delete(), delete(), ilObjMediaObject\deleteMetaData(), deleteMetaData(), ilObjContentObject\executeDragDrop(), ilObjGlossary\exportHTML(), ilObjContentObject\exportHTML(), ilObjContentObject\exportHTMLPages(), ilObjContentObject\exportSCORM(), ilObjContentObject\exportXML(), ilObjQuestionPool\exportXMLMetaData(), ilObjGlossary\exportXMLMetaData(), ilObjContentObject\exportXMLMetaData(), ilObjTest\exportXMLMetaData(), ilObjContentObject\exportXMLPageObjects(), ilObjSurvey\getAuthor(), ilObjTest\getAuthor(), ilObjExternalFeed\getFeedBlock(), ilContainer\getGroupedObjTypes(), ilObjMediaObject\getXML(), ilObjStyleSheet\ilClone(), ilObjFile\MDUpdateListener(), ilObjMediaObject\MDUpdateListener(), MDUpdateListener(), ilObjExternalToolsSettings\notify(), ilObjRecoveryFolder\notify(), ilObj< module_name >\notify(), ilObjAdvancedEditing\notify(), ilObjAssessmentFolder\notify(), ilObjSurveyAdministration\notify(), ilObjComponentSettings\notify(), ilObjPersonalDesktopSettings\notify(), ilObjTaggingSettings\notify(), ilObjNewsSettings\notify(), ilObjMediaCastSettings\notify(), ilObjAuthSettings\notify(), ilObjExternalFeed\notify(), ilObjStyleSheetFolder\notify(), ilObjMediaPool\notify(), ilObjQuestionPool\notify(), ilObjStyleSettings\notify(), ilObjMediaCast\notify(), ilObjSurveyQuestionPool\notify(), ilObjWiki\notify(), ilObjFileBasedLM\notify(), ilObjSurvey\notify(), ilObjSAHSLearningModule\notify(), ilObjTest\notify(), ilObjGlossary\notify(), ilObjContentObject\notify(), putInTree(), ilObjMediaCast\readItems(), ilObjSurvey\saveAuthorToMetadata(), ilObjTest\saveAuthorToMetadata(), setPermissions(), ilObjSurveyQuestionPool\toXML(), ilObjSurvey\toXML(), ilObjNull\update(), ilObjQuestionPool\updateMetaData(), ilObjMediaObject\updateMetaData(), ilObjFile\updateMetaData(), and updateMetaData().

{
return $this->type;
}

+ Here is the caller graph for this function:

ilObject::getUntranslatedTitle ( )

get untranslated object title public

Returns
string object title

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

References $untranslatedTitle.

ilObject::getXMLZip ( )

Reimplemented in ilObjContentObject, ilObjGlossary, ilObjFile, and ilObjDlBook.

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

{
return false;
}
ilObject::ilObject (   $a_id = 0,
  $a_reference = true 
)

Constructor public.

Parameters
integerreference_id or object_id
booleantreat the id as reference_id (true) or object_id (false)

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

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

Referenced by ilObjPrivacySecurity\__construct(), ilObjCalendarSettings\__construct(), ilObjRemoteCourse\__construct(), ilObjGroup\__construct(), ilObj< module_name >\ilObj< module_name >(), ilObjAdvancedEditing\ilObjAdvancedEditing(), ilObjAICCLearningModule\ilObjAICCLearningModule(), ilObjAssessmentFolder\ilObjAssessmentFolder(), ilObjAuthSettings\ilObjAuthSettings(), ilObjChat\ilObjChat(), ilObjChatServer\ilObjChatServer(), ilObjComponentSettings\ilObjComponentSettings(), ilObjContentObject\ilObjContentObject(), ilObjExercise\ilObjExercise(), ilObjExternalFeed\ilObjExternalFeed(), ilObjExternalToolsSettings\ilObjExternalToolsSettings(), ilObjFile\ilObjFile(), ilObjFileAccessSettings\ilObjFileAccessSettings(), ilObjFileBasedLM\ilObjFileBasedLM(), ilObjForum\ilObjForum(), ilObjGlossary\ilObjGlossary(), ilObjHACPLearningModule\ilObjHACPLearningModule(), ilObjiLincCourse\ilObjiLincCourse(), ilObjLanguage\ilObjLanguage(), ilObjLanguageFolder\ilObjLanguageFolder(), ilObjLinkResource\ilObjLinkResource(), ilObjMail\ilObjMail(), ilObjMDSettings\ilObjMDSettings(), ilObjMediaCast\ilObjMediaCast(), ilObjMediaCastSettings\ilObjMediaCastSettings(), ilObjMediaObject\ilObjMediaObject(), ilObjMediaPool\ilObjMediaPool(), ilObjNewsSettings\ilObjNewsSettings(), ilObjNull\ilObjNull(), ilObjObjectFolder\ilObjObjectFolder(), ilObjPaymentSettings\ilObjPaymentSettings(), ilObjPersonalDesktopSettings\ilObjPersonalDesktopSettings(), ilObjQuestionPool\ilObjQuestionPool(), ilObjRecoveryFolder\ilObjRecoveryFolder(), ilObjRole\ilObjRole(), ilObjRoleFolder\ilObjRoleFolder(), ilObjRoleTemplate\ilObjRoleTemplate(), ilObjRootFolder\ilObjRootFolder(), ilObjSAHSLearningModule\ilObjSAHSLearningModule(), ilObjSCORM2004LearningModule\ilObjSCORM2004LearningModule(), ilObjSCORMLearningModule\ilObjSCORMLearningModule(), ilObjSearchSettings\ilObjSearchSettings(), ilObjStyleSettings\ilObjStyleSettings(), ilObjStyleSheet\ilObjStyleSheet(), ilObjStyleSheetFolder\ilObjStyleSheetFolder(), ilObjSurvey\ilObjSurvey(), ilObjSurveyAdministration\ilObjSurveyAdministration(), ilObjSurveyQuestionPool\ilObjSurveyQuestionPool(), ilObjSystemFolder\ilObjSystemFolder(), ilObjTaggingSettings\ilObjTaggingSettings(), ilObjTest\ilObjTest(), ilObjTypeDefinition\ilObjTypeDefinition(), ilObjUser\ilObjUser(), ilObjUserFolder\ilObjUserFolder(), ilObjUserTracking\ilObjUserTracking(), and ilObjWiki\ilObjWiki().

{
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 ilObjGroup, ilObjCourse, ilObjTest, ilObjForum, ilObjFileBasedLM, ilObjWiki, ilObjMediaCast, ilObjiLincCourse, ilObjStyleSettings, ilObjQuestionPool, ilObjMediaPool, ilObjStyleSheetFolder, ilObjExternalFeed, ilObjAuthSettings, ilObjChat, ilObjMediaCastSettings, ilObjNewsSettings, ilObjPersonalDesktopSettings, ilObjTaggingSettings, ilObjComponentSettings, ilObjSurveyAdministration, ilObjAssessmentFolder, ilObjAdvancedEditing, ilObjContentObject, ilObj< module_name >, ilObjRecoveryFolder, and ilObjExternalToolsSettings.

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

{
return array();
}
ilObject::isUserRegistered (   $a_user_id = 0)

Definition at line 1530 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 ilObjCourse, ilObjMediaObject, and ilObjFile.

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

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

{
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:

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
stringevent
integerreference id of object where the event occured
integerreference id of node in the tree which is actually notified
arraypasses optional parameters if required
Returns
boolean

Reimplemented in ilObjGroup, ilObjContentObject, ilObjGlossary, ilObjTest, ilObjSAHSLearningModule, ilObjSurvey, ilObjFileBasedLM, ilObjWiki, ilObjiLincCourse, ilObjMediaCast, ilObjSurveyQuestionPool, ilObjStyleSettings, ilObjQuestionPool, ilObjMediaPool, ilObjStyleSheetFolder, ilObjExternalFeed, ilObjAuthSettings, ilObjMediaCastSettings, ilObjNewsSettings, ilObjPersonalDesktopSettings, ilObjTaggingSettings, ilObjComponentSettings, ilObjSurveyAdministration, ilObjAssessmentFolder, ilObjAdvancedEditing, ilObj< module_name >, ilObjRecoveryFolder, ilObjExternalToolsSettings, and ilObjRootFolder.

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

{
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 ilObjContentObject, and ilObjFolder.

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

References $log, 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
booleanpublic

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

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

References $ilBench, $log, $obj_data_record, $res, DB_FETCHMODE_ASSOC, DB_FETCHMODE_OBJECT, and setDescription().

Referenced by ilObject().

{
global $objDefinition, $ilBench, $ilDB, $log;
$ilBench->start("Core", "ilObject_read");
if (isset($this->obj_data_record) && !$a_force_db)
{
}
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 = $ilDB->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"];
// check type match
if ($this->type != $obj["type"])
{
$message = "ilObject::read(): Type mismatch. Object with obj_id: ".$this->id." ".
"was instantiated by type '".$this->type."'. DB type is: ".$obj["type"];
// write log entry
$log->write($message);
// raise error
$this->ilias->raiseError("ilObject::read(): Type mismatch. (".$this->type."/".$this->id.")",$this->ilias->error_obj->WARNING);
}
$this->type = $obj["type"];
$this->title = $obj["title"];
// BEGIN WebDAV: WebDAV needs to access the untranslated title of an object
$this->untranslatedTitle = $obj["title"];
// END WebDAV: WebDAV needs to access the untranslated title of an object
$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 1535 of file class.ilObject.php.

References $register.

{
}
ilObject::setDescription (   $a_desc)

set object description

public

Parameters
string$a_descobject description

Reimplemented in ilObjQuestionPool, ilObjContentObject, ilObjMediaObject, and ilObjGlossary.

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

References ilUtil\shortenText().

Referenced by ilObjRole\assignData(), ilObjTest\fromXML(), ilObjLanguage\install(), MDUpdateListener(), ilObjRoleFolder\read(), ilObjiLincClassroom\read(), read(), ilObjLanguageExt\setLocal(), and ilObjLanguage\uninstall().

{
// 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_idobject id

Reimplemented in ilObjMediaObject, and ilCourseStart.

Definition at line 317 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_idimport id

Reimplemented in ilObjMediaObject, and ilObjContentObject.

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

Referenced by ilCategoryImportParser\handlerBeginTag().

{
$this->import_id = $a_import_id;
}

+ Here is the caller graph for this function:

ilObject::setObjDataRecord (   $a_record)

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

Parameters
array$a_recordassoc. array from table object_data public
Returns
integer object id

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

{
$this->obj_data_record = $a_record;
}
ilObject::setOwner (   $a_owner)

set object owner

public

Parameters
integer$a_ownerowner id

Definition at line 548 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
integerreference_id of parent object public

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

References 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_idreference id

Reimplemented in ilCourseStart.

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

{
$this->ref_id = $a_id;
$this->referenced = true;
}
ilObject::setRegisterMode (   $a_bool)

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

Referenced by ilObjGroup\__construct(), 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_titleobject title

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

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

References $title, and ilUtil\shortenText().

Referenced by ilObjRole\assignData(), ilObjTest\fromXML(), MDUpdateListener(), ilObjRoleFolder\read(), ilObjiLincClassroom\read(), ilObjLanguage\uninstall(), and ilObjRemoteCourse\updateFromECSContent().

{
if ($a_title == "")
{
$a_title = "NO TITLE";
}
$this->title = ilUtil::shortenText($a_title, $this->max_title, $this->add_dots);
// BEGIN WebDAV: WebDAV needs to access the untranslated title of an object
$this->untranslatedTitle = $this->title;
// END WebDAV: WebDAV needs to access the untranslated title of an object
}

+ 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_typeobject type

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

{
$this->type = $a_type;
}
ilObject::update ( )

update object in db

public

Returns
boolean true on success

Reimplemented in ilObjCourse, ilObjStyleSheet, ilObjTest, ilObjUser, ilObjGroup, ilObjMediaObject, ilObjSession, ilObjForum, ilObjRemoteCourse, ilObjSAHSLearningModule, ilObjExercise, ilObjFile, ilObjGlossary, ilObjSurvey, ilObjFileAccessSettings, ilContainerReference, ilObjContentObject, ilObjWiki, ilObjMediaCast, ilObjFileBasedLM, ilObjiLincCourse, ilObjRole, ilObjNull, ilObjMediaPool, ilObjAuthSettings, ilObjQuestionPool, ilObjStyleSettings, ilObjStyleSheetFolder, ilObjSurveyQuestionPool, ilObjLinkResource, ilObjSearchSettings, ilObjPaymentSettings, ilObjSurveyAdministration, ilObjAssessmentFolder, ilObjAdvancedEditing, ilObj< module_name >, ilObjMediaCastSettings, ilObjRecoveryFolder, ilObjNewsSettings, ilObjPersonalDesktopSettings, ilObjTaggingSettings, ilObjExternalToolsSettings, ilObjComponentSettings, and ilObjExternalFeed.

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

References $res, DB_FETCHMODE_ASSOC, getDescription(), getId(), getImportId(), getLongDescription(), and getTitle().

Referenced by ilObjLanguage\install(), ilObjLanguageExt\setLocal(), and ilObjLanguage\uninstall().

{
global $objDefinition, $ilDB;
$q = "UPDATE object_data ".
"SET ".
"title = ".$ilDB->quote($this->getTitle()).",".
"description = ".$ilDB->quote($this->getDescription()).", ".
"import_id = ".$ilDB->quote($this->getImportId()).",".
"last_update = now() ".
"WHERE obj_id = ".$ilDB->quote($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 = ".
$ilDB->quote($this->getId()));
if($res->numRows())
{
$query = "UPDATE object_description SET description = ".
$ilDB->quote($this->getLongDescription())." ".
"WHERE obj_id = ".$ilDB->quote($this->getId());
}
else
{
$query = "INSERT INTO object_description SET obj_id = ".$ilDB->quote($this->getId()).", ".
"description = ".$ilDB->quote($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 ilObjFile, ilObjMediaObject, and ilObjQuestionPool.

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

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

Referenced by ilObjLinkResource\update(), ilObjSurveyQuestionPool\update(), ilObjFileBasedLM\update(), ilObjContentObject\update(), ilObjSurvey\update(), ilObjGlossary\update(), ilObjSAHSLearningModule\update(), and ilObjCourse\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();
// BEGIN WebDAV: meta data can be missing sometimes.
if ($md_gen == null)
{
$this->createMetaData();
$md =& new ilMD($this->getId(), 0, $this->getType());
$md_gen =& $md->getGeneral();
}
// END WebDAV: meta data can be missing sometimes.
$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 837 of file class.ilObject.php.

References DB_FETCHMODE_ASSOC, getId(), and getOwner().

Referenced by ilObjUser\update().

{
global $ilDB;
$q = "UPDATE object_data ".
"SET ".
"owner = ".$ilDB->quote($this->getOwner()).", ".
"last_update = now() ".
"WHERE obj_id = ".$ilDB->quote($this->getId());
$this->ilias->db->query($q);
$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"];
return true;
}

+ Here is the call graph for this function:

+ 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 158 of file class.ilObject.php.

References $referenced.

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 99 of file class.ilObject.php.

ilObject::$create_date

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

Referenced by getCreateDate().

ilObject::$import_id
ilObject::$last_update

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

Referenced by ilObjUser\getLastUpdate(), and getLastUpdateDate().

ilObject::$long_desc

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

ilObject::$max_desc

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

ilObject::$max_title

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

ilObject::$obj_data_record

object_data record

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

Referenced by read().

ilObject::$objectList

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

ilObject::$owner
ilObject::$referenced

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

Referenced by withReferences().

ilObject::$register = false

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

Referenced by requireRegistration().

ilObject::$untranslatedTitle

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

Referenced by getUntranslatedTitle().


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