5 require_once
"./Services/Object/classes/class.ilObjectGUI.php";
49 public function __construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output =
true)
53 $this->ctrl = $DIC->ctrl();
54 $this->lng = $DIC->language();
55 $this->
user = $DIC->user();
56 $this->tabs = $DIC->tabs();
57 $this->tpl = $DIC[
"tpl"];
58 $this->access = $DIC->access();
59 $this->toolbar = $DIC->toolbar();
60 $this->log = $DIC[
"ilLog"];
61 $this->error = $DIC[
"ilErr"];
62 $this->help = $DIC[
"ilHelp"];
63 $this->locator = $DIC[
"ilLocator"];
65 $lng = $DIC->language();
68 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
69 $lng->loadLanguageModule(
"mcst");
70 $lng->loadLanguageModule(
"news");
71 $lng->loadLanguageModule(
"rep");
73 $ilCtrl->saveParameter($this,
"item_id");
75 include_once(
"./Modules/MediaCast/classes/class.ilMediaCastSettings.php");
77 $this->purposeSuffixes =
$settings->getPurposeSuffixes();
78 $this->mimeTypes =
array();
80 foreach ($mime_types as $mt) {
81 $this->mimeTypes[$mt] = $mt;
84 include_once(
"./Services/Utilities/classes/class.ilMimeTypeUtil.php");
86 $this->mimeTypes[$mt] = $mt;
88 asort($this->mimeTypes);
96 $next_class = $this->ctrl->getNextClass($this);
97 $cmd = $this->ctrl->getCmd();
100 switch ($next_class) {
101 case "ilinfoscreengui":
110 $ilTabs->activateTab(
"export");
111 include_once(
"./Services/Export/classes/class.ilExportGUI.php");
113 $exp_gui->addFormat(
"xml");
114 $ret = $this->ctrl->forwardCommand($exp_gui);
118 case 'ilpermissiongui':
119 $ilTabs->activateTab(
"id_permissions");
120 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
122 $ret = $this->ctrl->forwardCommand($perm_gui);
125 case 'ilobjectcopygui':
126 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
128 $cp->setType(
'mcst');
129 $this->ctrl->forwardCommand($cp);
132 case "ilcommonactiondispatchergui":
133 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
135 $this->ctrl->forwardCommand($gui);
138 case "illearningprogressgui":
139 $ilTabs->activateTab(
'learning_progress');
140 require_once
'Services/Tracking/classes/class.ilLearningProgressGUI.php';
143 $this->
object->getRefId(),
146 $this->ctrl->forwardCommand($new_gui);
147 $this->tabs_gui->setTabActive(
'learning_progress');
155 if ($cmd !=
"infoScreenObject") {
203 if ($a_presentation_mode) {
209 $med_items = $this->
object->getSortedItemsArray();
211 include_once(
"./Modules/MediaCast/classes/class.ilMediaCastTableGUI.php");
212 if ($a_presentation_mode) {
218 $table_gui->setData($med_items);
220 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"]) && !$a_presentation_mode) {
221 $ilToolbar->addButton(
$lng->txt(
"add"), $this->ctrl->getLinkTarget($this,
"addCastItem"));
223 $table_gui->addMultiCommand(
"confirmDeletionItems",
$lng->txt(
"delete"));
224 $table_gui->setSelectAllCheckbox(
"item_id");
228 if ($feed_icon_html !=
"") {
229 $table_gui->setHeaderHTML($feed_icon_html);
232 $tpl->setContent($table_gui->getHTML());
247 include_once(
"./Services/Block/classes/class.ilBlockSetting.php");
258 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
260 if ($enable_internal_rss) {
262 $items = $this->
object->getItemsArray();
263 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
266 foreach ($items as
$id => $item) {
269 if ($mob->hasPurposeItem($purpose)) {
273 $url = ILIAS_HTTP_PATH .
"/feed.php?client_id=" . rawurlencode(CLIENT_ID) .
"&" .
"ref_id=" .
$_GET[
"ref_id"] .
"&purpose=$purpose";
276 include_once(
"./Services/News/classes/class.ilRSSButtonGUI.php");
277 switch (strtolower($purpose)) {
278 case "audioportable":
283 case "videoportable":
294 if ($this->
object->getPublicFiles()) {
295 $url = preg_replace(
"/https?/i",
"itpc",
$url);
298 include_once(
"./Services/News/classes/class.ilRSSButtonGUI.php");
327 $tpl->setContent($this->form_gui->getHTML());
342 include_once(
"./Services/MediaObjects/classes/class.ilFFmpeg.php");
345 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
351 foreach (
array(
"Standard") as $p) {
386 if (is_object($med)) {
389 include_once(
"./Services/Form/classes/class.ilTextInputGUI.php");
394 $ilToolbar->addInputItem($ni,
true);
396 $ilToolbar->addFormButton($this->lng->txt(
"mcst_extract_preview_image"),
"extractPreviewImage");
397 $ilToolbar->setFormAction(
$ilCtrl->getFormAction($this));
410 $tpl->setContent($this->form_gui->getHTML());
423 $ilTabs->activateTab(
"edit_content");
425 $lng->loadLanguageModule(
"mcst");
428 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
430 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
432 $this->form_gui->setMultipart(
true);
437 $this->form_gui->addItem($text_input);
442 $this->form_gui->addItem($text_area);
445 if ($enable_internal_rss) {
448 $radio_group->addOption($radio_option);
450 $radio_group->addOption($radio_option);
451 $radio_group->
setInfo(
$lng->txt(
"mcst_visibility_info"));
452 $radio_group->setRequired(
true);
453 $radio_group->setValue($this->
object->getDefaultAccess() == 0 ?
"users" :
"public");
454 $this->form_gui->addItem($radio_group);
460 $dur->setShowDays(
false);
461 $dur->setShowHours(
true);
462 $dur->setShowSeconds(
true);
463 $this->form_gui->addItem($dur);
466 if ($purpose ==
"VideoAlternative" &&
467 $a_mode ==
"create") {
472 $section->setTitle(
$lng->txt(
"mcst_" . strtolower($purpose) .
"_title"));
474 if ($a_mode !=
"create") {
477 $label->
setPostVar(
"label_value_" . $purpose);
478 $label->setInfo(
$lng->txt(
"mcst_current_value_info"));
479 $this->form_gui->addItem($label);
480 $this->form_gui->addItem($value);
483 $file->setSuffixes($this->purposeSuffixes[$purpose]);
484 $this->form_gui->addItem(
$file);
487 $text_input->setInfo(
$lng->txt(
"mcst_reference_info"));
488 $this->form_gui->addItem($text_input);
489 if ($purpose !=
"Standard") {
491 $clearCheckBox->setPostVar(
"delete_" . $purpose);
492 $clearCheckBox->setTitle(
$lng->txt(
"mcst_clear_purpose_title"));
493 $this->form_gui->addItem($clearCheckBox);
498 $mimeTypeSelection->setPostVar(
"mimetype_" . $purpose);
499 $mimeTypeSelection->setTitle(
$lng->txt(
"mcst_mimetype"));
500 $mimeTypeSelection->setInfo(
$lng->txt(
"mcst_mimetype_info"));
502 $options = array_merge($options, $this->mimeTypes);
503 $mimeTypeSelection->setOptions($options);
504 $this->form_gui->addItem($mimeTypeSelection);
509 $pp->setInfo(
$lng->txt(
"mcst_preview_picture_info") .
" mp4, mp3, png, jp(e)g, gif");
510 $this->form_gui->addItem($pp);
515 if ($a_mode ==
"create") {
516 $this->form_gui->setTitle(
$lng->txt(
"mcst_add_new_item"));
517 $this->form_gui->addCommandButton(
"saveCastItem",
$lng->txt(
"save"));
519 $this->form_gui->setTitle(
$lng->txt(
"mcst_edit_item"));
520 $this->form_gui->addCommandButton(
"updateCastItem",
$lng->txt(
"save"));
522 $this->form_gui->addCommandButton(
"listItems",
$lng->txt(
"cancel"));
523 $this->form_gui->setFormAction(
$ilCtrl->getFormAction($this,
"saveCastItem"));
535 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
541 $i = $this->form_gui->getItemByPostVar(
"preview_pic");
548 if (count($mediaItems) > 0) {
549 foreach ($mediaItems as $med) {
550 if (!isset($values[
"title"])) {
552 $values[
"title"] = $this->mcst_item->getTitle();
553 $values[
"description"] = $this->mcst_item->getContent();
554 $values[
"visibility"] = $this->mcst_item->getVisibility();
555 $length = explode(
":", $this->mcst_item->getPlaytime());
556 $values[
"duration"] =
array(
"hh" => $length[0],
"mm" => $length[1],
"ss" => $length[2]);
559 $values[
"value_" . $med->getPurpose()] = (strlen($med->getLocation())> 100) ?
"..." . substr($med->getLocation(), strlen($med->getLocation()) - 100) : $med->getLocation();
560 $values[
"label_value_" . $med->getPurpose()] = (strlen($med->getLocation())> 100) ?
"..." . substr($med->getLocation(), strlen($med->getLocation()) - 100) : $med->getLocation();
561 $values[
"mimetype_" . $med->getPurpose()] = $med->getFormat();
565 if (!isset($values[
"value_" . $purpose])) {
566 $values[
"label_value_" . $purpose] =
$lng->txt(
"none");
567 $values[
"value_" . $purpose] =
$lng->txt(
"none");
570 $this->form_gui->setValuesByArray($values);
585 $ilTabs->activateTab(
"edit_content");
589 if (!$this->form_gui->checkInput() ||
590 (
$_POST[
"url_Standard"] ==
"" && !$_FILES[
'file_Standard'][
'tmp_name'])) {
591 if ((
$_POST[
"url_Standard"] ==
"" && !$_FILES[
'file_Standard'][
'tmp_name'])) {
597 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
606 $title = $this->form_gui->getInput(
"title") !=
"" ? $this->form_gui->getInput(
"title") : basename(
$file);
607 $description = $this->form_gui->getInput(
"description");
612 $prevpic = $this->form_gui->getInput(
"preview_pic");
613 if ($prevpic[
"size"] > 0) {
614 $mob->uploadVideoPreviewPic($prevpic);
621 foreach ($this->additionalPurposes as $purpose) {
623 $file_gui = $this->form_gui->getInput(
"file_" . $purpose);
624 $url_gui = $this->form_gui->getInput(
"url_" . $purpose);
625 if ($url_gui || $file_gui[
"size"] > 0) {
632 if ($prevpic[
"size"] == 0) {
643 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
646 include_once(
"./Services/News/classes/class.ilNewsItem.php");
648 $mc_item->setMobId($mob->getId());
650 $mc_item->setContextObjId($this->
object->getId());
651 $mc_item->setContextObjType($this->
object->getType());
652 $mc_item->setUserId(
$ilUser->getId());
653 $mc_item->setPlaytime($duration);
654 $mc_item->setTitle(
$title);
656 $mc_item->setLimitation(
false);
657 if ($enable_internal_rss) {
658 $mc_item->setVisibility($this->form_gui->getInput(
"visibility"));
660 $mc_item->setVisibility(
"users");
664 $ilCtrl->redirect($this,
"listItems");
676 $duration = isset($this->form_gui)
677 ? $this->form_gui->getInput(
"duration")
678 :
array(
"hh"=>0,
"mm"=>0,
"ss"=>0);
679 if ($duration[
"hh"] == 0 && $duration[
"mm"] == 0 && $duration[
"ss"] == 0 && is_file(
$file)) {
680 include_once(
"./Services/MediaObjects/classes/class.ilMediaAnalyzer.php");
682 $ana->setFile(
$file);
684 $dur = $ana->getPlaytimeString();
685 $dur = explode(
":", $dur);
686 $duration[
"mm"] = $dur[0];
687 $duration[
"ss"] = $dur[1];
689 $duration = str_pad($duration[
"hh"], 2,
"0", STR_PAD_LEFT) .
":" .
690 str_pad($duration[
"mm"], 2,
"0", STR_PAD_LEFT) .
":" .
691 str_pad($duration[
"ss"], 2,
"0", STR_PAD_LEFT);
704 $mob->addMediaItem($mediaItem);
705 $mediaItem->setPurpose($purpose);
718 $purpose = $mediaItem->getPurpose();
719 $url_gui = $this->form_gui->getInput(
"url_" . $purpose);
720 $file_gui = $this->form_gui->getInput(
"file_" . $purpose);
723 $file = $this->form_gui->getInput(
"url_" . $purpose);
725 $location = $this->form_gui->getInput(
"url_" . $purpose);
726 $locationType =
"Reference";
727 } elseif ($file_gui[
"size"] > 0) {
731 if (!is_dir($mob_dir)) {
732 $mob->createDirectory();
736 $file_name = str_replace(
" ",
"_", $file_name);
738 $file = $mob_dir .
"/" . $file_name;
740 $locationType =
"LocalFile";
742 ilUtil::moveUploadedFile($_FILES[
'file_' . $purpose][
'tmp_name'], $file_name,
$file);
747 if (
$_POST[
"mimetype_" . $purpose] !=
"") {
748 $mediaItem->setFormat(
$_POST[
"mimetype_" . $purpose]);
749 } elseif ($mediaItem->getLocation() !=
"") {
751 $mediaItem->setFormat(
$format);
761 $mediaItem->setFormat(
$format);
763 $mediaItem->setLocationType($locationType);
764 $mediaItem->setHAlign(
"Left");
765 $mediaItem->setHeight(self::isAudio(
$format)?0:180);
768 if ($purpose ==
"Standard") {
793 if ($this->form_gui->checkInput()) {
795 include_once(
"./Services/News/classes/class.ilNewsItem.php");
797 $mob_id = $mc_item->getMobId();
800 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
805 if ($this->form_gui->getInput(
"delete_" . $purpose)) {
806 $mob->removeMediaItem($purpose);
807 $ilLog->write(
"Mcst: deleting purpose $purpose");
810 $media_item = $mob->getMediaItem($purpose);
811 $url_gui = $this->form_gui->getInput(
"url_" . $purpose);
812 $file_gui = $this->form_gui->getInput(
"file_" . $purpose);
814 if ($media_item == null) {
815 if ($purpose !=
"Standard" &&
816 ($url_gui || $file_gui[
"size"]>0)) {
825 if ($purpose ==
"Standard") {
827 $title = $this->form_gui->getInput(
"title") !=
"" ? $this->form_gui->getInput(
"title") : basename(
$file);
828 $description = $this->form_gui->getInput(
"description");
833 $prevpic = $this->form_gui->getInput(
"preview_pic");
834 if ($prevpic[
"size"] > 0) {
835 $mob->uploadVideoPreviewPic($prevpic);
837 $prevpici = $this->form_gui->getItemByPostVar(
"preview_pic");
838 if ($prevpici->getDeletionFlag()) {
839 $mob->removeAdditionalFile($mob->getVideoPreviewPic(
true));
853 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
855 $mc_item->setUserId(
$ilUser->getId());
856 if (isset($duration)) {
857 $mc_item->setPlaytime($duration);
859 $mc_item->setTitle(
$title);
861 if ($enable_internal_rss) {
862 $mc_item->setVisibility($this->form_gui->getInput(
"visibility"));
866 $ilCtrl->redirect($this,
"listItems");
883 $ilTabs->activateTab(
"edit_content");
885 if (!is_array(
$_POST[
"item_id"])) {
890 include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
894 $c_gui->setFormAction(
$ilCtrl->getFormAction($this,
"deleteItems"));
895 $c_gui->setHeaderText(
$lng->txt(
"info_delete_sure"));
896 $c_gui->setCancel(
$lng->txt(
"cancel"),
"listItems");
897 $c_gui->setConfirm(
$lng->txt(
"confirm"),
"deleteItems");
900 include_once(
"./Services/News/classes/class.ilNewsItem.php");
901 foreach (
$_POST[
"item_id"] as $item_id) {
911 $tpl->setContent($c_gui->getHTML());
924 foreach (
$_POST[
"item_id"] as $item_id) {
929 $ilCtrl->redirect($this,
"listItems");
941 if (!$news_item->deliverMobFile(
$_GET[
"purpose"], (
int)
$_GET[
"presentation"])) {
942 $ilCtrl->redirect($this,
"listItems");
945 $this->
object->handleLPUpdate(
$ilUser->getId(), $news_item->getMobId());
959 $mob = $mc_item->getMobId();
960 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
963 $m_item = $mob->getMediaItem(
"Standard");
964 $file = $mob_dir .
"/" . $m_item->getLocation();
966 if ($duration !=
"00:00:00") {
967 $mc_item->setPlaytime($duration);
974 $ilCtrl->redirect($this,
"listItems");
987 $this->ctrl->setCmd(
"showSummary");
988 $this->ctrl->setCmdClass(
"ilinfoscreengui");
1001 $ilTabs->activateTab(
"id_info");
1007 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
1010 $info->enablePrivateNotes();
1013 $this->lng->loadLanguageModule(
"meta");
1014 $this->lng->loadLanguageModule(
"mcst");
1015 $med_items = $this->
object->getItemsArray();
1016 $info->addSection($this->lng->txt(
"meta_general"));
1018 $this->lng->txt(
"mcst_nr_items"),
1019 (int) count($med_items)
1022 if (count($med_items) > 0) {
1023 $cur = current($med_items);
1029 $info->addProperty($this->lng->txt(
"mcst_last_submission"), $last);
1032 $this->ctrl->forwardCommand(
$info);
1046 $ilHelp->setScreenIdComponent(
"mcst");
1049 if ($ilAccess->checkAccess(
'read',
"", $this->object->getRefId())) {
1052 $lng->txt(
"content"),
1053 $this->ctrl->getLinkTarget($this,
"showContent")
1058 if ($ilAccess->checkAccess(
'visible',
"", $this->object->getRefId()) ||
1059 $ilAccess->checkAccess(
'read',
"", $this->object->getRefId())) {
1062 $lng->txt(
"info_short"),
1063 $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary")
1068 if ($ilAccess->checkAccess(
'write',
"", $this->object->getRefId())) {
1071 $lng->txt(
"settings"),
1072 $this->ctrl->getLinkTarget($this,
"editSettings")
1076 require_once
'Services/Tracking/classes/class.ilLearningProgressAccess.php';
1079 'learning_progress',
1080 $lng->txt(
'learning_progress'),
1081 $this->ctrl->getLinkTargetByClass(
array(__CLASS__,
'illearningprogressgui'),
'')
1086 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
1089 $lng->txt(
"export"),
1090 $this->ctrl->getLinkTargetByClass(
"ilexportgui",
"")
1095 if ($ilAccess->checkAccess(
'edit_permission',
"", $this->object->getRefId())) {
1098 $lng->txt(
"perm_settings"),
1099 $this->ctrl->getLinkTargetByClass(
"ilpermissiongui",
"perm")
1119 $this->ctrl->getLinkTarget($this,
"showContent")
1122 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"])) {
1125 $lng->txt(
"mcst_manage"),
1126 $this->ctrl->getLinkTarget($this,
"listItems")
1132 $lng->txt(
"mcst_ordering"),
1133 $this->ctrl->getLinkTarget($this,
"editOrder")
1138 $ilTabs->activateSubTab($a_active);
1139 $ilTabs->activateTab(
"content");
1152 $ilTabs->activateTab(
"id_settings");
1155 $tpl->setContent($this->form_gui->getHtml());
1167 $lng->loadLanguageModule(
"mcst");
1169 require_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1171 $this->form_gui->setTitle(
$lng->txt(
"mcst_settings"));
1176 $tit->setRequired(
true);
1177 $this->form_gui->addItem($tit);
1182 $this->form_gui->addItem($des);
1185 $sh->setTitle(
$lng->txt(
"rep_activation_availability"));
1186 $this->form_gui->addItem($sh);
1191 $this->form_gui->addItem($online);
1195 $sh->setTitle(
$lng->txt(
"obj_presentation"));
1196 $this->form_gui->addItem($sh);
1201 $lng->txt(
"mcst_ordering_title"),
1205 $lng->txt(
"mcst_ordering_creation_date_asc"),
1209 $lng->txt(
"mcst_ordering_creation_date_desc"),
1213 $lng->txt(
"mcst_ordering_manual"),
1216 $sort->setValue($this->
object->getOrder());
1217 $this->form_gui->addItem($sort);
1226 $lng->txt(
"mcst_list"),
1230 $lng->txt(
"mcst_gallery"),
1235 $si->setValue($this->
object->getViewMode());
1236 $this->form_gui->addItem($si);
1242 $downloadable->setInfo(
$lng->txt(
"mcst_downloadable_info"));
1243 $this->form_gui->addItem($downloadable);
1246 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
1249 if ($enable_internal_rss) {
1252 $sh->setTitle(
$lng->txt(
"mcst_webfeed"));
1253 $this->form_gui->addItem($sh);
1257 $radio_option->
setInfo(
$lng->txt(
"news_news_item_def_visibility_users_info"));
1258 $radio_group->addOption($radio_option);
1260 $radio_option->
setInfo(
$lng->txt(
"news_news_item_def_visibility_public_info"));
1261 $radio_group->addOption($radio_option);
1262 $radio_group->setRequired(
false);
1263 $radio_group->setValue($this->
object->getDefaultAccess());
1264 #$ch->addSubItem($radio_group); 1265 $this->form_gui->addItem($radio_group);
1268 include_once(
"./Services/Block/classes/class.ilBlockSetting.php");
1272 $ch->setChecked($public_feed);
1273 $this->form_gui->addItem($ch);
1276 $ni =
new ilNumberInputGUI($this->lng->txt(
"news_keep_minimal_x_items"),
"keep_rss_min");
1278 $ni->setMinValue(0);
1279 $ni->setMaxLength(3);
1281 $ni->setInfo($this->lng->txt(
"news_keep_minimal_x_items_info") .
" (" .
1284 $ch->addSubItem($ni);
1289 $incl_files->setInfo(
$lng->txt(
"mcst_incl_files_in_rss_info"));
1290 #$ch->addSubItem($incl_files); 1291 $this->form_gui->addItem($incl_files);
1295 $this->form_gui->addCommandButton(
"saveSettings",
$lng->txt(
"save"));
1296 $this->form_gui->setFormAction(
$ilCtrl->getFormAction($this,
"saveSettings"));
1308 $ilTabs->activateTab(
"id_settings");
1311 if ($this->form_gui->checkInput()) {
1313 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
1315 $this->
object->setTitle($this->form_gui->getInput(
"title"));
1316 $this->
object->setDescription($this->form_gui->getInput(
"description"));
1317 $this->
object->setOnline($this->form_gui->getInput(
"online"));
1318 $this->
object->setDownloadable($this->form_gui->getInput(
"downloadable"));
1319 $this->
object->setOrder($this->form_gui->getInput(
"order"));
1320 $this->
object->setViewMode($this->form_gui->getInput(
"viewmode"));
1322 if ($enable_internal_rss) {
1323 $this->
object->setPublicFiles($this->form_gui->getInput(
"public_files"));
1324 $this->
object->setDefaultAccess($this->form_gui->getInput(
"defaultaccess"));
1326 $this->
object->update();
1328 if ($enable_internal_rss) {
1329 include_once(
"./Services/Block/classes/class.ilBlockSetting.php");
1333 $this->form_gui->getInput(
"extra_feed"),
1335 $this->
object->getId()
1341 $this->form_gui->getInput(
"keep_rss_min"),
1343 $this->
object->getId()
1348 $ilCtrl->redirect($this,
"editSettings");
1350 $this->form_gui->setValuesByPost();
1351 $this->tpl->setContent($this->form_gui->getHTML());
1360 if (is_object($this->
object)) {
1361 $ilLocator->addItem($this->
object->getTitle(), $this->ctrl->getLinkTarget($this,
"listItems"),
"",
$_GET[
"ref_id"]);
1369 $ilAccess = $DIC->access();
1371 $lng = $DIC->language();
1373 if ($ilAccess->checkAccess(
"read",
"", $a_target)) {
1374 $_GET[
"cmd"] =
"showContent";
1375 $_GET[
"ref_id"] = $a_target;
1376 $_GET[
"baseClass"] =
"ilmediacasthandlergui";
1377 $_GET[
"cmdClass"] =
"ilobjmediacastgui";
1378 include(
"ilias.php");
1380 } elseif ($ilAccess->checkAccess(
"visible",
"", $a_target)) {
1382 } elseif ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID)) {
1384 $lng->txt(
"msg_no_perm_read_item"),
1401 return strpos($extension,
"audio") !==
false;
1412 include_once(
"./Services/News/classes/class.ilNewsItem.php");
1415 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
1428 include_once(
"./Services/News/classes/class.ilNewsItem.php");
1431 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
1444 if (
$_POST[
"value_" . $purpose]) {
1445 $_POST[
"label_value_" . $purpose] =
$_POST[
"value_" . $purpose];
1449 $this->form_gui->setValuesByPost();
1450 $tpl->setContent($this->form_gui->getHTML());
1460 $ilTabs->activateTab(
"edit_content");
1465 switch ($this->
object->getOrder()) {
1476 include_once(
"./Modules/MediaCast/classes/class.ilMediaCastTableGUI.php");
1479 $table_gui->setTitle(
$lng->txt(
"mcst_media_cast"));
1480 $table_gui->setData($this->
object->getSortedItemsArray());
1482 $table_gui->addCommandButton(
"saveOrder",
$lng->txt(
"mcst_save_order"));
1484 $tpl->setContent($table_gui->getHTML());
1491 asort(
$_POST[
"item_id"]);
1494 foreach (array_keys(
$_POST[
"item_id"]) as
$id) {
1497 $this->
object->saveOrder($items);
1500 $this->ctrl->redirect($this,
"editOrder");
1518 require_once
'Services/Tracking/classes/class.ilChangeEvent.php';
1521 $this->
object->getRefId(),
1522 $this->
object->getId(),
1532 $tpl->setPermanentLink($this->
object->getType(), $this->
object->getRefId());
1541 $tpl->addJavascript(
"./Modules/MediaCast/js/MediaCast.js");
1543 $ilTabs->activateTab(
"content");
1547 $ctpl =
new ilTemplate(
"tpl.mcst_content.html",
true,
true,
"Modules/MediaCast");
1549 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
1550 require_once(
'./Services/WebAccessChecker/classes/class.ilWACSignedPath.php');
1551 foreach ($this->
object->getSortedItemsArray() as $item) {
1553 $med = $mob->getMediaItem(
"Standard");
1555 $ctpl->setCurrentBlock(
"item");
1556 $ctpl->setVariable(
"TITLE", $item[
"title"]);
1557 $ctpl->setVariable(
"TIME", $item[
"playtime"]);
1558 $ctpl->setVariable(
"ID", $item[
"id"]);
1560 if ($mob->getVideoPreviewPic() !=
"") {
1573 if (is_object($med)) {
1574 include_once(
"./Services/MediaObjects/classes/class.ilMediaPlayerGUI.php");
1579 $ilCtrl->getLinkTarget($this,
"handlePlayerEvent",
"",
true,
false)
1582 if (strcasecmp(
"Reference", $med->getLocationType()) == 0) {
1584 $mpl->setFile($med->getLocation());
1588 $mpl->setFile($path_to_file);
1590 $mpl->setMimeType($med->getFormat());
1592 $mpl->setDisplayHeight(
"480");
1593 $mpl->setDisplayWidth(
"640");
1595 $mpl->setTitle($item[
"title"]);
1596 $mpl->setDescription($item[
"content"]);
1597 $mpl->setForceAudioPreview(
true);
1598 if ($this->
object->getDownloadable()) {
1599 $ilCtrl->setParameterByClass(
"ilobjmediacastgui",
"item_id", $item[
"id"]);
1600 $ilCtrl->setParameterByClass(
"ilobjmediacastgui",
"purpose",
"Standard");
1601 $mpl->setDownloadLink(
$ilCtrl->getLinkTargetByClass(
"ilobjmediacastgui",
"downloadItem"));
1603 $med_alt = $mob->getMediaItem(
"VideoAlternative");
1604 if (is_object($med_alt)) {
1606 $med_alt->getLocation()));
1607 $mpl->setAlternativeVideoMimeType($med_alt->getFormat());
1610 $ctpl->setVariable(
"PLAYER", $mpl->getPreviewHtml());
1614 $ctpl->parseCurrentBlock();
1619 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");
1646 include_once(
"./Services/MediaObjects/classes/class.ilFFmpeg.php");
1647 $med = $mob->getMediaItem(
"Standard");
1651 $pi = pathinfo($new_file);
1652 $med = $mob->getMediaItem($target_purpose);
1653 if (!is_object($med)) {
1655 $med->setMobId($mob->getId());
1656 $mob->addMediaItem($med);
1658 $med->setPurpose($target_purpose);
1660 $med->setFormat($target_format);
1661 $med->setLocation($pi[
"basename"]);
1662 $med->setLocationType(
"LocalFile");
1665 $add = (is_array(
$ret) && count(
$ret) > 0)
1666 ?
"<br />" . implode(
$ret,
"<br />")
1672 $add = (is_array(
$ret) && count(
$ret) > 0)
1673 ?
"<br />" . implode(
$ret,
"<br />")
1679 $ilCtrl->redirect($this,
"editCastItem");
1695 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
1699 $sec = (int)
$_POST[
"sec"];
1703 if ($mob->getVideoPreviewPic() !=
"") {
1704 $mob->removeAdditionalFile($mob->getVideoPreviewPic(
true));
1706 include_once(
"./Services/MediaObjects/classes/class.ilFFmpeg.php");
1707 $med = $mob->getMediaItem(
"Standard");
1716 if ($new_file !=
"") {
1724 $add = (is_array(
$ret) && count(
$ret) > 0)
1725 ?
"<br />" . implode(
$ret,
"<br />")
1732 $ilCtrl->redirect($this,
"editCastItem");
1743 if (
$_GET[
"event"] ==
"play") {
1744 $player = explode(
"_",
$_GET[
"player"]);
1745 $news_id = (int) $player[1];
1746 include_once(
"./Services/News/classes/class.ilNewsItem.php");
1748 $item->increasePlayCounter();
1750 $mob_id = $item->getMobId();
1753 $this->
object->handleLPUpdate(
$ilUser->getId(), $mob_id);
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
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.
This class represents an option in a radio group.
static getLastReturnValues()
Get last return values.
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 formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date public.
if(!array_key_exists('StateId', $_REQUEST)) $id
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 getASCIIFilename($a_filename)
convert utf8 to ascii filename
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static signFolderOfStartFile($start_file_path)
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
static extractImage( $a_file, $a_target_filename, $a_target_dir="", $a_sec=1)
Extract image from video file.
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)
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.
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)
addHeaderAction()
Add header action menu.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
Class ilObjUserTrackingGUI.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
Confirmation screen class.
static supportsImageExtraction($a_mime)
Check if mime type supports image extraction.