5 require_once
"./Services/Object/classes/class.ilObjectGUI.php";
29 function __construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output =
true)
34 parent::__construct($a_data,$a_id,$a_call_by_reference,$a_prepare_output);
35 $lng->loadLanguageModule(
"mcst");
36 $lng->loadLanguageModule(
"news");
37 $lng->loadLanguageModule(
"rep");
39 $ilCtrl->saveParameter($this,
"item_id");
41 include_once (
"./Modules/MediaCast/classes/class.ilMediaCastSettings.php");
43 $this->purposeSuffixes = $settings->getPurposeSuffixes();
44 $this->mimeTypes =
array();
45 $mime_types = $settings->getMimeTypes();
46 foreach ($mime_types as $mt)
48 $this->mimeTypes[$mt] = $mt;
51 include_once(
"./Services/Utilities/classes/class.ilMimeTypeUtil.php");
54 $this->mimeTypes[$mt] = $mt;
56 asort($this->mimeTypes);
63 $next_class = $this->ctrl->getNextClass($this);
64 $cmd = $this->ctrl->getCmd();
69 case "ilinfoscreengui":
76 $ilTabs->activateTab(
"export");
77 include_once(
"./Services/Export/classes/class.ilExportGUI.php");
79 $exp_gui->addFormat(
"xml");
80 $ret = $this->ctrl->forwardCommand($exp_gui);
84 case 'ilpermissiongui':
85 $ilTabs->activateTab(
"id_permissions");
86 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
88 $ret = $this->ctrl->forwardCommand($perm_gui);
91 case 'ilobjectcopygui':
92 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
95 $this->ctrl->forwardCommand($cp);
98 case "ilcommonactiondispatchergui":
99 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
101 $this->ctrl->forwardCommand($gui);
104 case "illearningprogressgui":
105 $ilTabs->activateTab(
'learning_progress');
106 require_once
'Services/Tracking/classes/class.ilLearningProgressGUI.php';
109 $this->
object->getRefId(),
110 $_GET[
'user_id'] ?
$_GET[
'user_id'] : $ilUser->getId()
112 $this->ctrl->forwardCommand($new_gui);
113 $this->tabs_gui->setTabActive(
'learning_progress');
122 if (
$cmd !=
"infoScreenObject")
165 global
$tpl,
$lng, $ilAccess, $ilTabs, $ilToolbar;
169 if ($a_presentation_mode)
178 $med_items = $this->
object->getSortedItemsArray();
180 include_once(
"./Modules/MediaCast/classes/class.ilMediaCastTableGUI.php");
181 if ($a_presentation_mode)
190 $table_gui->setData($med_items);
192 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]) && !$a_presentation_mode)
194 $ilToolbar->addButton($lng->txt(
"add"), $this->ctrl->getLinkTarget($this,
"addCastItem"));
196 $table_gui->addMultiCommand(
"confirmDeletionItems", $lng->txt(
"delete"));
197 $table_gui->setSelectAllCheckbox(
"item_id");
201 if ($feed_icon_html !=
"")
203 $table_gui->setHeaderHTML($feed_icon_html);
206 $tpl->setContent($table_gui->getHTML());
221 include_once(
"./Services/Block/classes/class.ilBlockSetting.php");
223 0, $this->
object->getId());
229 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
231 if ($enable_internal_rss)
234 $items = $this->
object->getItemsArray();
235 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
239 foreach ($items as $id => $item)
243 if ($mob->hasPurposeItem($purpose))
249 $url = ILIAS_HTTP_PATH.
"/feed.php?client_id=".rawurlencode(CLIENT_ID).
"&".
"ref_id=".$_GET[
"ref_id"].
"&purpose=$purpose";
250 $title = $lng->txt(
"news_feed_url");
252 include_once(
"./Services/News/classes/class.ilRSSButtonGUI.php");
253 switch (strtolower($purpose))
255 case "audioportable":
260 case "videoportable":
270 $row1 .=
" ".ilRSSButtonGUI::get($type1,
$url);
271 if ($this->
object->getPublicFiles())
273 $url = preg_replace(
"/https?/i",
"itpc",
$url);
274 $title = $lng->txt(
"news_feed_url");
276 include_once(
"./Services/News/classes/class.ilRSSButtonGUI.php");
277 $row2 .=
" ".ilRSSButtonGUI::get($type2,
$url);
307 $tpl->setContent($this->form_gui->getHTML());
320 include_once(
"./Services/MediaObjects/classes/class.ilFFmpeg.php");
324 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
330 foreach (
array(
"Standard") as $p)
371 include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
376 $ilToolbar->addInputItem($ni,
true);
378 $ilToolbar->addFormButton($this->lng->txt(
"mcst_extract_preview_image"),
"extractPreviewImage");
379 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
392 $tpl->setContent($this->form_gui->getHTML());
403 $ilTabs->activateTab(
"edit_content");
405 $lng->loadLanguageModule(
"mcst");
408 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
410 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
412 $this->form_gui->setMultipart(
true);
417 $this->form_gui->addItem($text_input);
422 $this->form_gui->addItem($text_area);
425 if ($enable_internal_rss)
428 $radio_option =
new ilRadioOption($lng->txt(
"access_users"),
"users");
429 $radio_group->addOption($radio_option);
430 $radio_option =
new ilRadioOption($lng->txt(
"access_public"),
"public");
431 $radio_group->addOption($radio_option);
432 $radio_group->
setInfo($lng->txt(
"mcst_visibility_info"));
433 $radio_group->setRequired(
true);
434 $radio_group->setValue($this->
object->getDefaultAccess() == 0 ?
"users" :
"public");
435 $this->form_gui->addItem($radio_group);
440 $dur->
setInfo($lng->txt(
"mcst_duration_info"));
441 $dur->setShowDays(
false);
442 $dur->setShowHours(
true);
443 $dur->setShowSeconds(
true);
444 $this->form_gui->addItem($dur);
448 if ($purpose ==
"VideoAlternative" &&
455 $section->setTitle($lng->txt(
"mcst_".strtolower($purpose).
"_title"));
457 if ($a_mode !=
"create")
462 $label->setInfo($lng->txt(
"mcst_current_value_info"));
463 $this->form_gui->addItem($label);
464 $this->form_gui->addItem($value);
468 $file->setSuffixes($this->purposeSuffixes[$purpose]);
469 $this->form_gui->addItem(
$file);
472 $text_input->setInfo($lng->txt(
"mcst_reference_info"));
473 $this->form_gui->addItem($text_input);
474 if ($purpose !=
"Standard")
477 $clearCheckBox->setPostVar(
"delete_".$purpose);
478 $clearCheckBox->setTitle($lng->txt(
"mcst_clear_purpose_title"));
479 $this->form_gui->addItem($clearCheckBox);
484 $mimeTypeSelection->setPostVar(
"mimetype_".$purpose);
485 $mimeTypeSelection->setTitle($lng->txt(
"mcst_mimetype"));
486 $mimeTypeSelection->setInfo($lng->txt(
"mcst_mimetype_info"));
487 $options =
array(
"" => $lng->txt(
"mcst_automatic_detection"));
488 $options = array_merge($options, $this->mimeTypes);
489 $mimeTypeSelection->setOptions($options);
490 $this->form_gui->addItem($mimeTypeSelection);
495 $pp->setInfo($lng->txt(
"mcst_preview_picture_info").
" mp4, mp3, png, jp(e)g, gif");
496 $this->form_gui->addItem($pp);
503 if ($a_mode ==
"create")
505 $this->form_gui->setTitle($lng->txt(
"mcst_add_new_item"));
506 $this->form_gui->addCommandButton(
"saveCastItem", $lng->txt(
"save"));
510 $this->form_gui->setTitle($lng->txt(
"mcst_edit_item"));
511 $this->form_gui->addCommandButton(
"updateCastItem", $lng->txt(
"save"));
513 $this->form_gui->addCommandButton(
"listItems", $lng->txt(
"cancel"));
514 $this->form_gui->setFormAction($ilCtrl->getFormAction($this,
"saveCastItem"));
527 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
534 $i = $this->form_gui->getItemByPostVar(
"preview_pic");
541 if (count ($mediaItems) > 0)
543 foreach ($mediaItems as $med)
545 if (!isset ($values[
"title"]))
548 $values[
"title"] = $this->mcst_item->getTitle();
549 $values[
"description"] = $this->mcst_item->getContent();
550 $values[
"visibility"] = $this->mcst_item->getVisibility();
551 $length = explode(
":", $this->mcst_item->getPlaytime());
552 $values[
"duration"] =
array(
"hh" => $length[0],
"mm" => $length[1],
"ss" => $length[2]);
555 $values[
"value_".$med->getPurpose()] = (strlen($med->getLocation())> 100) ?
"...".substr($med->getLocation(), strlen($med->getLocation()) - 100) : $med->getLocation();
556 $values[
"label_value_".$med->getPurpose()] = (strlen($med->getLocation())> 100) ?
"...".substr($med->getLocation(), strlen($med->getLocation()) - 100) : $med->getLocation();
557 $values[
"mimetype_".$med->getPurpose()] = $med->getFormat();
561 if (!isset ($values[
"value_".$purpose]))
563 $values[
"label_value_".$purpose] = $lng->txt(
"none");
564 $values[
"value_".$purpose] = $lng->txt(
"none");
567 $this->form_gui->setValuesByArray($values);
578 $ilTabs->activateTab(
"edit_content");
582 if (!$this->form_gui->checkInput() ||
583 (
$_POST[
"url_Standard"] ==
"" && !$_FILES[
'file_Standard'][
'tmp_name']))
585 if ((
$_POST[
"url_Standard"] ==
"" && !$_FILES[
'file_Standard'][
'tmp_name']))
594 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
603 $title = $this->form_gui->getInput(
"title") !=
"" ? $this->form_gui->getInput(
"title") : basename(
$file);
604 $description = $this->form_gui->getInput(
"description");
606 $mob->setDescription($description);
609 $prevpic = $this->form_gui->getInput(
"preview_pic");
610 if ($prevpic[
"size"] > 0)
612 $mob->uploadVideoPreviewPic($prevpic);
619 foreach ($this->additionalPurposes as $purpose)
622 $file_gui = $this->form_gui->getInput(
"file_".$purpose);
623 $url_gui = $this->form_gui->getInput(
"url_".$purpose);
624 if ($url_gui || $file_gui[
"size"] > 0)
632 if ($prevpic[
"size"] == 0)
644 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
647 include_once(
"./Services/News/classes/class.ilNewsItem.php");
649 $mc_item->setMobId($mob->getId());
651 $mc_item->setContextObjId($this->
object->getId());
652 $mc_item->setContextObjType($this->
object->getType());
653 $mc_item->setUserId($ilUser->getId());
655 $mc_item->setTitle(
$title);
656 $mc_item->setContent($description);
657 $mc_item->setLimitation(
false);
658 if ($enable_internal_rss)
660 $mc_item->setVisibility($this->form_gui->getInput(
"visibility"));
664 $mc_item->setVisibility(
"users");
668 $ilCtrl->redirect($this,
"listItems");
681 ? $this->form_gui->getInput(
"duration")
682 :
array(
"hh"=>0,
"mm"=>0,
"ss"=>0);
685 include_once(
"./Services/MediaObjects/classes/class.ilMediaAnalyzer.php");
687 $ana->setFile(
$file);
689 $dur = $ana->getPlaytimeString();
690 $dur = explode(
":", $dur);
695 str_pad(
$duration[
"mm"], 2 ,
"0", STR_PAD_LEFT).
":".
696 str_pad(
$duration[
"ss"], 2 ,
"0", STR_PAD_LEFT);
709 $mob->addMediaItem($mediaItem);
710 $mediaItem->setPurpose($purpose);
723 $purpose = $mediaItem->getPurpose();
724 $url_gui = $this->form_gui->getInput (
"url_".$purpose);
725 $file_gui = $this->form_gui->getInput (
"file_".$purpose);
729 $file = $this->form_gui->getInput (
"url_".$purpose);
731 $location = $this->form_gui->getInput (
"url_".$purpose);
732 $locationType =
"Reference";
733 } elseif ($file_gui[
"size"] > 0){
737 if (!is_dir($mob_dir))
738 $mob->createDirectory();
741 $file_name = str_replace(
" ",
"_", $file_name);
743 $file = $mob_dir.
"/".$file_name;
745 $locationType =
"LocalFile";
753 if (
$_POST[
"mimetype_".$purpose] !=
"")
755 $mediaItem->setFormat(
$_POST[
"mimetype_".$purpose]);
757 elseif ($mediaItem->getLocation () !=
"")
760 $mediaItem->setFormat($format);
772 $mediaItem->setFormat($format);
774 $mediaItem->setLocationType($locationType);
775 $mediaItem->setHAlign(
"Left");
776 $mediaItem->setHeight(self::isAudio($format)?0:180);
779 if ($purpose ==
"Standard")
784 $mob->setDescription($format);
801 if ($this->form_gui->checkInput())
804 include_once(
"./Services/News/classes/class.ilNewsItem.php");
806 $mob_id = $mc_item->getMobId();
809 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
815 if ($this->form_gui->getInput(
"delete_".$purpose))
817 $mob->removeMediaItem($purpose);
818 $log->write (
"Mcst: deleting purpose $purpose");
821 $media_item = $mob->getMediaItem($purpose);
822 $url_gui = $this->form_gui->getInput(
"url_".$purpose);
823 $file_gui = $this->form_gui->getInput(
"file_".$purpose);
825 if ($media_item == null)
827 if ($purpose !=
"Standard" &&
828 ($url_gui || $file_gui[
"size"]>0))
839 if ($purpose ==
"Standard")
842 $title = $this->form_gui->getInput(
"title") !=
"" ? $this->form_gui->getInput(
"title") : basename(
$file);
843 $description = $this->form_gui->getInput(
"description");
846 $mob->setDescription($description);
848 $prevpic = $this->form_gui->getInput(
"preview_pic");
849 if ($prevpic[
"size"] > 0)
851 $mob->uploadVideoPreviewPic($prevpic);
855 $prevpici = $this->form_gui->getItemByPostVar(
"preview_pic");
856 if ($prevpici->getDeletionFlag())
858 $mob->removeAdditionalFile($mob->getVideoPreviewPic(
true));
872 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
874 $mc_item->setUserId($ilUser->getId());
879 $mc_item->setTitle(
$title);
880 $mc_item->setContent($description);
881 if ($enable_internal_rss)
883 $mc_item->setVisibility($this->form_gui->getInput(
"visibility"));
887 $ilCtrl->redirect($this,
"listItems");
903 $ilTabs->activateTab(
"edit_content");
905 if (!is_array(
$_POST[
"item_id"]))
911 include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
915 $c_gui->setFormAction($ilCtrl->getFormAction($this,
"deleteItems"));
916 $c_gui->setHeaderText($lng->txt(
"info_delete_sure"));
917 $c_gui->setCancel($lng->txt(
"cancel"),
"listItems");
918 $c_gui->setConfirm($lng->txt(
"confirm"),
"deleteItems");
921 include_once(
"./Services/News/classes/class.ilNewsItem.php");
922 foreach(
$_POST[
"item_id"] as $item_id)
925 $c_gui->addItem(
"item_id[]", $item_id, $item->getTitle(),
929 $tpl->setContent($c_gui->getHTML());
942 foreach(
$_POST[
"item_id"] as $item_id)
948 $ilCtrl->redirect($this,
"listItems");
960 if (!$news_item->deliverMobFile(
$_GET[
"purpose"], (
int)
$_GET[
"presentation"]))
962 $ilCtrl->redirect($this,
"listItems");
967 $this->
object->handleLPUpdate($ilUser->getId(), $news_item->getMobId());
980 $mob = $mc_item->getMobId();
981 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
984 $m_item = $mob->getMediaItem(
"Standard");
985 $file = $mob_dir.
"/".$m_item->getLocation();
998 $ilCtrl->redirect($this,
"listItems");
1009 $this->ctrl->setCmd(
"showSummary");
1010 $this->ctrl->setCmdClass(
"ilinfoscreengui");
1019 global $ilAccess,
$ilUser, $ilTabs;
1021 $ilTabs->activateTab(
"id_info");
1023 if (!$ilAccess->checkAccess(
"visible",
"", $this->object->getRefId()))
1025 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->
ilias->error_obj->MESSAGE);
1028 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
1031 $info->enablePrivateNotes();
1042 $this->lng->loadLanguageModule(
"meta");
1043 $this->lng->loadLanguageModule(
"mcst");
1044 $med_items = $this->
object->getItemsArray();
1045 $info->addSection($this->lng->txt(
"meta_general"));
1046 $info->addProperty($this->lng->txt(
"mcst_nr_items"),
1047 (int) count($med_items));
1049 if (count($med_items) > 0)
1051 $cur = current($med_items);
1059 $info->addProperty($this->lng->txt(
"mcst_last_submission"), $last);
1062 $this->ctrl->forwardCommand(
$info);
1071 global $ilAccess, $ilTabs,
$lng, $ilHelp;
1073 $ilHelp->setScreenIdComponent(
"mcst");
1076 if ($ilAccess->checkAccess(
'read',
"", $this->object->getRefId()))
1078 $ilTabs->addTab(
"content",
1079 $lng->txt(
"content"),
1080 $this->ctrl->getLinkTarget($this,
"showContent"));
1084 if ($ilAccess->checkAccess(
'visible',
"", $this->object->getRefId()))
1086 $ilTabs->addTab(
"id_info",
1087 $lng->txt(
"info_short"),
1088 $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"));
1092 if ($ilAccess->checkAccess(
'write',
"", $this->object->getRefId()))
1094 $ilTabs->addTab(
"id_settings",
1095 $lng->txt(
"settings"),
1096 $this->ctrl->getLinkTarget($this,
"editSettings"));
1099 require_once
'Services/Tracking/classes/class.ilLearningProgressAccess.php';
1103 'learning_progress',
1104 $lng->txt(
'learning_progress'),
1105 $this->ctrl->getLinkTargetByClass(
array(__CLASS__,
'illearningprogressgui'),
'')
1110 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
1112 $ilTabs->addTab(
"export",
1113 $lng->txt(
"export"),
1114 $this->ctrl->getLinkTargetByClass(
"ilexportgui",
""));
1118 if ($ilAccess->checkAccess(
'edit_permission',
"", $this->object->getRefId()))
1120 $ilTabs->addTab(
"id_permissions",
1121 $lng->txt(
"perm_settings"),
1122 $this->ctrl->getLinkTargetByClass(
"ilpermissiongui",
"perm"));
1134 global $ilTabs, $ilAccess,
$lng;
1136 $ilTabs->addSubTab(
"content",
1138 $this->ctrl->getLinkTarget($this,
"showContent"));
1140 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]))
1142 $ilTabs->addSubTab(
"manage",
1143 $lng->txt(
"mcst_manage"),
1144 $this->ctrl->getLinkTarget($this,
"listItems"));
1148 $ilTabs->addSubTab(
"sorting",
1149 $lng->txt(
"mcst_ordering"),
1150 $this->ctrl->getLinkTarget($this,
"editOrder"));
1154 $ilTabs->activateSubTab($a_active);
1155 $ilTabs->activateTab(
"content");
1164 global
$tpl, $ilTabs;
1167 $ilTabs->activateTab(
"id_settings");
1170 $tpl->setContent($this->form_gui->getHtml());
1180 $lng->loadLanguageModule(
"mcst");
1182 require_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1184 $this->form_gui->setTitle($lng->txt(
"mcst_settings"));
1189 $tit->setRequired(
true);
1190 $this->form_gui->addItem($tit);
1195 $this->form_gui->addItem($des);
1198 $sh->setTitle($lng->txt(
"rep_activation_availability"));
1199 $this->form_gui->addItem($sh);
1204 $this->form_gui->addItem($online);
1208 $sh->setTitle($lng->txt(
"obj_presentation"));
1209 $this->form_gui->addItem($sh);
1215 $sort->addOption(
new ilRadioOption($lng->txt(
"mcst_ordering_creation_date_asc"),
1217 $sort->addOption(
new ilRadioOption($lng->txt(
"mcst_ordering_creation_date_desc"),
1219 $sort->addOption(
new ilRadioOption($lng->txt(
"mcst_ordering_manual"),
1221 $sort->setValue($this->
object->getOrder());
1222 $this->form_gui->addItem($sort);
1236 $si->setValue($this->
object->getViewMode());
1237 $this->form_gui->addItem($si);
1241 $downloadable =
new ilCheckboxInputGUI($lng->txt(
"mcst_downloadable"),
"downloadable");
1243 $downloadable->setInfo($lng->txt(
"mcst_downloadable_info"));
1244 $this->form_gui->addItem($downloadable);
1247 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
1250 if ($enable_internal_rss)
1254 $sh->setTitle($lng->txt(
"mcst_webfeed"));
1255 $this->form_gui->addItem($sh);
1257 $radio_group =
new ilRadioGroupInputGUI($lng->txt(
"news_default_visibility"),
"defaultaccess");
1258 $radio_option =
new ilRadioOption($lng->txt(
"news_visibility_users"),
"0");
1259 $radio_option->
setInfo($lng->txt(
"news_news_item_def_visibility_users_info"));
1260 $radio_group->addOption($radio_option);
1261 $radio_option =
new ilRadioOption($lng->txt(
"news_visibility_public"),
"1");
1262 $radio_option->
setInfo($lng->txt(
"news_news_item_def_visibility_public_info"));
1263 $radio_group->addOption($radio_option);
1264 $radio_group->setRequired(
false);
1265 $radio_group->setValue($this->
object->getDefaultAccess());
1266 #$ch->addSubItem($radio_group); 1267 $this->form_gui->addItem($radio_group);
1270 include_once(
"./Services/Block/classes/class.ilBlockSetting.php");
1273 $ch->
setInfo($lng->txt(
"news_public_feed_info"));
1274 $ch->setChecked($public_feed);
1275 $this->form_gui->addItem($ch);
1278 $ni =
new ilNumberInputGUI($this->lng->txt(
"news_keep_minimal_x_items"),
"keep_rss_min");
1280 $ni->setMinValue(0);
1281 $ni->setMaxLength(3);
1283 $ni->setInfo($this->lng->txt(
"news_keep_minimal_x_items_info").
" (".
1286 $ch->addSubItem($ni);
1289 $incl_files =
new ilCheckboxInputGUI($lng->txt(
"mcst_incl_files_in_rss"),
"public_files");
1291 $incl_files->setInfo($lng->txt(
"mcst_incl_files_in_rss_info"));
1292 #$ch->addSubItem($incl_files); 1293 $this->form_gui->addItem($incl_files);
1297 $this->form_gui->addCommandButton(
"saveSettings", $lng->txt(
"save"));
1298 $this->form_gui->setFormAction($ilCtrl->getFormAction($this,
"saveSettings"));
1309 $ilTabs->activateTab(
"id_settings");
1312 if ($this->form_gui->checkInput())
1315 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
1317 $this->
object->setTitle($this->form_gui->getInput(
"title"));
1318 $this->
object->setDescription($this->form_gui->getInput(
"description"));
1319 $this->
object->setOnline($this->form_gui->getInput(
"online"));
1320 $this->
object->setDownloadable($this->form_gui->getInput(
"downloadable"));
1321 $this->
object->setOrder($this->form_gui->getInput(
"order"));
1322 $this->
object->setViewMode($this->form_gui->getInput(
"viewmode"));
1324 if ($enable_internal_rss)
1326 $this->
object->setPublicFiles($this->form_gui->getInput(
"public_files"));
1327 $this->
object->setDefaultAccess($this->form_gui->getInput(
"defaultaccess"));
1329 $this->
object->update();
1331 if ($enable_internal_rss)
1333 include_once(
"./Services/Block/classes/class.ilBlockSetting.php");
1335 $this->form_gui->getInput(
"extra_feed"),
1336 0, $this->
object->getId());
1339 $this->form_gui->getInput(
"keep_rss_min"),
1340 0, $this->
object->getId());
1344 $ilCtrl->redirect($this,
"editSettings");
1348 $this->form_gui->setValuesByPost();
1349 $this->tpl->setContent($this->form_gui->getHTML());
1358 if (is_object($this->
object))
1360 $ilLocator->addItem($this->
object->getTitle(), $this->ctrl->getLinkTarget($this,
"listItems"),
"",
$_GET[
"ref_id"]);
1368 if ($ilAccess->checkAccess(
"read",
"", $a_target))
1370 $_GET[
"cmd"] =
"showContent";
1371 $_GET[
"ref_id"] = $a_target;
1372 $_GET[
"baseClass"] =
"ilmediacasthandlergui";
1373 $_GET[
"cmdClass"] =
"ilobjmediacastgui";
1374 include(
"ilias.php");
1377 else if ($ilAccess->checkAccess(
"visible",
"", $a_target))
1381 else if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
1388 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
1399 return strpos($extension,
"audio") !==
false;
1409 include_once(
"./Services/News/classes/class.ilNewsItem.php");
1412 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
1424 include_once(
"./Services/News/classes/class.ilNewsItem.php");
1427 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
1441 if (
$_POST[
"value_".$purpose])
1443 $_POST[
"label_value_".$purpose] =
$_POST[
"value_".$purpose];
1447 $this->form_gui->setValuesByPost();
1448 $tpl->setContent($this->form_gui->getHTML());
1456 $ilTabs->activateTab(
"edit_content");
1461 switch($this->
object->getOrder())
1473 include_once(
"./Modules/MediaCast/classes/class.ilMediaCastTableGUI.php");
1476 $table_gui->setTitle($lng->txt(
"mcst_media_cast"));
1477 $table_gui->setData($this->
object->getSortedItemsArray());
1479 $table_gui->addCommandButton(
"saveOrder", $lng->txt(
"mcst_save_order"));
1481 $tpl->setContent($table_gui->getHTML());
1488 asort(
$_POST[
"item_id"]);
1491 foreach(array_keys(
$_POST[
"item_id"]) as $id)
1495 $this->
object->saveOrder($items);
1498 $this->ctrl->redirect($this,
"editOrder");
1516 require_once
'Services/Tracking/classes/class.ilChangeEvent.php';
1518 $this->
object->getId(), $ilUser->getId());
1529 $tpl->setPermanentLink($this->
object->getType(), $this->
object->getRefId());
1536 $tpl->addJavascript(
"./Modules/MediaCast/js/MediaCast.js");
1538 $ilTabs->activateTab(
"content");
1542 $ctpl =
new ilTemplate(
"tpl.mcst_content.html",
true,
true,
"Modules/MediaCast");
1544 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
1545 require_once(
'./Services/WebAccessChecker/classes/class.ilWACSignedPath.php');
1546 foreach ($this->
object->getSortedItemsArray() as $item)
1549 $med = $mob->getMediaItem(
"Standard");
1551 $ctpl->setCurrentBlock(
"item");
1552 $ctpl->setVariable(
"TITLE", $item[
"title"]);
1553 $ctpl->setVariable(
"TIME", $item[
"playtime"]);
1554 $ctpl->setVariable(
"ID", $item[
"id"]);
1556 if ($mob->getVideoPreviewPic() !=
"")
1558 $ctpl->setVariable(
"PREVIEW_PIC",
1563 $ctpl->setVariable(
"PREVIEW_PIC",
1568 if (is_object($med))
1570 include_once(
"./Services/MediaObjects/classes/class.ilMediaPlayerGUI.php");
1574 $ilCtrl->getLinkTarget($this,
"handlePlayerEvent",
"",
true,
false));
1576 if (strcasecmp(
"Reference", $med->getLocationType()) == 0)
1579 $mpl->setFile($med->getLocation());
1585 $mpl->setFile($path_to_file);
1587 $mpl->setMimeType ($med->getFormat());
1589 $mpl->setDisplayHeight(
"480");
1590 $mpl->setDisplayWidth(
"640");
1592 $mpl->setTitle($item[
"title"]);
1593 $mpl->setDescription($item[
"content"]);
1594 $mpl->setForceAudioPreview(
true);
1595 if ($this->
object->getDownloadable())
1597 $ilCtrl->setParameterByClass(
"ilobjmediacastgui",
"item_id", $item[
"id"]);
1598 $ilCtrl->setParameterByClass(
"ilobjmediacastgui",
"purpose",
"Standard");
1599 $mpl->setDownloadLink($ilCtrl->getLinkTargetByClass(
"ilobjmediacastgui",
"downloadItem"));
1601 $med_alt = $mob->getMediaItem(
"VideoAlternative");
1602 if (is_object($med_alt))
1605 $med_alt->getLocation()));
1606 $mpl->setAlternativeVideoMimeType($med_alt->getFormat());
1609 $ctpl->setVariable(
"PLAYER", $mpl->getPreviewHtml());
1613 $ctpl->parseCurrentBlock();
1618 if ($feed_icon_html !=
"")
1620 $feed_icon_html =
'<p>'.$feed_icon_html.
'</p>';
1623 $tpl->setContent($feed_icon_html.$ctpl->get());
1639 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
1647 include_once(
"./Services/MediaObjects/classes/class.ilFFmpeg.php");
1648 $med = $mob->getMediaItem(
"Standard");
1652 $pi = pathinfo($new_file);
1653 $med = $mob->getMediaItem($target_purpose);
1654 if (!is_object($med))
1657 $med->setMobId($mob->getId());
1658 $mob->addMediaItem($med);
1660 $med->setPurpose($target_purpose);
1662 $med->setFormat($target_format);
1663 $med->setLocation($pi[
"basename"]);
1664 $med->setLocationType(
"LocalFile");
1667 $add = (is_array(
$ret) && count(
$ret) > 0)
1668 ?
"<br />".implode(
$ret,
"<br />")
1676 $add = (is_array(
$ret) && count(
$ret) > 0)
1677 ?
"<br />".implode(
$ret,
"<br />")
1683 $ilCtrl->redirect($this,
"editCastItem");
1699 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
1704 $sec = (int)
$_POST[
"sec"];
1709 if ($mob->getVideoPreviewPic() !=
"")
1711 $mob->removeAdditionalFile($mob->getVideoPreviewPic(
true));
1713 include_once(
"./Services/MediaObjects/classes/class.ilFFmpeg.php");
1714 $med = $mob->getMediaItem(
"Standard");
1719 if ($new_file !=
"")
1733 $add = (is_array(
$ret) && count(
$ret) > 0)
1734 ?
"<br />".implode(
$ret,
"<br />")
1741 $ilCtrl->redirect($this,
"editCastItem");
1752 if (
$_GET[
"event"] ==
"play")
1754 $player = explode(
"_",
$_GET[
"player"]);
1755 $news_id = (int) $player[1];
1756 include_once(
"./Services/News/classes/class.ilNewsItem.php");
1758 $item->increasePlayCounter();
1760 $mob_id = $item->getMobId();
1764 $this->
object->handleLPUpdate($ilUser->getId(), $mob_id);
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
This class represents an option in a radio group.
static getLastReturnValues()
Get last return values.
Base class for ILIAS Exception handling.
static _write($a_type, $a_setting, $a_value, $a_user=0, $a_block_id=0)
Write setting to database.
static _lookupRSSPeriod()
GUI class for the workflow of copying objects.
static convert($a_file, $a_target_mime, $a_target_dir="", $a_target_filename="")
Convert file to target mime type.
static signFolderOfStartFile($start_file_path, ilWACCookieInterface $ilWACCookieInterface=null)
Class ilObject Basic functions for all objects.
setValue($a_value)
Set Value.
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupTitle($a_id)
lookup object title
fillCloneTemplate($a_tpl_varname, $a_type)
Fill object clone template This method can be called from any object GUI class that wants to offer ob...
setInfo($a_info)
Set Info.
static extractImage($a_file, $a_target_filename, $a_target_dir="", $a_sec=1)
Extract image from video file.
static getASCIIFilename($a_filename)
convert utf8 to ascii filename
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
Export User Interface Class.
static checkAccess($a_ref_id, $a_allow_only_read=true)
check access to learning progress
initImportForm($a_new_type)
Init object import form.
prepareOutput($a_show_subobjects=true)
prepare output
if(!is_array($argv)) $options
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
Class ilObjectGUI Basic methods of all Output classes.
static _lookupObjId($a_id)
special template class to simplify handling of ITX/PEAR
static _lookup($a_type, $a_setting, $a_user=0, $a_block_id=0)
Lookup setting from database.
This class represents a text property in a property form.
static formatDate(ilDateTime $date)
Format a date public.
redirection script todo: (a better solution should control the processing via a xml file) ...
static _recordReadEvent($a_type, $a_ref_id, $obj_id, $usr_id, $isCatchupWriteEvents=true, $a_ext_rc=false, $a_ext_time=false)
Records a read event and catches up with write events.
setMaxLength($a_maxlength)
Set Max Length.
initCreateForm($a_new_type)
Init object creation form.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static signFile($path_to_file)
Create styles array
The data for the language used.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static img($a_src, $a_alt="", $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.
This class represents a non editable value in a property form.
Create new PHPExcel object
obj_idprivate
static renameExecutables($a_dir)
Rename uploaded executables for security reasons.
const LP_CONTEXT_REPOSITORY
This class represents a text area property in a property form.
getRefId()
get reference id public
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
static enabled()
Checks, whether FFmpeg support is enabled (path is set in the setup)
setValue($a_value)
Set Value.
static redirect($a_script)
http redirect to other script
addHeaderAction()
Add header action menu.
Class ilObjUserTrackingGUI.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Confirmation screen class.
static supportsImageExtraction($a_mime)
Check if mime type supports image extraction.