19 $this->glo_id = $a_glo_id;
29 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php');
32 foreach($recs as $record_obj)
34 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php');
37 $fields[$def->getFieldId()] = array(
38 "id" => $def->getFieldId(),
39 "title" => $def->getTitle(),
40 "type" => $def->getFieldType()
60 $set = $ilDB->query(
"SELECT * FROM glo_advmd_col_order ".
61 " WHERE glo_id = ".$ilDB->quote($this->glo_id,
"integer").
65 while ($rec = $ilDB->fetchAssoc($set))
67 $order[$rec[
"field_id"]] = $rec[
"order_nr"];
71 if (!isset($order[0]))
74 "text" => $lng->txt(
"cont_term"));
80 foreach ($order as $id => $order_nr)
82 if (isset($fields[$id]))
85 "text" => $fields[$id][
"title"]);
91 "text" => $lng->txt(
"cont_term"));
96 foreach ($fields as $f)
99 "text" => $f[
"title"]);
115 $ilDB->manipulate(
"DELETE FROM glo_advmd_col_order WHERE ".
116 " glo_id = ".$ilDB->quote($this->glo_id,
"integer")
121 foreach ($a_cols as $c)
124 if (!isset($set[$c[
"id"]]))
126 $ilDB->manipulate(
"INSERT INTO glo_advmd_col_order ".
127 "(glo_id, field_id, order_nr) VALUES (".
128 $ilDB->quote($this->glo_id,
"integer").
",".
129 $ilDB->quote($c[
"id"],
"integer").
",".
130 $ilDB->quote($nr+=10,
"integer").
132 $set[$c[
"id"]] = $c[
"id"];