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 rc WHERE rc.id = ".$ilDB->quote($this->
getId(),
"integer").
" ORDER BY rc.id";
86 $set = $ilDB->query(
$query);
87 $rec = $ilDB->fetchAssoc($set);
107 throw new ilException(
"The field does not have a related table!");
110 $id = $ilDB->nextId(
"il_dcl_record");
112 $query =
"INSERT INTO il_dcl_record (
120 $ilDB->quote($this->
getId(),
"integer").
",".
121 $ilDB->quote($this->
getTableId(),
"integer").
",".
124 $ilDB->quote($this->
getOwner(),
"integer").
",".
127 $ilDB->manipulate(
$query);
129 include_once
"./Modules/DataCollection/classes/class.ilObjDataCollection.php";
138 $this->recordfields[$field_id]->delete();
139 if(count($this->recordfields) == 1)
170 $this->table_id = $a_id;
190 $this->create_date = $a_datetime;
200 return $this->create_date;
210 $this->last_update = $a_datetime;
220 return $this->last_update;
230 $this->owner = $a_id;
277 $this->recordfields[$field_id]->setValue($value);
290 foreach($this->recordfields as
$id => $record_field)
292 $return[
$id] = $record_field->getValue();
295 return (array) $return;
314 return $this->recordfields[$field_id]->getValue();
335 return $this->recordfields[$field_id]->getExportValue();
359 if(!$this->recordfields[$field_id]){
363 return $this->recordfields[$field_id]->getHTML($options);
383 return $this->recordfields[$field_id]->getSingleHTML($options);
404 return $this->recordfields[$field_id]->getFormInput();
424 $this->$field_id = $value;
443 return $usr_data[
'login'];
447 return $this->$field_id;
470 return $this->$field_id;
479 if($this->recordfields == NULL)
483 foreach($this->table->getRecordFields() as $field)
500 include_once(
"class.ilDataCollectionTable.php");
502 if($this->table == NULL)
515 return $this->recordfields[$field_id];
527 foreach($this->recordfields as $recordfield)
533 $this->
deleteMob($recordfield->getValue());
536 $recordfield->delete();
540 $query =
"DELETE FROM il_dcl_record WHERE id = ".$ilDB->quote($this->
getId(),
"integer");
541 $ilDB->manipulate(
$query);
543 include_once
"./Modules/DataCollection/classes/class.ilObjDataCollection.php";
577 foreach($this->table->getFields() as $field)
593 return $this->
getTable()->hasPermissionToEditRecord($ref, $this);
601 return $this->
getTable()->hasPermissionToDeleteRecord($ref, $this);