ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjectCustomUserFieldHistory Class Reference

Editing history for object custom user fields. More...

+ Collaboration diagram for ilObjectCustomUserFieldHistory:

Public Member Functions

 __construct ($a_obj_id, $a_user_id)
 Constructor.
 setUpdateUser ($a_id)
 Set update user.
 getUpdateUser ()
 get update user
 setEditingTime (ilDateTime $dt)
 Set editing time.
 getEditingTime ()
 Get editing time.
 save ()
 Save entry.
 delete ()
 Delete one entry.

Static Public Member Functions

static lookupEntriesByObjectId ($a_obj_id)
 Get entries by obj_id type $ilDB.

Protected Member Functions

 read ()
 read entry type $ilDB

Private Attributes

 $obj_id = 0
 $user_id = 0
 $update_user = 0
 $editing_time = null

Detailed Description

Editing history for object custom user fields.

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 11 of file class.ilObjectCustomUserFieldHistory.php.

Constructor & Destructor Documentation

ilObjectCustomUserFieldHistory::__construct (   $a_obj_id,
  $a_user_id 
)

Constructor.

Parameters
type$a_obj_id
type$a_user_id

Definition at line 23 of file class.ilObjectCustomUserFieldHistory.php.

References read().

{
$this->obj_id = $a_obj_id;
$this->user_id = $a_user_id;
$this->read();
}

+ Here is the call graph for this function:

Member Function Documentation

ilObjectCustomUserFieldHistory::delete ( )

Delete one entry.

Definition at line 111 of file class.ilObjectCustomUserFieldHistory.php.

References $ilDB, and $query.

{
global $ilDB;
$query = 'DELETE FROM obj_user_data_hist '.
'WHERE obj_id = '.$ilDB->quote($this->obj_id,'integer').' '.
'AND usr_id = '.$ilDB->quote($this->user_id,'integer');
$ilDB->manipulate($query);
}
ilObjectCustomUserFieldHistory::getEditingTime ( )

Get editing time.

Returns
ilDateTime

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

References $editing_time.

Referenced by save().

{
}

+ Here is the caller graph for this function:

ilObjectCustomUserFieldHistory::getUpdateUser ( )

get update user

Returns
type

Definition at line 66 of file class.ilObjectCustomUserFieldHistory.php.

References $update_user.

Referenced by save().

{
}

+ Here is the caller graph for this function:

static ilObjectCustomUserFieldHistory::lookupEntriesByObjectId (   $a_obj_id)
static

Get entries by obj_id type $ilDB.

Parameters
type$a_obj_id
Returns

Definition at line 36 of file class.ilObjectCustomUserFieldHistory.php.

References $ilDB, $query, $res, $row, DB_FETCHMODE_OBJECT, IL_CAL_DATETIME, and ilTimeZone\UTC.

Referenced by ilGroupParticipantsTableGUI\parse(), ilCourseParticipantsTableGUI\parse(), ilSubscriberTableGUI\readSubscriberData(), and ilWaitingListTableGUI\readUserData().

{
global $ilDB;
$query = 'SELECT * FROM obj_user_data_hist '.
'WHERE obj_id = '.$ilDB->quote($a_obj_id,'integer');
$res = $ilDB->query($query);
$users = array();
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$users[$row->usr_id]['update_user'] = $row->update_user;
$users[$row->usr_id]['editing_time'] = new ilDateTime($row->editing_time,IL_CAL_DATETIME, ilTimeZone::UTC);
}
return $users;
}

+ Here is the caller graph for this function:

ilObjectCustomUserFieldHistory::read ( )
protected

read entry type $ilDB

Definition at line 125 of file class.ilObjectCustomUserFieldHistory.php.

References $ilDB, $query, $res, $row, DB_FETCHMODE_OBJECT, IL_CAL_DATETIME, setEditingTime(), setUpdateUser(), and ilTimeZone\UTC.

Referenced by __construct().

{
global $ilDB;
$query = 'SELECT * FROM obj_user_data_hist '.
'WHERE obj_id = '.$ilDB->quote($this->obj_id,'integer').' '.
'AND usr_id = '.$ilDB->quote($this->user_id,'integer');
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$this->setUpdateUser($row->update_user);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjectCustomUserFieldHistory::save ( )

Save entry.

Definition at line 92 of file class.ilObjectCustomUserFieldHistory.php.

References $ilDB, $query, getEditingTime(), getUpdateUser(), IL_CAL_DATETIME, and ilTimeZone\UTC.

{
global $ilDB;
$this->delete();
$query = 'INSERT INTO obj_user_data_hist (obj_id, usr_id, update_user, editing_time) '.
'VALUES( '.
$ilDB->quote($this->obj_id,'integer').', '.
$ilDB->quote($this->user_id,'integer').', '.
$ilDB->quote($this->getUpdateUser(),'integer').', '.
$ilDB->quote($this->getEditingTime()->get(IL_CAL_DATETIME,'', ilTimeZone::UTC)).' '.
')';
$ilDB->manipulate($query);
}

+ Here is the call graph for this function:

ilObjectCustomUserFieldHistory::setEditingTime ( ilDateTime  $dt)

Set editing time.

Parameters
ilDateTime$dt

Definition at line 75 of file class.ilObjectCustomUserFieldHistory.php.

Referenced by read().

{
$this->editing_time = $dt;
}

+ Here is the caller graph for this function:

ilObjectCustomUserFieldHistory::setUpdateUser (   $a_id)

Set update user.

Parameters
int$a_id

Definition at line 57 of file class.ilObjectCustomUserFieldHistory.php.

Referenced by read(), and ilMemberAgreementGUI\save().

{
$this->update_user = $a_id;
}

+ Here is the caller graph for this function:

Field Documentation

ilObjectCustomUserFieldHistory::$editing_time = null
private

Definition at line 16 of file class.ilObjectCustomUserFieldHistory.php.

Referenced by getEditingTime().

ilObjectCustomUserFieldHistory::$obj_id = 0
private

Definition at line 13 of file class.ilObjectCustomUserFieldHistory.php.

ilObjectCustomUserFieldHistory::$update_user = 0
private

Definition at line 15 of file class.ilObjectCustomUserFieldHistory.php.

Referenced by getUpdateUser().

ilObjectCustomUserFieldHistory::$user_id = 0
private

Definition at line 14 of file class.ilObjectCustomUserFieldHistory.php.


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