5require_once
"./Services/Object/classes/class.ilObject2GUI.php";
6include_once(
'./Modules/WebResource/classes/class.ilParameterAppender.php');
7require_once
'Services/LinkChecker/interfaces/interface.ilLinkCheckerGUIRowHandling.php';
43 if (
$_GET[
"baseClass"] ==
'ilLinkResourceHandlerGUI') {
45 $ilCtrl->saveParameter($this,
'view_mode');
49 $this->lng->loadLanguageModule(
"webr");
51 $next_class = $this->ctrl->getNextClass($this);
52 $cmd = $this->ctrl->getCmd();
54 switch ($next_class) {
55 case "ilinfoscreengui":
60 case 'ilobjectmetadatagui':
63 $ilTabs->activateTab(
'id_meta_data');
64 include_once
'Services/Object/classes/class.ilObjectMetaDataGUI.php';
66 $this->ctrl->forwardCommand($md_gui);
69 case 'ilpermissiongui':
71 $ilTabs->activateTab(
'id_permissions');
72 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
74 $ret =&$this->ctrl->forwardCommand($perm_gui);
77 case 'ilobjectcopygui':
79 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
82 $this->ctrl->forwardCommand($cp);
87 $this->tabs_gui->setTabActive(
'export');
88 include_once
'./Services/Export/classes/class.ilExportGUI.php';
90 $exp->addFormat(
'xml');
91 $this->ctrl->forwardCommand($exp);
94 case "ilcommonactiondispatchergui":
95 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
97 $this->ctrl->forwardCommand($gui);
100 case "ilpropertyformgui":
101 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
103 $this->ctrl->forwardCommand($this->form);
106 case "ilinternallinkgui":
107 $this->lng->loadLanguageModule(
"content");
108 require_once(
"./Services/Link/classes/class.ilInternalLinkGUI.php");
110 $link_gui->filterLinkType(
"PageObject");
111 $link_gui->filterLinkType(
"GlossaryItem");
112 $link_gui->filterLinkType(
"RepositoryItem");
113 $link_gui->setFilterWhiteList(
true);
114 $ilCtrl->forwardCommand($link_gui);
119 $this->ctrl->setCmd(
"view");
121 parent::executeCommand();
126 include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
157 $this->form->setValuesByPost();
158 $this->tpl->setContent($this->form->getHTML());
165 $this->link->setLinkResourceId($a_new_object->
getId());
166 $link_id = $this->link->add();
167 $this->link->updateValid(
true);
172 if ($this->id_type == self::WORKSPACE_NODE_ID) {
173 $this->ctrl->redirect($this,
"editLinks");
178 $a_new_object->
getRefId() .
"&cmd=switchViewMode&switch_mode=2");
192 $ilTabs->activateTab(
'id_settings');
195 $this->tpl->setContent($this->form->getHTML());
207 $ilTabs->activateTab(
'id_settings');
210 if ($this->form->checkInput()) {
211 $this->
object->setTitle($this->form->getInput(
'tit'));
212 $this->
object->setDescription($this->form->getInput(
'des'));
213 $this->
object->update();
215 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
217 $sort->setSortMode($this->form->getInput(
'sor'));
221 $this->ctrl->redirect($this,
'settings');
224 $this->form->setValuesByPost();
226 $this->tpl->setContent($this->form->getHTML());
236 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
238 $this->form->setFormAction($this->ctrl->getFormAction($this,
'saveSettings'));
239 $this->form->setTitle($this->lng->txt(
'webr_edit_settings'));
242 $tit =
new ilTextInputGUI($this->lng->txt(
'webr_list_title'),
'tit');
243 $tit->setValue($this->object->getTitle());
244 $tit->setRequired(
true);
246 $tit->setMaxLength(127);
247 $this->form->addItem($tit);
251 $des->setValue($this->object->getDescription());
254 $this->form->addItem($des);
257 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
258 include_once
'./Services/Container/classes/class.ilContainer.php';
261 $sor->setRequired(
true);
262 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
266 $this->lng->txt(
'webr_sort_title'),
269 $sor->addOption($opt);
272 $this->lng->txt(
'webr_sort_manual'),
275 $sor->addOption($opm);
276 $this->form->addItem($sor);
278 $this->form->addCommandButton(
'saveSettings', $this->lng->txt(
'save'));
279 $this->form->addCommandButton(
'view', $this->lng->txt(
'cancel'));
294 if (!(
int)
$_GET[
'link_id']) {
296 $ilCtrl->redirect($this,
'view');
301 $this->tpl->setContent($this->form->getHTML());
313 if ($this->
checkLinkInput(self::LINK_MOD_EDIT, $this->object->getId(), (
int) $_REQUEST[
'link_id'])) {
314 $this->link->setLinkId((
int) $_REQUEST[
'link_id']);
315 $this->link->update();
317 $this->dynamic->add((
int) $_REQUEST[
'link_id']);
321 $this->
object->setTitle($this->form->getInput(
'tit'));
322 $this->
object->setDescription($this->form->getInput(
'des'));
323 $this->
object->update();
327 $ilCtrl->redirect($this,
'view');
330 $this->form->setValuesByPost();
331 $this->tpl->setContent($this->form->getHTML());
344 $this->tpl->setContent($this->form->getHTML());
358 if ($this->
checkLinkInput(self::LINK_MOD_ADD, $this->object->getId(), 0)) {
361 $this->
object->setTitle($this->form->getInput(
'lti'));
362 $this->
object->setDescription($this->form->getInput(
'tde'));
363 $this->
object->update();
367 $link_id = $this->link->add();
368 $this->link->updateValid(
true);
372 $this->dynamic->add($link_id);
375 $ilCtrl->redirect($this,
'view');
379 $this->form->setValuesByPost();
382 $this->tpl->setContent($this->form->getHTML());
395 $this->ctrl->setParameter($this,
'link_id', (
int)
$_GET[
'link_id']);
397 if (!isset(
$_GET[
'param_id'])) {
399 $ilCtrl->redirect($this,
'view');
402 include_once
'./Modules/WebResource/classes/class.ilParameterAppender.php';
404 $param->delete((
int)
$_GET[
'param_id']);
407 $ilCtrl->redirect($this,
'editLinks');
416 if (!isset(
$_GET[
'param_id'])) {
418 $ilCtrl->redirect($this,
'view');
421 include_once
'./Modules/WebResource/classes/class.ilParameterAppender.php';
423 $param->delete((
int)
$_GET[
'param_id']);
426 $ilCtrl->redirect($this,
'view');
441 if (!is_array(
$_POST[
'ids'])) {
443 $ilCtrl->redirect($this,
'view');
448 foreach (
$_POST[
'ids'] as $link_id) {
452 if (
$_POST[
'tar_' . $link_id .
'_ajax_type'] &&
453 $_POST[
'tar_' . $link_id .
'_ajax_id']) {
455 $_POST[
'tar_' . $link_id .
'_ajax_type'] .
'|' .
456 $_POST[
'tar_' . $link_id .
'_ajax_id'];
460 if (!strlen(
$data[
'tit'])) {
461 $invalid[] = $link_id;
464 if (!strlen(
$data[
'tar'])) {
465 $invalid[] = $link_id;
469 $invalid[] = $link_id;
473 $invalid[] = $link_id;
478 if (count($invalid)) {
480 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.webr_manage.html',
'Modules/WebResource');
482 include_once
'./Modules/WebResource/classes/class.ilWebResourceEditableLinkTableGUI.php';
484 $table->setInvalidLinks($invalid);
487 $this->tpl->setVariable(
'TABLE_LINKS',
$table->getHTML());
491 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
495 include_once
'./Services/Form/classes/class.ilFormPropertyGUI.php';
496 include_once
'./Services/Form/classes/class.ilLinkInputGUI.php';
497 foreach (
$_POST[
'ids'] as $link_id) {
502 $links->setLinkId($link_id);
516 $param->setValue((
int)
$data[
'val']);
517 $param->add($link_id);
523 $this->
object->update();
530 $ilCtrl->redirect($this,
'view');
540 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
543 $values = $link->getItem($a_link_id);
548 $this->form->setValuesByArray(
550 'tit' => $values[
'title'],
551 'tar' => $values[
'target'],
552 'des' => $values[
'description'],
553 'act' => (
int) $values[
'active'],
554 'che' => (
int) $values[
'disable_check'],
555 'vali' => (
int) $values[
'valid']
570 $valid = $this->form->checkInput();
572 $link_input = $this->form->getInput(
'tar');
574 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
577 $this->link->setTitle($this->form->getInput(
'tit'));
578 $this->link->setDescription($this->form->getInput(
'des'));
579 $this->link->setDisableCheckStatus($this->form->getInput(
'che'));
582 if ($a_mode == self::LINK_MOD_CREATE) {
583 $this->link->setActiveStatus(
true);
585 $this->link->setActiveStatus($this->form->getInput(
'act'));
588 if ($a_mode == self::LINK_MOD_EDIT) {
589 $this->link->setValidStatus($this->form->getInput(
'vali'));
591 $this->link->setValidStatus(
true);
599 $this->dynamic->setName($this->form->getInput(
'nam'));
600 $this->dynamic->setValue($this->form->getInput(
'val'));
601 if (!$this->dynamic->validate()) {
602 switch ($this->dynamic->getErrorCode()) {
604 $this->form->getItemByPostVar(
'nam')->setAlert($this->lng->txt(
'links_no_name_given'));
608 $this->form->getItemByPostVar(
'val')->setAlert($this->lng->txt(
'links_no_value_given'));
615 $this->dynamic =
null;
630 $ilTabs->activateTab(
"id_content");
632 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
638 $this->ctrl->setParameter($this,
'new_type',
'webr');
639 $this->form->setTitle($this->lng->txt(
'webr_new_link'));
640 $this->form->setTableWidth(
'600px');
643 $this->form->addCommandButton(
'save', $this->lng->txt(
'webr_add'));
644 $this->form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
649 $this->form->setTitle($this->lng->txt(
'webr_new_link'));
652 $this->form->addCommandButton(
'saveAddLink', $this->lng->txt(
'webr_add'));
653 $this->form->addCommandButton(
'view', $this->lng->txt(
'cancel'));
658 $this->ctrl->setParameter($this,
'link_id', (
int) $_REQUEST[
'link_id']);
659 $this->form->setTitle($this->lng->txt(
'webr_edit'));
662 $this->form->addCommandButton(
'updateLink', $this->lng->txt(
'save'));
663 $this->form->addCommandButton(
'view', $this->lng->txt(
'cancel'));
668 $this->form->setFormAction($this->ctrl->getFormAction($this));
674 $this->form->setTitle($this->lng->txt(
'webr_edit_list'));
678 $title->setRequired(
true);
680 $title->setMaxLength(127);
681 $this->form->addItem(
$title);
687 $this->form->addItem($desc);
691 $sect->setTitle($this->lng->txt(
'webr_add'));
692 $this->form->addItem($sect);
703 include_once
'Services/Form/classes/class.ilLinkInputGUI.php';
704 $tar =
new ilLinkInputGUI($this->lng->txt(
'webr_link_target'),
'tar');
705 $tar->setInternalLinkFilterTypes(
713 $tar->setExternalLinkMaxLength(1000);
714 $tar->setInternalLinkFilterTypes(array(
"PageObject",
"GlossaryItem",
"RepositoryItem"));
715 $tar->setRequired(
true);
716 $this->form->addItem($tar);
719 $tit =
new ilTextInputGUI($this->lng->txt(
'webr_link_title'),
'tit');
720 $tit->setRequired(
true);
722 $tit->setMaxLength(127);
723 $this->form->addItem($tit);
729 $this->form->addItem($des);
732 if ($a_mode != self::LINK_MOD_CREATE) {
735 $act->setChecked(
true);
737 $this->form->addItem($act);
742 $this->form->addItem($che);
746 if ($a_mode == self::LINK_MOD_EDIT) {
748 $this->form->addItem($val);
753 $dyn->setInfo($this->lng->txt(
'links_dynamic_info'));
758 $dyn->addSubItem($ex);
763 $ptpl =
new ilTemplate(
'tpl.link_dyn_param_edit.html',
true,
true,
'Modules/WebResource');
765 $this->ctrl->setParameter($this,
'param_id',
$id);
766 $ptpl->setVariable(
'LINK_DEL', $this->ctrl->getLinkTarget($this,
'deleteParameterForm'));
767 $ptpl->setVariable(
'LINK_TXT', $this->lng->txt(
'delete'));
768 $p->setHtml($ptpl->get());
769 $dyn->addSubItem($p);
776 if ($a_mode != self::LINK_MOD_CREATE) {
777 #$new = new ilCustomInputGUI($this->lng->txt('links_add_param'),'');
778 #$dyn->addSubItem($new);
784 $nam->setMaxLength(128);
785 $dyn->addSubItem($nam);
791 $dyn->addSubItem($val);
793 $this->form->addItem($dyn);
804 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
816 $_REQUEST[
'view_mode'] =
$_GET[
'view_mode'] = (int)
$_GET[
'switch_mode'];
839 $ilTabs->activateTab(
"id_content");
843 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui") {
847 switch ((
int) $_REQUEST[
'view_mode']) {
854 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
867 $GLOBALS[
'tpl']->setPermanentLink($this->object->getType(), $this->object->getRefId());
880 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.webr_manage.html',
'Modules/WebResource');
883 include_once
'./Modules/WebResource/classes/class.ilWebResourceEditableLinkTableGUI.php';
887 include_once
'./Services/Link/classes/class.ilInternalLinkGUI.php';
890 $this->tpl->addJavaScript(
"Modules/WebResource/js/intLink.js");
891 $this->tpl->addJavascript(
"Services/Form/js/Form.js");
893 $this->tpl->setVariable(
'TABLE_LINKS',
$table->getHTML() .
$js);
905 include_once
'./Modules/WebResource/classes/class.ilWebResourceLinkTableGUI.php';
909 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.webr_view.html',
'Modules/WebResource');
911 $this->tpl->setVariable(
'LINK_TABLE',
$table->getHTML());
923 include_once
'./Modules/WebResource/classes/class.ilWebResourceLinkTableGUI.php';
927 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.webr_view.html',
'Modules/WebResource');
929 $this->tpl->setVariable(
'LINK_TABLE',
$table->getHTML());
940 include_once
'./Services/Container/classes/class.ilContainerSorting.php';
942 $sort->savePost((array)
$_POST[
'position']);
960 include_once
'./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
962 $tool->setFormAction($this->ctrl->getFormAction($this));
964 $this->lng->txt(
'webr_add'),
965 $this->ctrl->getLinkTarget($this,
'addLink')
968 $this->tpl->setVariable($a_tpl_var, $tool->getHTML());
983 if (is_array(
$_POST[
'link_ids'])) {
984 $link_ids =
$_POST[
'link_ids'];
985 } elseif (isset(
$_GET[
'link_id'])) {
986 $link_ids = array(
$_GET[
'link_id']);
989 if (!count($link_ids) > 0) {
995 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
998 include_once
'Services/Utilities/classes/class.ilConfirmationGUI.php';
1000 $confirm->setFormAction($this->ctrl->getFormAction($this,
'view'));
1001 $confirm->setHeaderText($this->lng->txt(
'webr_sure_delete_items'));
1002 $confirm->setConfirm($this->lng->txt(
'delete'),
'deleteLinks');
1003 $confirm->setCancel($this->lng->txt(
'cancel'),
'view');
1005 foreach ($link_ids as $link_id) {
1006 $link =
$links->getItem($link_id);
1007 $confirm->addItem(
'link_ids[]', $link_id, $link[
'title']);
1009 $this->tpl->setContent($confirm->getHTML());
1022 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
1025 foreach (
$_POST[
'link_ids'] as $link_id) {
1026 $links->delete($link_id);
1029 $ilCtrl->redirect($this,
'view');
1042 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
1045 if (!
$_GET[
'link_id']) {
1047 $ilCtrl->redirect($this,
'view');
1051 $links->updateActive(
false);
1054 $ilCtrl->redirect($this,
'view');
1065 $this->ctrl->setCmd(
"showSummary");
1066 $this->ctrl->setCmdClass(
"ilinfoscreengui");
1080 $ilTabs->activateTab(
'id_info');
1082 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
1085 $info->enablePrivateNotes();
1088 $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
1090 if ($this->id_type == self::WORKSPACE_NODE_ID) {
1091 $info->addProperty($this->lng->txt(
"perma_link"), $this->getPermanentLinkWidget());
1095 $this->ctrl->forwardCommand(
$info);
1104 $ilTabs->activateTab(
'id_history');
1106 include_once(
"./Services/History/classes/class.ilHistoryTableGUI.php");
1107 $hist_gui =
new ilHistoryTableGUI($this,
"history", $this->object->getId(), $this->object->getType);
1108 $hist_gui->initTable();
1109 $this->tpl->setContent($hist_gui->getHTML());
1122 $this->
object->items_obj->readItem($row[
'page_id']);
1123 $row[
'title'] = $this->
object->items_obj->getTitle();
1125 require_once
'Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php';
1127 $actions->setSelectionHeaderClass(
'small');
1128 $actions->setItemLinkClass(
'xsmall');
1129 $actions->setListTitle($this->lng->txt(
'actions'));
1131 $this->ctrl->setParameter($this,
'link_id',
$row[
'page_id']);
1133 $this->lng->txt(
'edit'),
1135 $this->ctrl->getLinkTarget($this,
'editLink')
1137 $this->ctrl->clearParameters($this);
1152 $ilTabs->activateTab(
'id_link_check');
1155 $this->
object->initLinkResourceItemsObject();
1157 require_once
'./Services/LinkChecker/classes/class.ilLinkCheckerTableGUI.php';
1161 if ((
bool) $ilias->getSetting(
'cron_web_resource_check')) {
1162 include_once
'./Services/LinkChecker/classes/class.ilLinkCheckNotify.php';
1163 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
1165 $chb =
new ilCheckboxInputGUI($this->lng->txt(
'link_check_message_a'),
'link_check_message');
1168 $chb->setOptionTitle($this->lng->txt(
'link_check_message_b'));
1171 $toolbar->addFormButton($this->lng->txt(
'save'),
'saveLinkCheck');
1172 $toolbar->setFormAction($this->ctrl->getLinkTarget($this,
'saveLinkCheck'));
1176 $tgui->setLinkChecker($this->link_checker_obj)
1177 ->setRowHandler($this)
1178 ->setRefreshButton($this->lng->txt(
'refresh'),
'refreshLinkCheck');
1180 return $tpl->setContent($tgui->prepareHTML()->getHTML() .
$toolbar->getHTML());
1187 include_once
'./Services/LinkChecker/classes/class.ilLinkCheckNotify.php';
1190 $link_check_notify->setUserId(
$ilUser->getId());
1191 $link_check_notify->setObjId($this->object->getId());
1193 if (
$_POST[
'link_check_message']) {
1195 $link_check_notify->addNotifier();
1198 $link_check_notify->deleteNotifier();
1210 $this->
object->initLinkResourceItemsObject();
1213 $this->
object->items_obj->updateValidByCheck();
1215 foreach ($this->link_checker_obj->checkWebResourceLinks() as $invalid) {
1216 $this->
object->items_obj->readItem($invalid[
'page_id']);
1217 $this->
object->items_obj->setActiveStatus(
false);
1218 $this->
object->items_obj->setValidStatus(
false);
1219 $this->
object->items_obj->update(
false);
1222 $this->
object->items_obj->updateLastCheck();
1234 include_once
'./Services/LinkChecker/classes/class.ilLinkChecker.php';
1237 $this->link_checker_obj->setObjId($this->object->getId());
1253 switch ($a_active_tab) {
1256 $this->lng->loadLanguageModule(
'cntr');
1258 $this->ctrl->setParameter($this,
'switch_mode', self::VIEW_MODE_VIEW);
1262 $this->ctrl->getLinkTarget($this,
'switchViewMode')
1264 $this->ctrl->setParameter($this,
'switch_mode', self::VIEW_MODE_MANAGE);
1266 'id_content_manage',
1267 $lng->txt(
'cntr_manage'),
1268 $this->ctrl->getLinkTarget($this,
'switchViewMode')
1270 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
1271 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
1272 include_once
'./Services/Container/classes/class.ilContainer.php';
1275 $this->ctrl->setParameter($this,
'switch_mode', self::VIEW_MODE_SORT);
1277 'id_content_ordering',
1278 $this->lng->txt(
'cntr_ordering'),
1279 $this->ctrl->getLinkTarget($this,
'switchViewMode')
1283 $ilCtrl->clearParameters($this);
1284 $ilTabs->activateSubTab($a_active_subtab);
1288 $ilTabs->activateTab(
'id_content');
1298 global $ilTabs,
$lng, $ilHelp;
1300 $ilHelp->setScreenIdComponent(
"webr");
1305 $lng->txt(
"content"),
1306 $this->ctrl->getLinkTarget($this,
"view")
1316 $lng->txt(
"info_short"),
1317 $this->ctrl->getLinkTarget($this,
"infoScreen")
1322 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
1326 $lng->txt(
"settings"),
1327 $this->ctrl->getLinkTarget($this,
"settings")
1335 $lng->txt(
"history"),
1336 $this->ctrl->getLinkTarget($this,
"history")
1344 $lng->txt(
"link_check"),
1345 $this->ctrl->getLinkTarget($this,
"linkChecker")
1350 include_once
"Services/Object/classes/class.ilObjectMetaDataGUI.php";
1352 $mdtab = $mdgui->getTab();
1356 $lng->txt(
"meta_data"),
1365 $this->lng->txt(
'export'),
1366 $this->ctrl->getLinkTargetByClass(
'ilexportgui',
'')
1381 $this->tpl->setLocator();
1384 if ($this->message) {
1397 if (is_object($this->
object)) {
1398 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this),
"", $this->object->getRefId(),
"webr");
1405 include_once
"Services/Form/classes/class.ilFormPropertyGUI.php";
1406 include_once
"Services/Form/classes/class.ilLinkInputGUI.php";
1409 include_once(
"./Services/Link/classes/class.ilLink.php");
1412 $parts = explode(
"|", $a_target);
1414 if ($parts[0] ==
'wpage') {
1419 '&target=wiki_wpage_' . $parts[1]
1423 if ($parts[0] ==
"term") {
1429 "&target=git_" . $parts[1]
1433 if ($parts[0] ==
"page") {
1445 $obj_id = $this->
object->getId();
1447 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
1450 if (
$url[
"target"]) {
1453 include_once
'./Modules/WebResource/classes/class.ilParameterAppender.php';
1465 if ($_REQUEST[
"link_id"]) {
1466 $obj_id = $this->
object->getId();
1468 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
1470 $item = $items->getItem($_REQUEST[
"link_id"]);
1471 if ($item[
"target"]) {
1474 include_once
'./Modules/WebResource/classes/class.ilParameterAppender.php';
1489 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
1505 $tpl =
new ilTemplate(
"tpl.export_html.html",
true,
true,
"Modules/WebResource");
1507 include_once
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
1509 foreach ($items->getAllItems() as $item) {
1510 if (!$item[
"active"]) {
1516 $tpl->setCurrentBlock(
"link_bl");
1518 $tpl->setVariable(
"LINK_TITLE", $item[
"title"]);
1519 $tpl->setVariable(
"LINK_DESC", $item[
"description"]);
1520 $tpl->setVariable(
"LINK_CREATE", $item[
"create_date"]);
1521 $tpl->setVariable(
"LINK_UPDATE", $item[
"last_update"]);
1522 $tpl->parseCurrentBlock();
1525 $tpl->setVariable(
"CREATE_DATE", $this->object->getCreateDate());
1526 $tpl->setVariable(
"LAST_UPDATE", $this->object->getLastUpdateDate());
1527 $tpl->setVariable(
"TXT_TITLE", $this->object->getTitle());
1528 $tpl->setVariable(
"TXT_DESC", $this->object->getLongDescription());
1530 $tpl->setVariable(
"INST_ID", (
$ilSetting->get(
'short_inst_name') !=
"")
1537 public static function _goto($a_target, $a_additional =
null)
1541 if ($a_additional && substr($a_additional, -3) ==
"wsp") {
1542 $_GET[
"baseClass"] =
"ilsharedresourceGUI";
1543 $_GET[
"wsp_id"] = $a_target;
1544 include(
"ilias.php");
1549 if ($ilAccess->checkAccess(
"read",
"", $a_target)) {
1550 ilUtil::redirect(
"ilias.php?baseClass=ilLinkResourceHandlerGUI&ref_id=$a_target");
1553 if ($ilAccess->checkAccess(
"visible",
"", $a_target)) {
1554 ilUtil::redirect(
"ilias.php?baseClass=ilLinkResourceHandlerGUI&ref_id=" . $a_target .
"&cmd=infoScreen");
1556 if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID)) {
1558 $lng->txt(
"msg_no_perm_read_item"),
sprintf('%.4f', $callTime)
An exception for terminatinating execution or to throw for unit testing.
const LINKS_ERR_NO_NAME_VALUE
User interface class for advanced drop-down selection lists.
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.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Confirmation screen class.
static _lookupSortMode($a_obj_id)
lookup sort mode
static _getInstance($a_obj_id)
get instance by obj_id
Export User Interface Class.
Copyright (c) 1998-2014 ILIAS open source, Extended GPL, see docs/LICENSE Date: 24....
static getInitHTML($a_url)
Get initialisation HTML to use interna link editing.
class for checking external links in page objects.
static _getNotifyStatus($a_usr_id, $a_obj_id)
class ilLinkCheckerTableGUI
class for checking external links in page objects Normally used in Cron jobs, but should be extensibl...
Class ilObjLinkResourceGUI.
static lookupItem($a_webr_id, $a_link_id)
static _getFirstLink($a_webr_id)
Get first link item Check before with _isSingular() if there is more or less than one.
static _isSingular($a_webr_id)
Check whether there is only one active link in the web resource.
static lookupNumberOfLinks($a_webr_id)
Get number of assigned links.
static _getStaticLink( $a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
static getLogger($a_component_id)
Get component logger.
static _fillHTMLMetaTags($a_rbac_id, $a_obj_id, $a_type)
Fill html meta tags.
This class represents a non editable value in a property form.
Class ilObjLinkResourceGUI.
confirmDeleteLink()
Show delete confirmation screen.
addLocatorItems()
Functions to be overwritten.
deleteParameter()
Delete a dynamic parameter.
redirectToLink($a_ref_id, $a_obj_id, $a_url)
showLinks()
Show all active links.
infoScreen()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually,...
activateTabs($a_active_tab, $a_active_subtab='')
Activate tab and subtabs.
formatInvalidLinkArray(array $row)
checkLinkInput($a_mode, $a_webr_id=0, $a_link_id=0)
Check input after creating a new link.
switchViewMode()
Switch between "View" "Manage" and "Sort".
showToolbar($a_tpl_var)
Show toolbar.
saveSorting()
Save nmanual sorting.
initCreateForm($a_new_type)
Init object creation form.
initFormLink($a_mode)
Show create/edit single link.
afterSave(ilObject $a_new_object)
Post (successful) object creation hook.
updateLinks()
Update all visible links.
setTabs()
get tabs @access public
saveAddLink()
Save form data.
saveSettings()
Save container settings.
editLink()
Edit a single link.
getType()
Functions that must be overwritten.
handleSubItemLinks($a_target)
linkChecker()
Show link validation.
settings()
Edit settings Title, Description, Sorting.
editLinks()
Start with manage mode.
isContainerMetaDataRequired()
Check if a new container title is required Necessary if there is more than one link.
executeCommand()
execute command
static _goto($a_target, $a_additional=null)
deactivateLink()
Deactivate links.
addLink()
Add an additional link.
deleteLinks()
Delete links.
setValuesFromLink($a_link_id)
Set form values from link.
save()
Save new object @access public.
updateLink()
Save after editing.
infoScreenForward()
show information screen
initFormSettings()
Show settings form.
New implementation of ilObjectGUI.
prepareOutput($a_show_subobjects=true)
prepare output
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
getCreationMode()
get creation mode
GUI class for the workflow of copying objects.
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
addHeaderAction()
Add header action menu.
Class ilObject Basic functions for all objects.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
getRefId()
get reference id @access public
getId()
get object id @access public
Class ilParameterAppender.
static parameterToInfo($a_name, $a_value)
Get info text describing an existing dynamic link.
static _append($a_link_data)
static _getOptionSelect()
Get options as array.
static _getParams($a_link_id)
Get dynamic parameter definitions.
static _isEnabled()
Check if dynamic parameters are enabled.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
This class represents an option in a radio group.
special template class to simplify handling of ITX/PEAR
This class represents a text area property in a property form.
This class represents a text property in a property form.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static redirect($a_script)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static deliverData($a_data, $a_filename, $mime="application/octet-stream", $charset="")
deliver data for download via browser.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static infoPanel($a_keep=true)
TableGUI class for search results.
TableGUI class for search results.
if(!array_key_exists('StateId', $_REQUEST)) $id
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
interface ilLinkCheckerGUIRowHandling
if(empty($password)) $table
if(isset($_POST['submit'])) $form