32 include_once
'class.ilMDBase.php';
33 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDRequirement.php';
47 $this->or_composite_id = (int) $a_or_composite_id;
53 if(!$this->or_composite_id)
55 $query =
"SELECT MAX(or_composite_id) AS orc FROM il_meta_requirement ".
56 "WHERE rbac_id = ".$ilDB->quote($this->
getRBACId()).
" ".
57 "AND obj_id = ".$ilDB->quote($this->
getObjId()).
" ".
58 "GROUP BY or_composite_id";
63 $this->or_composite_id =
$row->orc;
65 ++$this->or_composite_id;
67 return $this->or_composite_id;
72 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDRequirement.php';
83 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDRequirement.php';
85 if(!$a_requirement_id)
90 $req->setMetaId($a_requirement_id);
97 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDRequirement.php';
101 $req->setParentType(
'meta_technical');
113 echo
'Use ilMDOrcomposite::addRequirement()';
134 $writer->xmlStartTag(
'OrComposite');
139 $req->toXML($writer);
141 $writer->xmlEndTag(
'OrComposite');
147 function _getIds($a_rbac_id,$a_obj_id,$a_parent_id,$a_parent_type)
151 $query =
"SELECT DISTINCT(or_composite_id) AS or_composite_id FROM il_meta_requirement ".
152 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id).
" ".
153 "AND obj_id = ".$ilDB->quote($a_obj_id).
" ".
154 "AND parent_id = ".$ilDB->quote($a_parent_id).
" ".
155 "AND parent_type = ".$ilDB->quote($a_parent_type).
" ".
156 "AND or_composite_id > 0 ";
161 $ids[] =
$row->or_composite_id;
163 return $ids ? $ids : array();