ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjUserTracking Class Reference
+ Inheritance diagram for ilObjUserTracking:
+ Collaboration diagram for ilObjUserTracking:

Public Member Functions

 ilObjUserTracking ($a_id=0, $a_call_by_reference=true)
 Constructor public.
 setActivationStatus ($a_status)
 getActivationStatus ()
 enableTracking ($a_enable)
 enable user tracking
 enabledTracking ()
 _enabledTracking ()
 check wether learing progress is enabled or not
 enabledLearningProgress ()
 _enabledLearningProgress ()
 check wether learing progress is enabled or not
 enableUserRelatedData ($a_enable)
 enable tracking of user related data
 enabledUserRelatedData ()
 _enabledUserRelatedData ()
 check wether user related tracking is enabled or not
 _enabledObjectStatistics ()
 check wether object statistics is enabled or not
 setValidTimeSpan ($a_time_span)
 getValidTimeSpan ()
 _getValidTimeSpan ()
 setChangeEventTrackingEnabled ($newValue)
 Sets the changeEventTrackingEnabled property.
 isChangeEventTrackingEnabled ()
 Gets the changeEventTrackingEnabled property.
 setObjectStatisticsEnabled ($newValue)
 Sets the object statistics property.
 isObjectStatisticsEnabled ()
 Gets the object statistic property.
 updateSettings ()
 validateSettings ()
 getRecordsTotal ()
 get total number of tracking records
 getMonthTotalOverview ()
 get total number of accesses per month
 getTotalOlderThanMonth ($a_month)
 get total number of records older than given month (YYYY-MM)
 getAccessTotalPerUser ($a_condition, $a_searchTermsCondition="", $a_objectCondition="")
 get total number of records older than given month (YYYY-MM)
 getAccessTotalPerObj ($a_condition, $a_searchTermsCondition="")
 get total number of records older than given month (YYYY-MM)
 getDuration ($a_obj_id)
 getAccessPerUserDetail ($a_condition, $a_searchTermsCondition="", $a_objectCondition="")
 get per user of records older than given month (YYYY-MM)
 deleteTrackingDataBeforeMonth ($a_month)
 delete tracking data of month (YYYY-MM) and before
 increaseMonth ($a_month)
 Increase Month string ("YYYY-MM") by one month.
 allAuthor ($a_type, $type)
 get all author
 authorLms ($id, $type)
 get author's all lm or tst
 getObjId ($title, $type)
 get obj_id of some object
 getTestId ($id)
 get Test_id of some test
 countResults ($condition)
 Return the counts of search results.
 getOwnerName ($id)
 Return the owner name of the object.
 __readSettings ()
 _deleteUser ($a_usr_id)
 setExtendedData ($a_value)
 hasExtendedData ($a_code)
- Public Member Functions inherited from ilObject
 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
 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
 getDiskUsage ()
 Gets the disk usage of the object in bytes.
 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)
 _lookupOwner ($a_id)
 lookup object owner
 _lookupLastUpdate ($a_id, $a_as_string=false)
 lookup last update
 _getLastUpdateOfObjects ($a_objs)
 Get last update for a set of media objects.
 _setDeletedDate ($a_ref_id)
 only called in ilTree::saveSubTree
 _resetDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes
 _lookupDeletedDate ($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)
 _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
 applyDidacticTemplate ($a_tpl_id)
 Apply template.
 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, $a_omit_tree=false)
 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.

Data Fields

 $valid_time_span = null
 $extended_data = null
const EXTENDED_DATA_LAST_ACCESS = 1
const EXTENDED_DATA_READ_COUNT = 2
const EXTENDED_DATA_SPENT_SECONDS = 4
- Data Fields inherited from ilObject
const TITLE_LENGTH = 128
 max length of object title
 $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

Private Attributes

 $is_change_event_tracking_enabled = null
 This variable holds the enabled state of the change event tracking.

Additional Inherited Members

- Static Public Member Functions inherited from ilObject
static _lookupObjIdByImportId ($a_import_id)
static _getAllReferences ($a_id)
 get all reference ids of object
static _lookupTitle ($a_id)
 lookup object title
static _getIdsForTitle ($title, $type= '', $partialmatch=false)
static _lookupDescription ($a_id)
 lookup object description
static _lookupObjId ($a_id)
static _lookupType ($a_id, $a_reference=false)
 lookup object type
 _exists ($a_id, $a_reference=false)
 checks if an object exists in object_data
static _getObjectsByType ($a_obj_type="", $a_owner="")
 Get objects by type.
static _prepareCloneSelection ($a_ref_ids, $new_type, $show_path=true)
 Prepare copy wizard object selection.
static _getIcon ($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
 Get icon for repository item.
static collectDeletionDependencies (&$deps, $a_ref_id, $a_obj_id, $a_type, $a_depth=0)
 Collect deletion dependencies.
static getDeletionDependencies ($a_obj_id)
 Get deletion dependencies.

Detailed Description

Definition at line 24 of file class.ilObjUserTracking.php.

Member Function Documentation

ilObjUserTracking::__readSettings ( )

Definition at line 530 of file class.ilObjUserTracking.php.

References ilObject\$ilias, ilChangeEvent\_isActive(), enableUserRelatedData(), setExtendedData(), setObjectStatisticsEnabled(), setValidTimeSpan(), and UT_INACTIVE_BOTH.

Referenced by ilObjUserTracking().

{
global $ilias;
#$this->enableTracking($ilias->getSetting("enable_tracking",0));
$this->status = $ilias->getSetting('enable_tracking',UT_INACTIVE_BOTH);
$this->enableUserRelatedData($ilias->getSetting("save_user_related_data",0));
$this->setValidTimeSpan($ilias->getSetting("tracking_time_span",DEFAULT_TIME_SPAN));#
// BEGIN ChangeEvent
require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
$this->is_change_event_tracking_enabled = ilChangeEvent::_isActive();
// END ChangeEvent
$this->setExtendedData($ilias->getSetting("lp_extended_data"),0);
$this->setObjectStatisticsEnabled($ilias->getSetting("object_statistics"),0);
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjUserTracking::_deleteUser (   $a_usr_id)

Definition at line 550 of file class.ilObjUserTracking.php.

References $ilDB, $query, and $res.

Referenced by ilObjUser\delete().

{
global $ilDB;
$query = "DELETE FROM ut_access WHERE user_id = ".$ilDB->quote($a_usr_id, "integer")."";
$ilDB->manipulate($query);
$query = sprintf('DELETE FROM read_event WHERE usr_id = %s ',
$ilDB->quote($a_usr_id,'integer'));
$aff = $ilDB->manipulate($query);
$query = sprintf('DELETE FROM write_event WHERE usr_id = %s ',
$ilDB->quote($a_usr_id,'integer'));
$aff = $ilDB->manipulate($query);
$query = "DELETE FROM ut_lp_marks WHERE usr_id = ".$ilDB->quote($a_usr_id ,'integer')." ";
$res = $ilDB->manipulate($query);
$ilDB->manipulate("DELETE FROM ut_online WHERE usr_id = ".
$ilDB->quote($a_usr_id, "integer"));
return true;
}

+ Here is the caller graph for this function:

ilObjUserTracking::_enabledObjectStatistics ( )

check wether object statistics is enabled or not

Definition at line 140 of file class.ilObjUserTracking.php.

References $ilSetting.

Referenced by ilChangeEvent\_recordObjStats(), and ilObjUserTrackingGUI\getTabs().

{
global $ilSetting;
return (boolean) $ilSetting->get('object_statistics');
}

+ Here is the caller graph for this function:

ilObjUserTracking::_enabledTracking ( )

check wether learing progress is enabled or not

Definition at line 88 of file class.ilObjUserTracking.php.

References ilObject\$ilias, UT_ACTIVE_BOTH, and UT_ACTIVE_UT.

Referenced by ilTracking\_trackAccess(), and ilObjUserFolderGUI\getTabs().

{
global $ilias;
$status = $ilias->getSetting("enable_tracking");
return ($status == UT_ACTIVE_UT) || ($status == UT_ACTIVE_BOTH);
}

+ Here is the caller graph for this function:

ilObjUserTracking::_enabledUserRelatedData ( )
ilObjUserTracking::_getValidTimeSpan ( )

Definition at line 158 of file class.ilObjUserTracking.php.

References ilObject\$ilias.

Referenced by ilChangeEvent\_recordReadEvent(), and ilLPListOfSettingsGUI\initFormSettings().

{
global $ilias;
return (int) $ilias->getSetting("tracking_time_span",DEFAULT_TIME_SPAN);
}

+ Here is the caller graph for this function:

ilObjUserTracking::allAuthor (   $a_type,
  $type 
)

get all author

Definition at line 437 of file class.ilObjUserTracking.php.

References $ilDB, ilObject\$type, and DB_FETCHMODE_ASSOC.

Referenced by ilObjUserTrackingGUI\getObjectCondition().

{
global $ilDB;
$q = "SELECT DISTINCT A.obj_id,A.type,A.title FROM object_data A,object_data B WHERE A.type = ".
$ilDB->quote($a_type ,'text')." AND A.obj_id = B.owner AND B.type=".$ilDB->quote($type ,'text')." ".
"GROUP BY A.obj_id";
//echo $q;
$author = $ilDB->query($q);
$all = array();
while ($aauthor = $author->fetchRow(DB_FETCHMODE_ASSOC))
{
$all[] = array("title" => $aauthor["title"],
"obj_id" =>$aauthor["obj_id"]);
}
return $all;
}

+ Here is the caller graph for this function:

ilObjUserTracking::authorLms (   $id,
  $type 
)

get author's all lm or tst

Definition at line 458 of file class.ilObjUserTracking.php.

References ilObject\$id, $ilDB, ilObject\$type, and DB_FETCHMODE_ASSOC.

Referenced by ilObjUserTrackingGUI\getObjectCondition().

{
global $ilDB;
$q = "SELECT title,obj_id FROM object_data WHERE owner = ".$ilDB->quote($id ,'integer')." and type=".$ilDB->quote($type ,'text');
//echo $q."<br>";
$lms = $ilDB->query($q);
$all = array();
while ($alms = $lms->fetchRow(DB_FETCHMODE_ASSOC))
{
$all[] = array("title" => $alms["title"],
"obj_id" =>$alms["obj_id"]);
}
return $all;
}

+ Here is the caller graph for this function:

ilObjUserTracking::countResults (   $condition)

Return the counts of search results.

Definition at line 506 of file class.ilObjUserTracking.php.

References $res, and $result.

{
$q = "SELECT count(*) from ut_access "
." WHERE "
.$condition;
$res = $this->ilias->db->query($q);
$result = $res->fetchRow();
return $result[0];
}
ilObjUserTracking::deleteTrackingDataBeforeMonth (   $a_month)

delete tracking data of month (YYYY-MM) and before

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

References $ilDB, and increaseMonth().

{
global $ilDB;
$q = "DELETE FROM ut_access WHERE acc_time < ".
$ilDB->quote($this->increaseMonth($a_month)."-01", "timestamp");
$ilDB->manipulate($q);
}

+ Here is the call graph for this function:

ilObjUserTracking::enabledLearningProgress ( )

Definition at line 97 of file class.ilObjUserTracking.php.

References UT_ACTIVE_BOTH, and UT_ACTIVE_LP.

{
return ($this->status == UT_ACTIVE_LP) || ($this->status == UT_ACTIVE_BOTH);
}
ilObjUserTracking::enabledTracking ( )

Definition at line 80 of file class.ilObjUserTracking.php.

References UT_ACTIVE_BOTH, and UT_ACTIVE_UT.

{
return ($this->status == UT_ACTIVE_UT) || ($this->status == UT_ACTIVE_BOTH);
}
ilObjUserTracking::enabledUserRelatedData ( )

Definition at line 122 of file class.ilObjUserTracking.php.

Referenced by updateSettings().

{
return $this->tracking_user_related ? true : false;
}

+ Here is the caller graph for this function:

ilObjUserTracking::enableTracking (   $a_enable)

enable user tracking

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

{
echo 'deprecated';
$this->tracking_enabled = (bool) $a_enable;
return true;
}
ilObjUserTracking::enableUserRelatedData (   $a_enable)

enable tracking of user related data

Definition at line 117 of file class.ilObjUserTracking.php.

Referenced by __readSettings().

{
$this->tracking_user_related = (bool) $a_enable;
}

+ Here is the caller graph for this function:

ilObjUserTracking::getAccessPerUserDetail (   $a_condition,
  $a_searchTermsCondition = "",
  $a_objectCondition = "" 
)

get per user of records older than given month (YYYY-MM)

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

References $ilDB, ilObjUser\_lookupName(), ilObject\_lookupTitle(), and DB_FETCHMODE_ASSOC.

{
global $ilDB;
$q = "SELECT id, user_id,client_ip,acc_obj_id,language ,acc_time FROM ut_access "
.($a_searchTermsCondition != "" ? $a_searchTermsCondition : " WHERE ")
.$a_condition
.$a_objectCondition
." GROUP BY id";
$cnt_set = $ilDB->query($q);
$acc = array();
while($cnt_rec = $cnt_set->fetchRow(DB_FETCHMODE_ASSOC))
{
$name = ilObjUser::_lookupName($cnt_rec["user_id"]);
if ($cnt_rec["user_id"] != 0)
{
$acc[] = array("user_id" => $cnt_rec["user_id"],
"name" => $name["lastname"].", ".$name["firstname"],
"client_ip" => $cnt_rec["client_ip"],
"acc_obj_id" => ilObject::_lookupTitle($cnt_rec["acc_obj_id"]),
"language" => $cnt_rec["language"],
"acc_time" => $cnt_rec["acc_time"]
);
}
}
return $acc;
}

+ Here is the call graph for this function:

ilObjUserTracking::getAccessTotalPerObj (   $a_condition,
  $a_searchTermsCondition = "" 
)

get total number of records older than given month (YYYY-MM)

Definition at line 330 of file class.ilObjUserTracking.php.

References $ilDB, ilObject\_lookupTitle(), DB_FETCHMODE_ASSOC, getDuration(), and ilObject\getOwnerName().

{
global $ilDB;
$q = "SELECT count(acc_obj_id) AS cnt, acc_obj_id FROM ut_access "
.($a_searchTermsCondition != "" ? $a_searchTermsCondition : " WHERE ")
.$a_condition
." GROUP BY acc_obj_id";
$cnt_set = $ilDB->query($q);
//echo "q:".$q;
$acc = array();
while ($cnt_rec = $cnt_set->fetchRow(DB_FETCHMODE_ASSOC))
{
if ($cnt_rec["cnt"] != "")
{
$acc[] = array("id" => $cnt_rec["acc_obj_id"],
"title" => ilObject::_lookupTitle($cnt_rec["acc_obj_id"]),
"author" => $this->getOwnerName($cnt_rec["acc_obj_id"]),
"duration" => $this->getDuration($cnt_rec["acc_obj_id"]),
"cnt" => $cnt_rec["cnt"]);
}
}
return $acc;
}

+ Here is the call graph for this function:

ilObjUserTracking::getAccessTotalPerUser (   $a_condition,
  $a_searchTermsCondition = "",
  $a_objectCondition = "" 
)

get total number of records older than given month (YYYY-MM)

Definition at line 300 of file class.ilObjUserTracking.php.

References $ilDB, ilObjUser\_lookupName(), and DB_FETCHMODE_ASSOC.

{
global $ilDB;
$q = "SELECT count(*) as cnt, user_id FROM ut_access "
.($a_searchTermsCondition != "" ? $a_searchTermsCondition : " WHERE ")
.$a_condition
.$a_objectCondition
." GROUP BY user_id";
$cnt_set = $ilDB->query($q);
$acc = array();
while ($cnt_rec = $cnt_set->fetchRow(DB_FETCHMODE_ASSOC))
{
$name = ilObjUser::_lookupName($cnt_rec["user_id"]);
if ($cnt_rec["user_id"] != 0)
{
$acc[] = array("user_id" => $cnt_rec["user_id"],
"name" => $name["lastname"].", ".$name["firstname"],
"cnt" => $cnt_rec["cnt"]);
}
}
return $acc;
}

+ Here is the call graph for this function:

ilObjUserTracking::getActivationStatus ( )

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

Referenced by updateSettings().

{
return $this->status;
}

+ Here is the caller graph for this function:

ilObjUserTracking::getDuration (   $a_obj_id)

Definition at line 356 of file class.ilObjUserTracking.php.

References $data, $ilDB, $query, and $res.

Referenced by getAccessTotalPerObj().

{
global $ilDB;
$query = sprintf('SELECT AVG(spent_seconds) FROM read_event '.
'WHERE obj_id = %s '.
'GROUP BY obj_id ',
$ilDB->quote($a_obj_id,'integer'));
$res = $ilDB->query($query);
$data = $ilDB->fetchAssoc($res);
return $data["spent_seconds"];
}

+ Here is the caller graph for this function:

ilObjUserTracking::getMonthTotalOverview ( )

get total number of accesses per month

Definition at line 264 of file class.ilObjUserTracking.php.

References $ilDB, and DB_FETCHMODE_ASSOC.

{
global $ilDB;
$q = "SELECT count(*) as cnt, count(distinct user_id) as user_cnt, ut_month FROM ut_access".
" GROUP BY ut_month ORDER BY ut_month DESC";
$min_set = $ilDB->query($q);
$months = array();
while ($min_rec = $min_set->fetchRow(DB_FETCHMODE_ASSOC))
{
$months[] = array("month" => $min_rec["ut_month"],
"cnt" => $min_rec["cnt"], "user_cnt" => $min_rec["user_cnt"]);
}
return $months;
}
ilObjUserTracking::getObjId (   $title,
  $type 
)

get obj_id of some object

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

References ilObject\$id, $ilDB, ilObject\$title, ilObject\$type, and DB_FETCHMODE_ASSOC.

{
global $ilDB;
$q ="SELECT obj_id FROM object_data WHERE type = ".$ilDB->quote($type ,'text')." and title=".$ilDB->quote($title ,'text');
$id = $ilDB->query($q);
$obj_id = $id->fetchRow(DB_FETCHMODE_ASSOC);
return $obj_id["obj_id"];
}
ilObjUserTracking::getOwnerName (   $id)

Return the owner name of the object.

Definition at line 519 of file class.ilObjUserTracking.php.

References ilObject\$id, $ilDB, $res, and $result.

{
global $ilDB;
$q =" select A.login from usr_data A, object_data B where A.usr_id=B.owner and B.obj_id = ".$ilDB->quote($id ,'integer');
$res = $this->ilias->db->query($q);
$result = $res->fetchRow();
return $result[0];
}
ilObjUserTracking::getRecordsTotal ( )

get total number of tracking records

Definition at line 249 of file class.ilObjUserTracking.php.

References $ilDB, and DB_FETCHMODE_ASSOC.

{
global $ilDB;
$q = "SELECT count(*) AS cnt FROM ut_access";
$cnt_set = $ilDB->query($q);
$cnt_rec = $cnt_set->fetchRow(DB_FETCHMODE_ASSOC);
return $cnt_rec["cnt"];
}
ilObjUserTracking::getTestId (   $id)

get Test_id of some test

Definition at line 490 of file class.ilObjUserTracking.php.

References ilObject\$id, $ilDB, $res, and $result.

{
$q = "select obj_id from object_data "
." where type = 'tst' and "
." owner = ".$ilDB->quote($id ,'integer');
$res = $this->ilias->db->query($q);
for ($i=0;$i<$res->numRows();$i++)
{
$result[$i]=$res->fetchRow();
}
return $result;
}
ilObjUserTracking::getTotalOlderThanMonth (   $a_month)

get total number of records older than given month (YYYY-MM)

Definition at line 283 of file class.ilObjUserTracking.php.

References $ilDB, DB_FETCHMODE_ASSOC, and increaseMonth().

{
global $ilDB;
$q = "SELECT count(*) as cnt, count(ut_month) as d FROM ut_access WHERE acc_time <= ".
$ilDB->quote($this->increaseMonth($a_month)."-01", "timestamp");
$cnt_set = $ilDB->query($q);
$cnt_rec = $cnt_set->fetchRow(DB_FETCHMODE_ASSOC);
//echo "cnt:".$cnt_rec["cnt"].":date:".$cnt_rec["d"].":";
return $cnt_rec["cnt"];
}

+ Here is the call graph for this function:

ilObjUserTracking::getValidTimeSpan ( )

Definition at line 153 of file class.ilObjUserTracking.php.

Referenced by updateSettings(), and validateSettings().

{
return (int) $this->valid_time;
}

+ Here is the caller graph for this function:

ilObjUserTracking::hasExtendedData (   $a_code)

Definition at line 579 of file class.ilObjUserTracking.php.

{
return $this->extended_data & $a_code;
}
ilObjUserTracking::ilObjUserTracking (   $a_id = 0,
  $a_call_by_reference = true 
)

Constructor public.

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

Definition at line 47 of file class.ilObjUserTracking.php.

References __readSettings(), and ilObject\ilObject().

{
$this->type = "trac";
$this->ilObject($a_id,$a_call_by_reference);
define("DEFAULT_TIME_SPAN",60*5);
$this->__readSettings();
}

+ Here is the call graph for this function:

ilObjUserTracking::increaseMonth (   $a_month)

Increase Month string ("YYYY-MM") by one month.

Parameters
stringmonth string
Returns
string month string increase by one mont

Definition at line 421 of file class.ilObjUserTracking.php.

Referenced by deleteTrackingDataBeforeMonth(), and getTotalOlderThanMonth().

{
$year = (int) substr($a_month, 0, 4);
$month = (int) substr($a_month, 5);
$month += 1;
if ($month == 13)
{
$year += 1;
$month = 1;
}
return $year."-".str_pad($month, 2, "0", STR_PAD_LEFT);
}

+ Here is the caller graph for this function:

ilObjUserTracking::isChangeEventTrackingEnabled ( )

Gets the changeEventTrackingEnabled property.

Returns
boolean value

Definition at line 181 of file class.ilObjUserTracking.php.

References $is_change_event_tracking_enabled.

ilObjUserTracking::isObjectStatisticsEnabled ( )

Gets the object statistic property.

Returns
boolean value

Definition at line 202 of file class.ilObjUserTracking.php.

{
return $this->object_statistics_enabled;
}
ilObjUserTracking::setActivationStatus (   $a_status)

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

{
$this->status = $a_status;
}
ilObjUserTracking::setChangeEventTrackingEnabled (   $newValue)

Sets the changeEventTrackingEnabled property.

Parameters
booleannew value
Returns
void

Definition at line 172 of file class.ilObjUserTracking.php.

{
$this->is_change_event_tracking_enabled = $newValue;
}
ilObjUserTracking::setExtendedData (   $a_value)

Definition at line 574 of file class.ilObjUserTracking.php.

Referenced by __readSettings().

{
$this->extended_data = $a_value;
}

+ Here is the caller graph for this function:

ilObjUserTracking::setObjectStatisticsEnabled (   $newValue)

Sets the object statistics property.

Parameters
booleannew value
Returns
void

Definition at line 193 of file class.ilObjUserTracking.php.

Referenced by __readSettings().

{
$this->object_statistics_enabled = (bool)$newValue;
}

+ Here is the caller graph for this function:

ilObjUserTracking::setValidTimeSpan (   $a_time_span)

Definition at line 146 of file class.ilObjUserTracking.php.

Referenced by __readSettings().

{
$this->valid_time = (int) $a_time_span;
return true;
}

+ Here is the caller graph for this function:

ilObjUserTracking::updateSettings ( )

Definition at line 207 of file class.ilObjUserTracking.php.

References ilObject\$ilias, ilChangeEvent\_activate(), ilChangeEvent\_deactivate(), ilChangeEvent\_isActive(), enabledUserRelatedData(), getActivationStatus(), and getValidTimeSpan().

{
global $ilias;
$ilias->setSetting("enable_tracking",$this->getActivationStatus());
$ilias->setSetting("save_user_related_data",$this->enabledUserRelatedData() ? 1 : 0);
$ilias->setSetting("tracking_time_span",$this->getValidTimeSpan());
$ilias->setSetting("lp_extended_data", $this->extended_data);
$ilias->setSetting("object_statistics", $this->object_statistics_enabled);
// BEGIN ChangeEvent
require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
if ($this->is_change_event_tracking_enabled != ilChangeEvent::_isActive())
{
if ($this->is_change_event_tracking_enabled)
{
}
else
{
}
}
// END ChangeEvent
return true;
}

+ Here is the call graph for this function:

ilObjUserTracking::validateSettings ( )

Definition at line 235 of file class.ilObjUserTracking.php.

References getValidTimeSpan().

{
if(!is_numeric($time = $this->getValidTimeSpan()) or
$time < 1 or
$time > 9999)
{
return false;
}
return true;
}

+ Here is the call graph for this function:

Field Documentation

ilObjUserTracking::$extended_data = null

Definition at line 27 of file class.ilObjUserTracking.php.

ilObjUserTracking::$is_change_event_tracking_enabled = null
private

This variable holds the enabled state of the change event tracking.

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

Referenced by isChangeEventTrackingEnabled().

ilObjUserTracking::$valid_time_span = null

Definition at line 26 of file class.ilObjUserTracking.php.


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