24 include_once(
"Services/Table/classes/class.ilTable2GUI.php");
45 $this->downloadable = $mediacast->getDownloadable();
48 $this->
addColumn($lng->txt(
"mcst_entry"),
"",
"33%");
69 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
72 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
75 $ilCtrl->setParameterByClass(
"ilobjmediacastgui",
"item_id", $a_set[
"id"]);
76 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
78 $this->tpl->setCurrentBlock(
"edit");
79 $this->tpl->setVariable(
"TXT_EDIT", $lng->txt(
"edit"));
80 $this->tpl->setVariable(
"CMD_EDIT",
81 $ilCtrl->getLinkTargetByClass(
"ilobjmediacastgui",
"editCastItem"));
82 $this->tpl->setVariable(
"TXT_DET_PLAYTIME", $lng->txt(
"mcst_det_playtime"));
83 $this->tpl->setVariable(
"CMD_DET_PLAYTIME",
84 $ilCtrl->getLinkTargetByClass(
"ilobjmediacastgui",
"determinePlaytime"));
85 $this->tpl->parseCurrentBlock();
86 $this->tpl->setCurrentBlock(
"edit_checkbox");
87 $this->tpl->setVariable(
"VAL_ID", $a_set[
"id"]);
88 $this->tpl->parseCurrentBlock();
93 if ($enable_internal_rss)
95 $this->tpl->setCurrentBlock(
"access");
96 $this->tpl->setVariable(
"TXT_ACCESS", $lng->txt(
"news_news_item_visibility"));
99 $this->tpl->setVariable(
"VAL_ACCESS", $lng->txt(
"news_visibility_public"));
103 $this->tpl->setVariable(
"VAL_ACCESS", $lng->txt(
"news_visibility_users"));
105 $this->tpl->parseCurrentBlock();
108 $ilCtrl->setParameterByClass(
"ilobjmediacastgui",
"item_id",
"");
112 if ($a_set[
"update_date"] !=
"")
114 $this->tpl->setCurrentBlock(
"last_update");
115 $this->tpl->setVariable(
"TXT_LAST_UPDATE",
116 $lng->txt(
"last_update"));
117 $this->tpl->setVariable(
"VAL_LAST_UPDATE",
119 $this->tpl->parseCurrentBlock();
123 $med = $mob->getMediaItem(
"Standard");
125 $this->tpl->setVariable(
"VAL_TITLE",
127 $this->tpl->setVariable(
"VAL_DESCRIPTION",
129 $this->tpl->setVariable(
"TXT_FILENAME",
130 $lng->txt(
"filename"));
131 $this->tpl->setVariable(
"VAL_FILENAME",
133 $this->tpl->setVariable(
"TXT_CREATED",
134 $lng->txt(
"created"));
135 $this->tpl->setVariable(
"VAL_CREATED",
137 $this->tpl->setVariable(
"TXT_DURATION",
138 $lng->txt(
"mcst_play_time"));
139 $this->tpl->setVariable(
"VAL_DURATION",
141 if ($this->downloadable) {
142 $ilCtrl->setParameterByClass(
"ilobjmediacastgui",
"item_id", $a_set[
"id"]);
147 $a_mob = $mob->getMediaItem($purpose);
148 if (!is_object($a_mob))
150 $ilCtrl->setParameterByClass(
"ilobjmediacastgui",
"purpose", $a_mob->getPurpose());
155 $size =
", ".sprintf(
"%.1f MB",
$size/1024/1024);
157 $format = ($a_mob->getFormat()!=
"")?$a_mob->getFormat():
"audio/mpeg";
158 $this->tpl->setCurrentBlock(
"downloadable");
159 $this->tpl->setVariable(
"TXT_DOWNLOAD", $lng->txt(
"mcst_download_" . strtolower($a_mob->getPurpose())));
160 $this->tpl->setVariable(
"CMD_DOWNLOAD", $ilCtrl->getLinkTargetByClass(
"ilobjmediacastgui",
"downloadItem"));
161 $this->tpl->setVariable(
"TITLE_DOWNLOAD",
"(".$format.$size.
")");
162 $this->tpl->parseCurrentBlock();
166 include_once(
"./Services/MediaObjects/classes/class.ilMediaPlayerGUI.php");
170 if (strcasecmp(
"Reference", $med->getLocationType()) == 0)
171 $mpl->setFile($med->getLocation());
174 $mpl->setMimeType ($med->getFormat());
175 $mpl->setDisplayHeight($med->getHeight());
178 $this->tpl->setVariable(
"PLAYER", $mpl->getMp3PlayerHtml());