32 include_once
'class.ilMDBase.php';
33 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDRequirement.php';
40 $this->or_composite_id = (int) $a_or_composite_id;
46 if (!$this->or_composite_id) {
47 $query =
"SELECT MAX(or_composite_id) AS orc FROM il_meta_requirement " .
48 "WHERE rbac_id = " . $ilDB->quote($this->
getRBACId()) .
" " .
49 "AND obj_id = " . $ilDB->quote($this->
getObjId()) .
" " .
50 "GROUP BY or_composite_id";
54 $this->or_composite_id =
$row->orc;
56 ++$this->or_composite_id;
58 return $this->or_composite_id;
63 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDRequirement.php';
76 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDRequirement.php';
78 if (!$a_requirement_id) {
82 $req->setMetaId($a_requirement_id);
89 include_once
'Services/Migration/DBUpdate_426/classes/class.ilMDRequirement.php';
93 $req->setParentType(
'meta_technical');
105 echo 'Use ilMDOrcomposite::addRequirement()';
108 public function delete()
125 $writer->xmlStartTag(
'OrComposite');
129 $req->toXML($writer);
131 $writer->xmlEndTag(
'OrComposite');
136 public function _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
140 $query =
"SELECT DISTINCT(or_composite_id) AS or_composite_id FROM il_meta_requirement " .
141 "WHERE rbac_id = " . $ilDB->quote($a_rbac_id) .
" " .
142 "AND obj_id = " . $ilDB->quote($a_obj_id) .
" " .
143 "AND parent_id = " . $ilDB->quote($a_parent_id) .
" " .
144 "AND parent_type = " . $ilDB->quote($a_parent_type) .
" " .
145 "AND or_composite_id > 0 ";
149 $ids[] =
$row->or_composite_id;
151 return $ids ? $ids : array();
setOrCompositeId($a_or_composite_id)
if(!array_key_exists('StateId', $_REQUEST)) $id
& getRequirement($a_requirement_id)
foreach($_POST as $key=> $value) $res
_getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type, $a_or_composite_id=0)