39 protected \ILIAS\MediaObjects\MediaType\MediaTypeManager
$media_type;
40 protected \ILIAS\MediaCast\InternalGUIService
$gui;
58 bool $a_call_by_reference,
59 bool $a_prepare_output =
true 63 $this->
ctrl = $DIC->ctrl();
64 $this->
lng = $DIC->language();
65 $this->
user = $DIC->user();
66 $this->
tabs = $DIC->tabs();
67 $this->tpl = $DIC[
"tpl"];
68 $this->
access = $DIC->access();
69 $this->
toolbar = $DIC->toolbar();
71 $this->log = $DIC[
"ilLog"];
72 $this->
help = $DIC[
"ilHelp"];
73 $this->
locator = $DIC[
"ilLocator"];
74 $ilCtrl = $DIC->ctrl();
75 $lng = $DIC->language();
76 $this->mc_request = $DIC->mediaCast()
87 $ilCtrl->saveParameter($this,
"item_id");
92 $this->mc_manager = $DIC->mediaCast()->internal()
93 ->domain()->mediaCast($this->
object);
95 $this->gui = $DIC->mediaCast()->internal()->gui();
96 $this->media_type = $DIC->mediaObjects()->internal()->domain()->mediaType();
97 $this->video_gui = $DIC->mediaObjects()->internal()->gui()->video();
98 $this->mob_player_gui = $DIC->mediaObjects()->internal()->gui()->player();
106 $next_class = $this->
ctrl->getNextClass($this);
107 $cmd = $this->
ctrl->getCmd();
110 switch ($next_class) {
111 case "ilmediacreationgui":
114 $this->
ctrl->setReturn($this,
"listItems");
115 $ilTabs->activateTab(
"content");
118 switch ($this->
object->getViewMode()) {
131 },
function ($mob_id, $long_desc) {
133 },
function ($mob_ids) {
135 },
function ($mob_id) {
137 },
function ($mob_id) {
140 $this->
ctrl->forwardCommand($creation);
143 case "ilinfoscreengui":
152 $ilTabs->activateTab(
"export");
154 $exp_gui->addFormat(
"xml");
155 $ret = $this->
ctrl->forwardCommand($exp_gui);
159 case 'ilpermissiongui':
160 $ilTabs->activateTab(
"id_permissions");
162 $ret = $this->
ctrl->forwardCommand($perm_gui);
165 case 'ilobjectcopygui':
167 $cp->setType(
'mcst');
168 $this->
ctrl->forwardCommand($cp);
171 case "ilcommonactiondispatchergui":
173 $this->
ctrl->forwardCommand($gui);
176 case "illearningprogressgui":
177 $ilTabs->activateTab(
'learning_progress');
180 $this->
object->getRefId(),
181 $this->mc_request->getUserId() ?: $ilUser->getId()
183 $this->
ctrl->forwardCommand($new_gui);
184 $this->tabs_gui->setTabActive(
'learning_progress');
187 case "mcstimagegallerygui":
188 $view = new \McstImageGalleryGUI($this->
object, $this->tpl, $this->
getFeedLink());
189 $this->
ctrl->forwardCommand($view);
192 case "mcstpodcastgui":
193 $view = new \McstPodcastGUI($this->
object, $this->tpl, $this->
getFeedLink());
194 $this->
ctrl->forwardCommand($view);
197 case strtolower(ilCommentGUI::class):
201 case strtolower(ilObjectMetaDataGUI::class):
203 $ilTabs->activateTab(
"meta_data");
205 $this->
ctrl->forwardCommand($gui);
208 case strtolower(SettingsGUI::class):
210 $ilTabs->activateTab(
"id_settings");
211 $gui = $this->gui->settings()->settingsGUI(
213 $this->
object->getRefId()
215 $this->
ctrl->forwardCommand($gui);
223 if ($cmd !=
"infoScreenObject") {
238 $this->error->raiseError($this->
lng->txt(
"msg_no_perm_write"), $this->error->MESSAGE);
241 $this->
ctrl->redirectByClass(SettingsGUI::class,
"");
248 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"object_added"),
true);
249 ilUtil::redirect(
"ilias.php?baseClass=ilMediaCastHandlerGUI&ref_id=" . $new_object->
getRefId() .
"&cmd=editSettings");
261 if ($a_presentation_mode) {
262 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"mcst_view_abandoned"));
266 if ($a_presentation_mode) {
272 $med_items = $this->
object->getSortedItemsArray();
274 if ($a_presentation_mode) {
280 $table_gui->setData($med_items);
282 if ($ilAccess->checkAccess(
"write",
"", $this->requested_ref_id) && !$a_presentation_mode) {
283 if (in_array($this->
object->getViewMode(), [
288 $ilToolbar->addButton(
$lng->
txt(
"add"), $this->
ctrl->getLinkTargetByClass(
"ilMediaCreationGUI",
""));
290 $ilToolbar->addButton(
$lng->
txt(
"add"), $this->
ctrl->getLinkTarget($this,
"addCastItem"));
293 $table_gui->addMultiCommand(
"confirmDeletionItems",
$lng->
txt(
"delete"));
294 $table_gui->setSelectAllCheckbox(
"item_id");
301 window.addEventListener(
'load', (
event) => {
302 $(document).on(
'hidden.bs.modal', (e) => {
303 $(
'.modal-body').
html(
'');
305 $(document).on(
'shown.bs.modal', (e) => {
306 window.dispatchEvent(
new Event(
'resize'));
311 $tpl->
setContent($this->gui->ui()->renderer()->render($new_table->get()) . $script);
317 $new_table->handleCommand();
322 return $this->gui->getMediaCastManageTableGUI($this,
"tableCommand");
337 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
338 if ($enable_internal_rss) {
360 $item_id = $this->mc_request->getItemId();
361 $this->
ctrl->setParameterByClass(self::class,
"item_id", $item_id);
370 $this->mc_request->getItemId()
374 $this->video_gui->addPreviewExtractionToToolbar(
375 $this->mcst_item->getMobId(),
386 foreach ($this->
object->getSortedItemsArray() as $item) {
387 if ($mob_id == $item[
"mob_id"]) {
388 $this->
ctrl->setParameter($this,
"item_id", $item[
"id"]);
389 $this->
ctrl->redirect($this,
"editCastItem");
392 $this->
ctrl->redirect($this,
"listItems");
397 foreach ($this->
object->getSortedItemsArray() as $item) {
398 if ($mob_id == $item[
"mob_id"]) {
401 $mc_item->setTitle($mob->getTitle());
402 $mc_item->setContent($mob->getLongDescription());
415 $ilTabs->activateTab(
"edit_content");
420 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
423 $this->form_gui->setMultipart(
true);
427 $text_input->setMaxLength(200);
428 $this->form_gui->addItem($text_input);
433 $this->form_gui->addItem($text_area);
436 if ($enable_internal_rss) {
439 $radio_group->addOption($radio_option);
441 $radio_group->addOption($radio_option);
443 $radio_group->setRequired(
true);
444 $radio_group->setValue($this->
object->getDefaultAccess() == 0 ?
"users" :
"public");
445 $this->form_gui->addItem($radio_group);
452 $dur->setShowDays(
false);
453 $dur->setShowHours(
true);
454 $dur->setShowSeconds(
true);
455 $this->form_gui->addItem($dur);
459 if ($purpose ==
"VideoAlternative" &&
460 $a_mode ==
"create") {
465 $section->setTitle(
$lng->
txt(
"mcst_" . strtolower($purpose) .
"_title"));
466 $this->form_gui->addItem($section);
467 if ($a_mode !=
"create") {
470 $label->setPostVar(
"label_value_" . $purpose);
471 $label->setInfo(
$lng->
txt(
"mcst_current_value_info"));
472 $this->form_gui->addItem($label);
473 $this->form_gui->addItem($value);
476 $file->
setSuffixes($this->mc_manager->getSuffixesForViewMode(
477 $this->object->getViewMode()
479 $this->form_gui->addItem($file);
482 $text_input->setInfo(
$lng->
txt(
"mcst_reference_info"));
483 $this->form_gui->addItem($text_input);
484 if ($purpose !=
"Standard") {
486 $clearCheckBox->setPostVar(
"delete_" . $purpose);
487 $clearCheckBox->setTitle(
$lng->
txt(
"mcst_clear_purpose_title"));
488 $this->form_gui->addItem($clearCheckBox);
492 $this->form_gui->addItem($ne);
496 if ($a_mode !==
"create") {
497 $mcst_item =
new ilNewsItem($this->mc_request->getItemId());
500 $this->video_gui->addPreviewInput($this->form_gui, $mob_id);
505 if ($a_mode ==
"create") {
506 $this->form_gui->setTitle(
$lng->
txt(
"mcst_add_new_item"));
507 $this->form_gui->addCommandButton(
"saveCastItem",
$lng->
txt(
"save"));
509 $this->form_gui->setTitle(
$lng->
txt(
"mcst_edit_item"));
510 $this->form_gui->addCommandButton(
"updateCastItem",
$lng->
txt(
"save"));
512 $this->form_gui->addCommandButton(
"listItems",
$lng->
txt(
"cancel"));
513 $this->form_gui->setFormAction($ilCtrl->getFormAction($this,
"saveCastItem"));
531 $this->mc_request->getItemId()
533 if (count($mediaItems) > 0) {
534 foreach ($mediaItems as $med) {
535 if (!isset($values[
"title"])) {
537 $values[
"title"] = $this->mcst_item->
getTitle();
538 $values[
"description"] = $this->mcst_item->getContent();
539 $values[
"visibility"] = $this->mcst_item->getVisibility();
540 $length = explode(
":", $this->mcst_item->getPlaytime());
541 $values[
"duration"] = array(
"hh" => $length[0],
"mm" => $length[1],
"ss" => $length[2]);
544 $values[
"value_" . $med->getPurpose()] = (strlen($med->getLocation()) > 100) ?
"..." . substr($med->getLocation(), strlen($med->getLocation()) - 100) : $med->getLocation();
545 $values[
"label_value_" . $med->getPurpose()] = (strlen($med->getLocation()) > 100) ?
"..." . substr($med->getLocation(), strlen($med->getLocation()) - 100) : $med->getLocation();
546 $values[
"mimetype_" . $med->getPurpose()] = $med->getFormat();
550 if (!isset($values[
"value_" . $purpose])) {
551 $values[
"label_value_" . $purpose] =
$lng->
txt(
"none");
552 $values[
"value_" . $purpose] =
$lng->
txt(
"none");
555 $this->form_gui->setValuesByArray($values);
568 $ilTabs->activateTab(
"edit_content");
572 if (!$this->form_gui->checkInput() ||
573 ($this->form_gui->getInput(
"url_Standard") ==
"" && !$_FILES[
'file_Standard'][
'tmp_name'])) {
574 $this->tpl->setOnScreenMessage(
'failure',
$lng->
txt(
"mcst_input_either_file_or_url"));
586 $title = $this->form_gui->getInput(
"title") !=
"" ? $this->form_gui->getInput(
"title") : basename($file);
587 $description = $this->form_gui->getInput(
"description");
588 $mob->setTitle($title);
589 $mob->setDescription($description);
592 $this->video_gui->savePreviewInput($this->form_gui, $mob->getId());
598 foreach ($this->additionalPurposes as $purpose) {
600 $file_gui = $this->form_gui->getInput(
"file_" . $purpose);
601 $url_gui = $this->form_gui->getInput(
"url_" . $purpose);
602 if ($url_gui || $file_gui[
"size"] > 0) {
609 if ($prevpic[
"size"] == 0) {
612 $mob->generatePreviewPic(320, 240);
620 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
624 $mc_item->setMobId($mob->getId());
626 $mc_item->setContextObjId($this->
object->getId());
627 $mc_item->setContextObjType($this->
object->getType());
628 $mc_item->setUserId($ilUser->getId());
630 $mc_item->setTitle($title);
631 $mc_item->setContent($description);
632 $mc_item->setLimitation(
false);
633 if ($enable_internal_rss) {
634 $mc_item->setVisibility($this->form_gui->getInput(
"visibility"));
636 $mc_item->setVisibility(
"users");
640 $ilCtrl->redirect($this,
"listItems");
647 ? $this->form_gui->getInput(
"duration")
648 : array(
"hh" => 0,
"mm" => 0,
"ss" => 0);
650 $duration_str = str_pad(
$duration[
"hh"], 2,
"0", STR_PAD_LEFT) .
":" .
651 str_pad(
$duration[
"mm"], 2,
"0", STR_PAD_LEFT) .
":" .
652 str_pad(
$duration[
"ss"], 2,
"0", STR_PAD_LEFT);
658 $duration_str = $this->
object->getPlaytimeForSeconds(
$d);
662 return $duration_str;
674 $mediaItem->setPurpose($purpose);
694 $url_gui = $this->form_gui->getInput(
"url_" . $purpose);
695 $file_gui = $this->form_gui->getInput(
"file_" . $purpose);
698 $file = $this->form_gui->getInput(
"url_" . $purpose);
699 $title = basename($file);
700 $location = $this->form_gui->getInput(
"url_" . $purpose);
701 $locationType =
"Reference";
702 } elseif ($file_gui[
"size"] > 0) {
706 if (!is_dir($mob_dir)) {
709 $dir = LegacyPathHelper::createRelativePath($mob_dir);
710 $old_files = $this->
filesystem->finder()->in([$dir])->exclude([$dir .
'/mob_vpreview.png'])->files();
711 foreach ($old_files as $file) {
717 $file_name = str_replace(
" ",
"_", $file_name);
719 $file = $mob_dir .
"/" . $file_name;
721 $locationType =
"LocalFile";
733 if ($format ===
"") {
742 $mediaItem->
setHeight(self::isAudio($format) ? 0 : 180);
743 $mob->generatePreviewPic(320, 240);
746 if (($purpose ===
"Standard") && isset($title)) {
769 if ($this->form_gui->checkInput()) {
772 $this->mc_request->getItemId()
781 if ($this->form_gui->getInput(
"delete_" . $purpose)) {
782 $mob->removeMediaItem($purpose);
783 $ilLog->write(
"Mcst: deleting purpose $purpose");
786 $media_item = $mob->getMediaItem($purpose);
787 $url_gui = $this->form_gui->getInput(
"url_" . $purpose);
788 $file_gui = $this->form_gui->getInput(
"file_" . $purpose);
790 if ($media_item ==
null) {
791 if ($purpose !=
"Standard" &&
792 ($url_gui || $file_gui[
"size"] > 0)) {
801 if ($purpose ==
"Standard") {
805 $title = $this->form_gui->getInput(
"title") !=
"" ? $this->form_gui->getInput(
"title") : basename($file);
806 $description = $this->form_gui->getInput(
"description");
808 $mob->setTitle($title);
809 $mob->setDescription($description);
811 $this->video_gui->savePreviewInput($this->form_gui, $mob->getId());
823 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
825 $mc_item->setUserId($ilUser->getId());
829 $seconds = ((
int) $dur_arr[0] * 60 * 60) + ((
int) $dur_arr[1] * 60) + ((
int) $dur_arr[2]);
830 $st_med = $mob->getMediaItem(
"Standard");
831 $st_med->setDuration($seconds);
834 $mc_item->setTitle($title);
835 $mc_item->setContent($description);
836 if ($enable_internal_rss) {
837 $mc_item->setVisibility($this->form_gui->getInput(
"visibility"));
841 $ilCtrl->redirect($this,
"listItems");
849 $f = $this->gui->ui()->factory();
850 $item_id = $this->mc_request->getItemId();
856 $file = $mob->getStandardSrc();
857 if ($this->media_type->isAudio($med->getFormat())) {
858 $comp =
$f->player()->audio($file,
"");
859 } elseif ($this->media_type->isVideo($med->getFormat())) {
860 $comp =
$f->player()->video($file);
861 } elseif ($this->media_type->isImage($med->getFormat())) {
862 $comp =
$f->image()->responsive($file, $mob->getTitle());
866 if (is_null($comp)) {
867 $comp =
$f->messageBox()->info($this->
lng->txt(
"mcst_item_not_found"));
870 $this->
lng->txt(
"mcst_preview"),
871 $this->
lng->txt(
"close")
872 )->content([$comp])->send();
878 $f = $this->gui->ui()->factory();
879 $r = $this->gui->ui()->renderer();
880 $ids = $this->mc_request->getItemIds();
881 if (current($ids) ===
'ALL_OBJECTS') {
882 $arr = $this->
object->getSortedItemsArray();
883 $ids = array_keys($arr);
886 foreach ($ids as
$id) {
888 $items[] =
$f->modal()->interruptiveItem()->keyValue($id,
"", $item->getTitle());
890 $this->gui->send(
$r->renderAsync([
891 $f->modal()->interruptive(
892 $this->
lng->txt(
"mcst_confirm_deletion"),
893 $this->
lng->txt(
"info_delete_sure"),
894 $this->
ctrl->getFormAction($this,
"deleteItems")
895 )->withAffectedItems($items)
907 $ilTabs->activateTab(
"edit_content");
909 $ids = $this->mc_request->getItemIds();
910 if (count($ids) == 0) {
918 $c_gui->setFormAction($ilCtrl->getFormAction($this,
"deleteItems"));
919 $c_gui->setHeaderText(
$lng->
txt(
"info_delete_sure"));
920 $c_gui->setCancel(
$lng->
txt(
"cancel"),
"listItems");
921 $c_gui->setConfirm(
$lng->
txt(
"confirm"),
"deleteItems");
924 foreach ($ids as $item_id) {
944 $ids = $this->mc_request->getItemIds();
945 foreach ($ids as $item_id) {
949 $this->
object->saveOrder(
array_map(
function ($i) {
951 }, $this->
object->readItems()));
952 $ilCtrl->redirect($this,
"listItems");
964 $news_item =
new ilNewsItem($this->mc_request->getItemId());
965 $this->
object->handleLPUpdate($ilUser->getId(), $news_item->getMobId());
966 if (!$news_item->deliverMobFile(
968 $this->mc_request->getPresentation()
970 $ilCtrl->redirect($this,
"showContent");
980 $mc_item =
new ilNewsItem($this->mc_request->getItemId());
984 $m_item = $mob->getMediaItem(
"Standard");
988 $m_item->determineDuration();
989 $dur = $m_item->getDuration();
994 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"mcst_set_playtime"),
true);
998 $this->tpl->setOnScreenMessage(
'failure',
$lng->
txt(
"mcst_unable_to_determin_playtime"),
true);
1001 $ilCtrl->redirect($this,
"listItems");
1012 $this->
ctrl->redirectByClass(ilInfoScreenGUI::class,
"showSummary");
1027 $info->addMetaDataSections($this->
object->getId(), 0, $this->
object->getType());
1028 $info->enablePrivateNotes();
1031 $this->
lng->loadLanguageModule(
"meta");
1032 $this->
lng->loadLanguageModule(
"mcst");
1033 $med_items = $this->
object->getItemsArray();
1034 $info->addSection($this->
lng->txt(
"meta_general"));
1036 $this->
lng->txt(
"mcst_nr_items"),
1040 if (count($med_items) > 0) {
1041 $cur = current($med_items);
1047 $info->addProperty($this->
lng->txt(
"mcst_last_submission"), $last);
1063 if ($ilAccess->checkAccess(
'read',
"", $this->object->getRefId())) {
1067 $this->
ctrl->getLinkTarget($this,
"showContent")
1072 if ($ilAccess->checkAccess(
'visible',
"", $this->object->getRefId()) ||
1073 $ilAccess->checkAccess(
'read',
"", $this->object->getRefId())) {
1077 $this->
ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary")
1082 if ($ilAccess->checkAccess(
'write',
"", $this->object->getRefId())) {
1086 $this->
ctrl->getLinkTargetByClass(SettingsGUI::class,
"")
1092 'learning_progress',
1093 $lng->
txt(
'learning_progress'),
1094 $this->
ctrl->getLinkTargetByClass(array(__CLASS__,
'illearningprogressgui'),
'')
1098 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
1100 $mdtab = $mdgui->getTab();
1102 $this->tabs_gui->addTab(
1104 $this->
lng->txt(
"meta_data"),
1111 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
1115 $this->
ctrl->getLinkTargetByClass(
"ilexportgui",
"")
1120 if ($ilAccess->checkAccess(
'edit_permission',
"", $this->object->getRefId())) {
1124 $this->
ctrl->getLinkTargetByClass(
"ilpermissiongui",
"perm")
1130 string $a_active =
"content" 1139 $this->
ctrl->getLinkTarget($this,
"showContent")
1142 if ($ilAccess->checkAccess(
"write",
"", $this->requested_ref_id)) {
1146 $this->
ctrl->getLinkTarget($this,
"listItems")
1153 $this->
ctrl->getLinkTarget($this,
"editOrder")
1158 $ilTabs->activateSubTab($a_active);
1159 $ilTabs->activateTab(
"content");
1171 if (is_object($this->
object)) {
1176 public static function _goto(
string $a_target): void
1179 $main_tpl = $DIC->ui()->mainTemplate();
1181 $ilAccess = $DIC->access();
1182 $lng = $DIC->language();
1183 $ctrl = $DIC->ctrl();
1185 if ($ilAccess->checkAccess(
"read",
"", $a_target)) {
1189 } elseif ($ilAccess->checkAccess(
"visible",
"", $a_target)) {
1192 $main_tpl->setOnScreenMessage(
'failure', sprintf(
1193 $lng->
txt(
"msg_no_perm_read_item"),
1202 protected static function isAudio(
string $extension): bool
1204 return strpos($extension,
"audio") !==
false;
1229 $this->form_gui->setValuesByPost();
1236 if ($this->form_gui->getInput(
"value_" . $purpose)) {
1237 $input = $this->form_gui->getItemByPostVar(
"label_value_" . $purpose);
1238 $input->setValue($this->form_gui->getInput(
"value_" . $purpose));
1242 $this->form_gui->setValuesByPost();
1253 $ilTabs->activateTab(
"edit_content");
1258 switch ($this->
object->getOrder()) {
1272 $table_gui->setTitle(
$lng->
txt(
"mcst_media_cast"));
1273 $table_gui->setData($this->
object->getSortedItemsArray());
1275 $table_gui->addCommandButton(
"saveOrder",
$lng->
txt(
"mcst_save_order"));
1284 $ids = $this->mc_request->getItemIds();
1288 foreach (array_keys($ids) as
$id) {
1291 $this->
object->saveOrder($items);
1293 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"settings_saved"),
true);
1294 $this->
ctrl->redirect($this,
"editOrder");
1310 $this->
object->getRefId(),
1311 $this->
object->getId(),
1321 $view = new \McstImageGalleryGUI($this->
object, $this->tpl, $this->
getFeedLink());
1322 $view->setCompletedCallback($this->
ctrl->getLinkTarget(
1324 "handlePlayerCompletedEvent",
1329 $this->
tabs->activateTab(
"content");
1333 $view = new \McstPodcastGUI($this->
object, $this->tpl, $this->
getFeedLink());
1334 $this->
tabs->activateTab(
"content");
1338 $ilTabs->activateTab(
"content");
1340 $view = new \ILIAS\MediaCast\Presentation\VideoViewGUI($this->
object,
$tpl, $this->
getFeedLink());
1341 $view->setCompletedCallback($this->
ctrl->getLinkTarget(
1343 "handlePlayerCompletedEvent",
1348 $view->setAutoplayCallback($this->
ctrl->getLinkTarget(
1350 "handleAutoplayTrigger",
1369 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"mcst_view_abandoned"));
1376 $this->mcst_item =
new ilNewsItem($this->mc_request->getItemId());
1377 $this->video_gui->handleExtractionRequest(
1378 $this->mcst_item->getMobId()
1380 $ilCtrl->redirect($this,
"editCastItem");
1385 if ($this->mc_request->getEvent() ===
"play") {
1386 $player = explode(
"_", $this->mc_request->getPlayer());
1387 $news_id = (
int) $player[1];
1389 $item->increasePlayCounter();
1391 $mob_id = $item->getMobId();
1394 $this->
object->handleLPUpdate($ilUser->getId(), $mob_id);
1402 $mob_id = $this->mc_request->getMobId();
1405 $this->
object->handleLPUpdate($ilUser->getId(), $mob_id);
1422 string $long_desc =
"",
1423 bool $redirect =
true,
1424 bool $extract =
false 1430 foreach ($mob_ids as $mob_id) {
1431 $item_ids[] = $this->
object->addMobToCast($mob_id,
$user->
getId(), $long_desc, $extract);
1435 if (count($item_ids) === 1) {
1450 $this->
user->writePref(
1452 $this->mc_request->getAutoplay()
1459 return $this->gui->comments()->commentGUI(
1460 $this->
object->getRefId(),
1461 $this->mc_request->getItemId()
1467 echo $this->
getCommentGUI()->getListHTML() .
"<script>ilNotes.init(null);</script>";
1473 $mob_id = $this->mc_request->getMobId();
1475 $this->gui->httpUtil()->sendString(
$html);
This class represents an option in a radio group.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
GUI class for the workflow of copying objects.
prepareOutput(bool $show_sub_objects=true)
setPlaytime(string $a_playtime)
static _gotoRepositoryNode(int $ref_id, string $cmd="")
setContent(string $a_html)
Sets content for standard template.
setParameterByClass(string $a_class, string $a_parameter, $a_value)
loadLanguageModule(string $a_module)
Load language module.
static checkAccess(int $a_ref_id, bool $a_allow_only_read=true)
check access to learning progress
redirectByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
static _lookupObjId(int $ref_id)
static getASCIIFilename(string $a_filename)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static renameExecutables(string $a_dir)
ilGlobalTemplateInterface $tpl
static _lookup(string $a_type, string $a_setting, int $a_user=0, int $a_block_id=0)
Lookup setting from database.
static _lookupTitle(int $obj_id)
redirect(object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
setScreenIdComponent(string $a_comp)
Class ilObjectGUI Basic methods of all Output classes.
static _recordReadEvent(string $a_type, int $a_ref_id, int $obj_id, int $usr_id, bool $isCatchupWriteEvents=true, $a_ext_rc=null, $a_ext_time=null)
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static moveUploadedFile(string $a_file, string $a_name, string $a_target, bool $a_raise_errors=true, string $a_mode="move_uploaded")
move uploaded file
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
static redirect(string $a_script)
activateTab(string $a_id)
A news item can be created by different sources.
setPermanentLink(string $a_type, ?int $a_id, string $a_append="", string $a_target="", string $a_title="")
Generates and sets a permanent ilias link.
__construct(Container $dic, ilPlugin $plugin)
const LP_CONTEXT_REPOSITORY
This class represents a text area property in a property form.
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
addHeaderAction()
Add header action menu.
Class ilObjUserTrackingGUI.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
static _updateStatus(int $a_obj_id, int $a_usr_id, ?object $a_obj=null, bool $a_percentage=false, bool $a_force_raise=false)