24 require_once
"./classes/class.ilObject.php";
35 public static $purposes = array (
"Standard",
"VideoPortable",
"AudioPortable");
55 $this->
ilObject($a_id,$a_call_by_reference);
67 $this->online = $a_online;
87 $this->publicfiles = $a_publicfiles;
107 $this->itemsarray = $a_itemsarray;
117 return $this->itemsarray;
127 $this->downloadable = $a_downloadable;
154 $this->defaultAccess = (int) $value == 0 ? 0 : 1;
165 require_once(
"./Modules/MediaCast/classes/class.ilObjMediaCastAccess.php");
178 $query =
"INSERT INTO il_media_cast_data (".
185 $ilDB->quote($this->
getId(),
"integer")
186 .
",".$ilDB->quote((
int) $this->
getOnline(),
"integer")
191 $ilDB->manipulate(
$query);
205 if (!parent::update())
211 $query =
"UPDATE il_media_cast_data SET ".
212 " is_online = ".$ilDB->quote((
int) $this->
getOnline(),
"integer").
213 ", public_files = ".$ilDB->quote((
int) $this->
getPublicFiles(),
"integer").
214 ", downloadable = ".$ilDB->quote((
int) $this->
getDownloadable(),
"integer").
216 " WHERE id = ".$ilDB->quote((
int) $this->
getId(),
"integer");
218 $ilDB->manipulate(
$query);
233 $query =
"SELECT * FROM il_media_cast_data WHERE id = ".
234 $ilDB->quote($this->
getId(),
"integer");
235 $set = $ilDB->query(
$query);
236 $rec = $ilDB->fetchAssoc($set);
257 if (!parent::delete())
264 foreach ($med_items as $item)
266 include_once(
"./Services/News/classes/class.ilNewsItem.php");
268 $news_item->delete();
272 $query =
"DELETE FROM il_media_cast_data".
273 " WHERE id = ".$ilDB->quote($this->
getId(),
"integer");
274 $ilDB->manipulate(
$query);
302 return $roles ? $roles : array();
318 function notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params = 0)
358 if ($a_node_id==
$_GET[
"ref_id"])
360 $parent_obj =& $this->ilias->obj_factory->getInstanceByRefId($a_node_id);
361 $parent_type = $parent_obj->getType();
362 if($parent_type == $this->
getType())
364 $a_node_id = (int) $tree->getParentId($a_node_id);
368 parent::notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params);
379 include_once(
"./Services/News/classes/class.ilNewsItem.php");
381 $it->setContextObjId($this->
getId());
382 $it->setContextObjType($this->
getType());
383 $this->itemsarray = $it->queryNewsForContext(
false, 0,
"",
false, $a_oldest_first);
385 return $this->itemsarray;