32 include_once
'class.ilMDBase.php';
33 include_once
'Services/MetaData/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) orc FROM il_meta_requirement ".
56 "WHERE rbac_id = ".$ilDB->quote($this->
getRBACId() ,
'integer').
" ".
57 "AND obj_id = ".$ilDB->quote($this->
getObjId() ,
'integer').
" ";
62 $this->or_composite_id =
$row->orc;
64 ++$this->or_composite_id;
66 return $this->or_composite_id;
71 include_once
'Services/MetaData/classes/class.ilMDRequirement.php';
82 include_once
'Services/MetaData/classes/class.ilMDRequirement.php';
84 if(!$a_requirement_id)
89 $req->setMetaId($a_requirement_id);
96 include_once
'Services/MetaData/classes/class.ilMDRequirement.php';
100 $req->setParentType(
'meta_technical');
112 echo
'Use ilMDOrcomposite::addRequirement()';
133 $writer->xmlStartTag(
'OrComposite');
136 foreach($reqs as $id)
139 $req->toXML($writer);
143 include_once
'Services/MetaData/classes/class.ilMDRequirement.php';
145 $req->toXML($writer);
147 $writer->xmlEndTag(
'OrComposite');
153 function _getIds($a_rbac_id,$a_obj_id,$a_parent_id,$a_parent_type)
157 $query =
"SELECT DISTINCT(or_composite_id) or_composite_id FROM il_meta_requirement ".
158 "WHERE rbac_id = ".$ilDB->quote($a_rbac_id ,
'integer').
" ".
159 "AND obj_id = ".$ilDB->quote($a_obj_id ,
'integer').
" ".
160 "AND parent_id = ".$ilDB->quote($a_parent_id ,
'integer').
" ".
161 "AND parent_type = ".$ilDB->quote($a_parent_type ,
'text').
" ".
162 "AND or_composite_id > 0 ";
167 $ids[] =
$row->or_composite_id;
169 return $ids ? $ids : array();