5 require_once
"./Services/Object/classes/class.ilObject2GUI.php";
6 include_once(
'./Modules/WebResource/classes/class.ilParameterAppender.php');
7 require_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';
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');
244 $tit->setRequired(
true);
246 $tit->setMaxLength(127);
247 $this->form->addItem($tit);
254 $this->form->addItem($des);
257 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
258 include_once
'./Services/Container/classes/class.ilContainer.php';
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());
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';
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);
507 $links->setDisableCheckStatus((
int) $data[
'che']);
509 $links->setValidStatus((
int) $data[
'vali']);
513 if (strlen($data[
'nam']) and $data[
'val']) {
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';
636 case self::LINK_MOD_CREATE:
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'));
647 case self::LINK_MOD_ADD:
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'));
656 case self::LINK_MOD_EDIT:
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');
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');
722 $tit->setMaxLength(127);
723 $this->form->addItem($tit);
729 $this->form->addItem($des);
732 if ($a_mode != self::LINK_MOD_CREATE) {
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'));
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'];
826 $_GET[
'switch_mode'] = self::VIEW_MODE_MANAGE;
839 $ilTabs->activateTab(
"id_content");
843 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui") {
847 switch ((
int) $_REQUEST[
'view_mode']) {
848 case self::VIEW_MODE_MANAGE:
852 case self::VIEW_MODE_SORT:
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';
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'])) {
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) {
1095 $this->ctrl->forwardCommand(
$info);
1104 $ilTabs->activateTab(
'id_history');
1106 include_once(
"./Services/History/classes/class.ilHistoryTableGUI.php");
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);
1138 $row[
'action_html'] =
$actions->getHTML();
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') !=
"")
1531 ? $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"),
1566 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
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 deliverData($a_data, $a_filename, $mime="application/octet-stream", $charset="")
deliver data for download via browser.
infoScreen()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually...
static _isSingular($a_webr_id)
Check whether there is only one active link in the web resource.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
static getInitHTML($a_url)
Get initialisation HTML to use interna link editing.
TableGUI class for search results.
settings()
Edit settings Title, Description, Sorting.
updateLink()
Save after editing.
setSortMode($a_mode)
set sort mode
initCreateForm($a_new_type)
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
New implementation of ilObjectGUI.
GUI class for the workflow of copying objects.
saveSorting()
Save nmanual sorting.
TableGUI class for search results.
static _getStaticLink( $a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
static _getOptionSelect()
Get options as array.
setInfo($a_info)
Set Information Text.
checkLinkInput($a_mode, $a_webr_id=0, $a_link_id=0)
Check input after creating a new link.
static lookupNumberOfLinks($a_webr_id)
Get number of assigned links.
getPermanentLinkWidget($a_append=null, $a_center=false)
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
if(!array_key_exists('StateId', $_REQUEST)) $id
setValue($a_value)
Set Value.
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
Class ilObjLinkResourceGUI.
addLink()
Add an additional link.
static _lookupTitle($a_id)
lookup object title
class for checking external links in page objects Normally used in Cron jobs, but should be extensibl...
deactivateLink()
Deactivate links.
infoScreenForward()
show information screen
class for checking external links in page objects.
initFormSettings()
Show settings form.
linkChecker()
Show link validation.
afterSave(ilObject $a_new_object)
showLinks()
Show all active links.
class ilLinkCheckerTableGUI
static _append($a_link_data)
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
Export User Interface Class.
static parameterToInfo($a_name, $a_value)
Get info text describing an existing dynamic link.
if(isset($_POST['submit'])) $form
getId()
get object id public
switchViewMode()
Switch between "View" "Manage" and "Sort".
editLinks()
Start with manage mode.
static _lookupObjId($a_id)
special template class to simplify handling of ITX/PEAR
setSize($a_size)
Set Size.
This class represents a text property in a property form.
static lookupItem($a_webr_id, $a_link_id)
static infoPanel($a_keep=true)
editLink()
Edit a single link.
interface ilLinkCheckerGUIRowHandling
deleteParameter()
Delete a dynamic parameter.
formatInvalidLinkArray(array $row)
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
isContainerMetaDataRequired()
Check if a new container title is required Necessary if there is more than one link.
setValuesFromLink($a_link_id)
Set form values from link.
Create styles array
The data for the language used.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
saveSettings()
Save container settings.
static _getFirstLink($a_webr_id)
Get first link item Check before with _isSingular() if there is more or less than one...
User interface class for advanced drop-down selection lists.
Copyright (c) 1998-2014 ILIAS open source, Extended GPL, see docs/LICENSE Date: 24.10.14 Time: 10:35.
static _getNotifyStatus($a_usr_id, $a_obj_id)
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.
setRows($a_rows)
Set Rows.
Create new PHPExcel object
obj_idprivate
This class represents a text area property in a property form.
deleteLinks()
Delete links.
Class ilObjLinkResourceGUI.
getRefId()
get reference id public
prepareOutput($a_show_subobjects=true)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
Class ilParameterAppender.
handleSubItemLinks($a_target)
const LINKS_ERR_NO_NAME_VALUE
static _goto($a_target, $a_additional=null)
static getLogger($a_component_id)
Get component logger.
static _lookupSortMode($a_obj_id)
lookup sort mode
redirectToLink($a_ref_id, $a_obj_id, $a_url)
saveAddLink()
Save form data.
static _getInstance($a_obj_id)
get instance by obj_id
if(empty($password)) $table
initFormLink($a_mode)
Show create/edit single link.
activateTabs($a_active_tab, $a_active_subtab='')
Activate tab and subtabs.
setValue($a_value)
Set Value.
static redirect($a_script)
updateLinks()
Update all visible links.
save()
Save new object public.
static _getParams($a_link_id)
Get dynamic parameter definitions.
static _isEnabled()
Check if dynamic parameters are enabled.
addHeaderAction()
Add header action menu.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
showToolbar($a_tpl_var)
Show toolbar.
Confirmation screen class.
confirmDeleteLink()
Show delete confirmation screen.