31 include_once
'class.ilMDBase.php';
38 $this->or_composite_id = (int) $a_or_composite_id;
42 return (
int) $this->or_composite_id;
55 $this->operating_system_name = $a_val;
64 return $this->operating_system_name;
68 $this->operating_system_minimum_version = $a_val;
72 return $this->operating_system_minimum_version;
76 $this->operating_system_maximum_version = $a_val;
80 return $this->operating_system_maximum_version;
86 case 'NetscapeCommunicator':
87 case 'MS-InternetExplorer':
91 $this->browser_name = $a_val;
100 return $this->browser_name;
104 $this->browser_minimum_version = $a_val;
108 return $this->browser_minimum_version;
112 $this->browser_maximum_version = $a_val;
116 return $this->browser_maximum_version;
123 $ilDB = $DIC[
'ilDB'];
126 $fields[
'meta_requirement_id'] = array(
'integer',$next_id =
$ilDB->nextId(
'il_meta_requirement'));
128 if ($this->db->insert(
'il_meta_requirement', $fields)) {
139 $ilDB = $DIC[
'ilDB'];
142 if ($this->db->update(
143 'il_meta_requirement',
144 $this->__getFields(),
145 array(
"meta_requirement_id" => array(
'integer',$this->
getMetaId()))
153 public function delete()
157 $ilDB = $DIC[
'ilDB'];
160 $query =
"DELETE FROM il_meta_requirement " .
161 "WHERE meta_requirement_id = " .
$ilDB->quote($this->
getMetaId(),
'integer');
171 return array(
'rbac_id' => array(
'integer',$this->
getRBACId()),
172 'obj_id' => array(
'integer',$this->
getObjId()),
173 'obj_type' => array(
'text',$this->
getObjType()),
175 'parent_id' => array(
'integer',$this->
getParentId()),
189 $ilDB = $DIC[
'ilDB'];
191 include_once
'Services/MetaData/classes/class.ilMDLanguageItem.php';
194 $query =
"SELECT * FROM il_meta_requirement " .
195 "WHERE meta_requirement_id = " .
$ilDB->quote($this->
getMetaId(),
'integer');
223 $writer->xmlStartTag(
'Requirement');
224 $writer->xmlStartTag(
'Type');
234 $writer->xmlElement(
'Browser', array(
'Name' => $this->
getBrowserName()
240 $writer->xmlEndTag(
'Type');
241 $writer->xmlEndTag(
'Requirement');
246 public static function _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type, $a_or_composite_id = 0)
250 $ilDB = $DIC[
'ilDB'];
252 $query =
"SELECT meta_requirement_id FROM il_meta_requirement " .
253 "WHERE rbac_id = " .
$ilDB->quote($a_rbac_id,
'integer') .
" " .
254 "AND obj_id = " .
$ilDB->quote($a_obj_id,
'integer') .
" " .
255 "AND parent_id = " .
$ilDB->quote($a_parent_id,
'integer') .
" " .
256 "AND parent_type = " .
$ilDB->quote($a_parent_type,
'text') .
" " .
257 "AND or_composite_id = " .
$ilDB->quote($a_or_composite_id,
'integer');
261 $ids[] =
$row->meta_requirement_id;
263 return $ids ? $ids : array();
setOperatingSystemName($a_val)
getOperatingSystemMinimumVersion()
setOperatingSystemMinimumVersion($a_val)
setOrCompositeId($a_or_composite_id)
getBrowserMaximumVersion()
setMetaId($a_meta_id, $a_read_data=true)
foreach($_POST as $key=> $value) $res
getOperatingSystemMaximumVersion()
setOperatingSystemMaximumVersion($a_val)
setParentType($a_parent_type)
getBrowserMinimumVersion()
setBrowserMaximumVersion($a_val)
setBrowserMinimumVersion($a_val)
static _getIds($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type, $a_or_composite_id=0)