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';
8 require_once(
'./Services/Object/classes/class.ilCommonActionDispatcherGUI.php');
9 require_once(
'./Modules/DataCollection/classes/class.ilObjDataCollection.php');
10 require_once(
'class.ilDataCollectionTable.php');
11 require_once(
'./Services/Notes/classes/class.ilNote.php');
12 require_once(
'./Services/Notes/classes/class.ilNoteGUI.php');
85 $ilDB->update(
"il_dcl_record", array(
90 "last_update" => array(
98 "last_edit_by" => array(
110 $recordfield->doUpdate();
123 $query =
"Select * From il_dcl_record WHERE id = " . $ilDB->quote($this->
getId(),
"integer") .
" ORDER BY id";
125 $set = $ilDB->query(
$query);
126 $rec = $ilDB->fetchAssoc($set);
143 throw new ilException(
"The field does not have a related table!");
146 $id = $ilDB->nextId(
"il_dcl_record");
148 $query =
"INSERT INTO il_dcl_record ( 155 ) VALUES (" . $ilDB->quote($this->
getId(),
"integer") .
"," . $ilDB->quote($this->
getTableId(),
"integer") .
"," 157 . $ilDB->quote($this->
getOwner(),
"integer") .
"," . $ilDB->quote($this->
getLastEditBy(),
"integer") .
" 159 $ilDB->manipulate(
$query);
168 $this->recordfields[$field_id]->delete();
169 if (count($this->recordfields) == 1) {
201 $this->table_id = $a_id;
221 $this->create_date = $a_datetime;
241 $this->last_update = $a_datetime;
261 $this->owner = $a_id;
303 $this->recordfields[$field_id]->setValue($value);
315 foreach ($this->recordfields as
$id => $record_field) {
316 $return[
$id] = $record_field->getValue();
331 if ($field_id === NULL) {
338 return $this->recordfields[$field_id]->getValue();
355 return $this->recordfields[$field_id]->getExportValue();
371 if (is_object($this->recordfields[$field_id])) {
372 $html = $this->recordfields[$field_id]->getHTML();
398 if (is_object($this->recordfields[$field_id])) {
399 $sort = $this->recordfields[$field_id]->getSortingValue();
415 public function getRecordFieldSingleHTML($field_id, array
$options = array()) {
421 $field = $this->recordfields[$field_id];
425 $html = $field->getSingleHTML(
$options,
false);
446 return $this->recordfields[$field_id]->getFormInput();
462 $this->$field_id = $value;
479 return $usr_data[
'login'];
483 return $this->$field_id;
496 return $this->
getId();
508 ->getId(),
'dcl', $this->
getId());
511 return "<a class='dcl_comment' href='#' onclick=\"return " . $ajax_link .
"\"> 513 .
"' alt='{$nComments} Comments'><span class='ilHActProp'>{$nComments}</span></a>";
522 if ($this->recordfields == NULL) {
525 foreach ($this->table->getRecordFields() as $field) {
540 if ($this->table == NULL) {
554 return $this->recordfields[$field_id];
565 foreach ($this->recordfields as $recordfield) {
571 $this->
deleteMob($recordfield->getValue());
574 $recordfield->delete();
577 $query =
"DELETE FROM il_dcl_record WHERE id = " . $ilDB->quote($this->
getId(),
"integer");
578 $ilDB->manipulate(
$query);
639 foreach ($this->table->getFilterableFields() as $field) {
640 if (! isset($filter[
"filter_" . $field->getId()]) || ! $filter[
"filter_" . $field->getId()]) {
708 if ($this->comments === NULL) {
static _lookupName($a_user_id)
lookup user name
getComments()
Get all comments of this record.
static _isStandardField($field_id)
getListCommentsJSCall($a_hash, $a_update_code=null)
Get list comments js call.
Base class for ILIAS Exception handling.
static passThroughFilter(ilDataCollectionRecord $record, ilDataCollectionField $field, $filter)
deleteFile($obj_id)
Delete a file.
static _tableExists($table_id)
getStandardFieldHTML($field_id, array $options=array())
setOwner($a_id)
Set Owner.
getTableId()
Get Table ID.
setTableId($a_id)
Set Table ID.
getRecordFieldExportValue($field_id)
Get Field Export Value.
getRecordFieldHTML($field_id, array $options=array())
_getNotesOfObject($a_rep_obj_id, $a_obj_id, $a_obj_type, $a_type=IL_NOTE_PRIVATE, $a_incl_sub=false, $a_filter="", $a_all_public="y", $a_repository_mode=true, $a_sort_ascending=false)
get all notes related to a specific object
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:
Class ilDataCollectionRecord.
static getRecordFieldCache($record, $field)
setRecordFieldValue($field_id, $value)
Set a field value.
setId($a_id)
Set field id.
if(!is_array($argv)) $options
static buildAjaxHash($a_node_type, $a_node_id, $a_obj_type, $a_obj_id, $a_sub_type=null, $a_sub_id=null)
Build ajax hash.
getRecordField($field_id)
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
getCreateDate()
Get Creation Date.
hasPermissionToEdit($ref_id)
static formatDate(ilDateTime $date)
Format a date public.
setStandardField($field_id, $value)
getRecordFieldFormInput($field_id)
getRecordFieldSortingValue($field_id, array $options=array())
getLastUpdate()
Get Last Update Date.
setLastEditBy($last_edit_by)
getStandardField($field_id)
loadRecordFields()
Load record fields.
setCreateDate($a_datetime)
Set Creation Date.
static sendNotification($a_action, $a_table_id, $a_record_id=NULL)
static _exists($a_id, $a_reference=false)
hasPermissionToDelete($ref_id)
hasPermissionToView($ref_id)
setLastUpdate($a_datetime)
Set Last Update Date.
static getTableCache($table_id=0)
deleteMob($obj_id)
Delete MOB.
getRecordFieldValue($field_id)
Get Field Value.
passThroughFilter(array $filter)