4 require_once
'./Modules/DataCollection/classes/class.ilDataCollectionRecordField.php';
5 require_once
'./Modules/DataCollection/classes/class.ilDataCollectionDatatype.php';
6 require_once
'./Services/Exceptions/classes/class.ilException.php';
7 require_once
'./Services/User/classes/class.ilUserUtil.php';
58 $ilDB->update(
"il_dcl_record", array(
59 "table_id" => array(
"integer", $this->
getTableId()),
61 "owner" => array(
"text", $this->
getOwner()),
64 "id" => array(
"integer", $this->
id)
69 $recordfield->doUpdate();
72 include_once
"./Modules/DataCollection/classes/class.ilObjDataCollection.php";
83 $query =
"Select * From il_dcl_record WHERE id = ".$ilDB->quote($this->
getId(),
"integer").
" ORDER BY id";
85 $set = $ilDB->query(
$query);
86 $rec = $ilDB->fetchAssoc($set);
106 throw new ilException(
"The field does not have a related table!");
109 $id = $ilDB->nextId(
"il_dcl_record");
111 $query =
"INSERT INTO il_dcl_record ( 119 $ilDB->quote($this->
getId(),
"integer").
",".
120 $ilDB->quote($this->
getTableId(),
"integer").
",".
123 $ilDB->quote($this->
getOwner(),
"integer").
",".
126 $ilDB->manipulate(
$query);
128 include_once
"./Modules/DataCollection/classes/class.ilObjDataCollection.php";
137 $this->recordfields[$field_id]->delete();
138 if(count($this->recordfields) == 1)
169 $this->table_id = $a_id;
189 $this->create_date = $a_datetime;
199 return $this->create_date;
209 $this->last_update = $a_datetime;
219 return $this->last_update;
229 $this->owner = $a_id;
276 $this->recordfields[$field_id]->setValue($value);
289 foreach($this->recordfields as
$id => $record_field)
291 $return[
$id] = $record_field->getValue();
294 return (array) $return;
313 return $this->recordfields[$field_id]->getValue();
334 return $this->recordfields[$field_id]->getExportValue();
360 $html = $this->recordfields[$field_id]->getHTML(
$options);
364 $html = str_ireplace(
"{",
"{", $html);
365 $html = str_ireplace(
"}",
"}", $html);
387 return $this->recordfields[$field_id]->getSingleHTML(
$options);
408 return $this->recordfields[$field_id]->getFormInput();
428 $this->$field_id = $value;
447 return $usr_data[
'login'];
451 return $this->$field_id;
474 return $this->$field_id;
483 if($this->recordfields == NULL)
487 foreach($this->table->getRecordFields() as $field)
504 include_once(
"class.ilDataCollectionTable.php");
506 if($this->table == NULL)
519 return $this->recordfields[$field_id];
531 foreach($this->recordfields as $recordfield)
537 $this->
deleteMob($recordfield->getValue());
540 $recordfield->delete();
544 $query =
"DELETE FROM il_dcl_record WHERE id = ".$ilDB->quote($this->
getId(),
"integer");
545 $ilDB->manipulate(
$query);
547 include_once
"./Modules/DataCollection/classes/class.ilObjDataCollection.php";
581 foreach ($this->table->getFilterableFields() as $field) {
582 if (!isset($filter[
"filter_" . $field->getId()]) || !$filter[
"filter_" . $field->getId()])
continue;
596 return $this->
getTable()->hasPermissionToEditRecord($ref, $this);
604 return $this->
getTable()->hasPermissionToDeleteRecord($ref, $this);
static _lookupName($a_user_id)
lookup user name
static _isStandardField($field_id)
Base class for ILIAS Exception handling.
static passThroughFilter(ilDataCollectionRecord $record, ilDataCollectionField $field, $filter)
static _tableExists($table_id)
setOwner($a_id)
Set Owner.
getTableId()
Get Table ID.
setTableId($a_id)
Set Table ID.
getRecordFieldExportValue($field_id)
Get Field Export Value.
getRecordFieldSingleHTML($field_id, array $options=array())
hasPermissionToDelete($ref)
getRecordFieldHTML($field_id, array $options=array())
getStandardFieldHTML($field_id)
static getNamePresentation($a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true)
Default behaviour is:
doCreate()
Create new record.
Class ilDataCollectionRecord.
static getRecordFieldCache($record, $field)
setRecordFieldValue($field_id, $value)
Set Field Value.
setId($a_id)
Set field id.
if(!is_array($argv)) $options
getRecordField($field_id)
getCreateDate()
Get Creation Date.
hasPermissionToEdit($ref)
static formatDate(ilDateTime $date)
Format a date public.
setStandardField($field_id, $value)
getRecordFieldFormInput($field_id)
getRecordFieldValues()
getRecordFieldValues
getLastUpdate()
Get Last Update Date.
setLastEditBy($last_edit_by)
getStandardField($field_id)
setCreateDate($a_datetime)
Set Creation Date.
static sendNotification($a_action, $a_table_id, $a_record_id=NULL)
__construct($a_id=0)
Constructor public.
static _exists($a_id, $a_reference=false)
setLastUpdate($a_datetime)
Set Last Update Date.
static getTableCache($table_id=0)
getRecordFieldValue($field_id)
Get Field Value.
passThroughFilter(array $filter)