4require_once
'./Modules/DataCollection/classes/class.ilDataCollectionRecordField.php';
5require_once
'./Modules/DataCollection/classes/class.ilDataCollectionDatatype.php';
6require_once
'./Services/Exceptions/classes/class.ilException.php';
7require_once
'./Services/User/classes/class.ilUserUtil.php';
8require_once(
'./Services/Object/classes/class.ilCommonActionDispatcherGUI.php');
9require_once(
'./Modules/DataCollection/classes/class.ilObjDataCollection.php');
10require_once(
'class.ilDataCollectionTable.php');
11require_once(
'./Services/Notes/classes/class.ilNote.php');
12require_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";
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 buildAjaxHash($a_node_type, $a_node_id, $a_obj_type, $a_obj_id, $a_sub_type=null, $a_sub_id=null)
Build ajax hash.
static getRecordFieldCache($record, $field)
static getTableCache($table_id=0)
static passThroughFilter(ilDataCollectionRecord $record, ilDataCollectionField $field, $filter)
Class ilDataCollectionRecord.
getCreateDate()
Get Creation Date.
hasPermissionToDelete($ref_id)
hasPermissionToView($ref_id)
deleteMob($obj_id)
Delete MOB.
getRecordFieldFormInput($field_id)
getComments()
Get all comments of this record.
getRecordFieldSortingValue($field_id, array $options=array())
getRecordFieldHTML($field_id, array $options=array())
getRecordFieldExportValue($field_id)
Get Field Export Value.
getStandardFieldHTML($field_id, array $options=array())
setRecordFieldValue($field_id, $value)
Set a field value.
loadRecordFields()
Load record fields.
getRecordField($field_id)
setTableId($a_id)
Set Table ID.
passThroughFilter(array $filter)
setStandardField($field_id, $value)
getRecordFieldValue($field_id)
Get Field Value.
setOwner($a_id)
Set Owner.
setId($a_id)
Set field id.
getStandardField($field_id)
hasPermissionToEdit($ref_id)
setLastUpdate($a_datetime)
Set Last Update Date.
getLastUpdate()
Get Last Update Date.
deleteFile($obj_id)
Delete a file.
setLastEditBy($last_edit_by)
getTableId()
Get Table ID.
setCreateDate($a_datetime)
Set Creation Date.
static _isStandardField($field_id)
static _tableExists($table_id)
static formatDate(ilDateTime $date)
Format a date @access public.
@classDescription Date and time handling
Base class for ILIAS Exception handling.
getListCommentsJSCall($a_hash, $a_update_code=null)
Get list comments js call.
_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 sendNotification($a_action, $a_table_id, $a_record_id=NULL)
static _lookupName($a_user_id)
lookup user name
static _exists($a_id, $a_reference=false)
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:
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
if(!is_array($argv)) $options