4 require_once
'./Modules/DataCollection/exceptions/class.ilDataCollectionInputException.php';
5 require_once
'./Modules/DataCollection/classes/class.ilDataCollectionILIASRefField.php';
6 require_once
'./Modules/DataCollection/classes/class.ilDataCollectionReferenceField.php';
7 require_once
'./Modules/DataCollection/classes/class.ilDataCollectionNReferenceField.php';
8 require_once
'class.ilDataCollectionRatingField.php';
45 $query =
"SELECT * FROM il_dcl_record_field WHERE field_id = ".$ilDB->quote($this->field->getId(),
"integer").
" AND record_id = ".$ilDB->quote($this->record->getId(),
"integer");
46 $set = $ilDB->query(
$query);
47 $rec = $ilDB->fetchAssoc($set);
48 $this->
id = $rec[
'id'];
64 $id = $ilDB->nextId(
"il_dcl_record_field");
65 $query =
"INSERT INTO il_dcl_record_field (id, record_id, field_id) VALUES (".$ilDB->quote(
$id,
"integer").
", ".$ilDB->quote($this->record->getId(),
"integer").
", ".$ilDB->quote($this->field->getId(),
"text").
")";
78 $datatype = $this->field->getDatatype();
80 $query =
"DELETE FROM il_dcl_stloc".$datatype->getStorageLocation().
"_value WHERE record_field_id = ".$ilDB->quote($this->
id,
"integer");
82 $next_id = $ilDB->nextId(
"il_dcl_stloc".$datatype->getStorageLocation().
"_value");
84 $ilDB->insert(
"il_dcl_stloc".$datatype->getStorageLocation().
"_value",
85 array(
"value" => array($datatype->getDbType(),
$this->value),
86 "record_field_id " => array(
"integer", $this->
id),
87 "id" => array(
"integer", $next_id))
94 public function delete()
98 $datatype = $this->field->getDatatype();
99 $query =
"DELETE FROM il_dcl_stloc".$datatype->getStorageLocation().
"_value WHERE record_field_id = ".$ilDB->quote($this->
id,
"integer");
100 $ilDB->manipulate(
$query);
102 $query2 =
"DELETE FROM il_dcl_record_field WHERE id = ".$ilDB->quote($this->
id,
"integer");
103 $ilDB->manipulate($query2);
121 $type = $this->field->getDatatype()->getId();
123 $tmp = $this->field->getDatatype()->parseValue(
$value, $this);
134 $this->record->deleteFile($old);
144 $datatype = $this->field->getDatatype();
146 return $datatype->parseFormInput($this->
getValue(), $this);
154 $datatype = $this->field->getDatatype();
156 return $datatype->parseExportValue($this->
getValue());
171 $datatype = $this->field->getDatatype();
172 return $datatype->parseHTML($this->
getValue(), $this);
188 if($this->value === NULL)
191 $datatype = $this->field->getDatatype();
192 $query =
"SELECT * FROM il_dcl_stloc".$datatype->getStorageLocation().
"_value WHERE record_field_id = ".$ilDB->quote($this->
id,
"integer");
193 $set = $ilDB->query(
$query);
194 $rec = $ilDB->fetchAssoc($set);
195 $this->value = $rec[
'value'];
Class ilDataCollectionRecord.
__construct(ilDataCollectionRecord $record, ilDataCollectionField $field)
getSingleHTML($link=null)
this funciton is used to in the viewdefinition of a single record.
Class ilDataCollectionField.
Class ilDataCollectionField.