5 include_once(
"./Services/COPage/classes/class.ilPageObject.php");
42 $this->
setId($a_view_id);
78 $this->table_id = $a_id;
119 $query =
"SELECT * FROM il_dcl_view WHERE table_id = ".$ilDB->quote($this->
getId(),
"integer");
120 $set = $ilDB->query(
$query);
121 $rec = $ilDB->fetchAssoc($set);
124 $this->type = $rec[
"type"];
125 $this->formtype = $rec[
"formtype"];
136 $id = $ilDB->nextId(
"il_dcl_view");
139 $query =
"INSERT INTO il_dcl_view (".
145 $ilDB->quote($this->
getId(),
"integer")
146 .
",".$ilDB->quote($this->
getTableId(),
"integer")
147 .
",".$ilDB->quote($this->
getType(),
"integer")
150 $ilDB->manipulate(
$query);
161 public function update($a_validate =
true, $a_no_history =
false)
184 if (!isset(self::$recordViewCache[$a_table_id])) {
187 $set = $ilDB->query(
"SELECT id FROM il_dcl_view".
188 " WHERE table_id = ".$ilDB->quote($a_table_id,
"integer").
" AND type = ".$ilDB->quote(0,
"integer").
" and formtype = ".$ilDB->quote(0,
"integer"));
189 $row = $ilDB->fetchAssoc($set);
190 self::$recordViewCache[$a_table_id] =
$row[
'id'];
193 return self::$recordViewCache[$a_table_id];
207 require_once(
"./Modules/DataCollection/classes/class.ilDataCollectionTable.php");
209 $fields = $objTable->getFields($a_table_id);
211 foreach($fields as $field)
216 $all[] =
"[".$field->getTitle().
"]";
219 $all[] =
'[dclrefln field="'.$field->getTitle().
'"][/dclrefln]';
223 $all[] =
'[dcliln field="'.$field->getTitle().
'"][/dcliln]';
228 $all[
"[".$field->getTitle().
"]"] = $field;
231 $all[
'[dclrefln field="'.$field->getTitle().
'"][/dclrefln]'] = $field;
235 $all[
'[dcliln field="'.$field->getTitle().
'"][/dcliln]'] = $field;