87 public function __construct($a_data, $a_id = 0, $a_call_by_reference =
true, $a_prepare_output =
true)
89 $this->error =
$DIC[
"ilErr"];
92 $this->ctrl = $DIC->ctrl();
93 $this->lng = $DIC->language();
94 $this->
user = $DIC->user();
95 $this->toolbar = $DIC->toolbar();
96 $this->tabs = $DIC->tabs();
97 $this->setting = $DIC[
"ilSetting"];
98 $this->access = $DIC->access();
99 $this->rbacsystem = $DIC->rbac()->system();
100 $this->
help = $DIC[
"ilHelp"];
106 $this->ctrl->saveParameter($this, array(
"ref_id",
"offset"));
108 $this->lng->loadLanguageModule(
"content");
109 $this->lng->loadLanguageModule(
"glo");
116 $this->term_id = (int)
$_GET[
"term_id"];
118 if ($this->term_id > 0 && $term_glo_id != $this->object->getId()
123 $this->tax_id = $this->
object->getTaxonomyId();
124 if ($this->tax_id > 0) {
125 $this->ctrl->saveParameter($this, array(
"show_tax",
"tax_node"));
129 if ((
int)
$_GET[
"tax_node"] > 1 && $this->tax->getTree()->readRootId() !=
$_GET[
"tax_node"]) {
130 $this->tax_node = (int)
$_GET[
"tax_node"];
139 $cmd = $this->ctrl->getCmd();
140 $next_class = $this->ctrl->getNextClass($this);
142 $this->log->debug(
"glossary term, next class " . $next_class .
", cmd: " . $cmd);
144 switch ($next_class) {
145 case 'ilobjectmetadatagui':
153 $this->tabs_gui->activateTab(
'meta_data');
155 $this->ctrl->forwardCommand($md_gui);
158 case "ilglossarytermgui":
159 if (!$this->term_perm->checkPermission(
"edit_content", $this->term_id) &&
160 !$this->term_perm->checkPermission(
"write", $this->term_id)) {
165 $this->ctrl->setReturn($this,
"listTerms");
167 $term_gui->setGlossary($this->
object);
169 $ret = $this->ctrl->forwardCommand($term_gui);
172 case "ilinfoscreengui":
177 case "ilobjstylesheetgui":
178 $this->ctrl->setReturn($this,
"editStyleProperties");
179 $style_gui =
new ilObjStyleSheetGUI(
"", $this->object->getStyleSheetId(),
false,
false);
181 if ($cmd ==
"create" ||
$_GET[
"new_type"] ==
"sty") {
182 $style_gui->setCreationMode(
true);
185 if ($cmd ==
"confirmedDelete") {
186 $this->
object->setStyleSheetId(0);
187 $this->
object->update();
190 $ret = $this->ctrl->forwardCommand($style_gui);
192 if ($cmd ==
"save" || $cmd ==
"copyStyle" || $cmd ==
"importStyle") {
194 $this->
object->setStyleSheetId($style_id);
195 $this->
object->update();
196 $this->ctrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
201 case 'ilpermissiongui':
202 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui") {
211 $ret = $this->ctrl->forwardCommand($perm_gui);
214 case "ilcommonactiondispatchergui":
217 $this->ctrl->forwardCommand($gui);
220 case "ilobjtaxonomygui":
225 $this->tabs->activateTab(
"settings");
228 $this->ctrl->setReturn($this,
"properties");
230 $tax_gui->setMultiple(
false);
232 $tax_gui->setAssignedObject($this->object->getId());
233 $ret = $this->ctrl->forwardCommand($tax_gui);
239 $this->tabs->activateTab(
"export");
243 $exp_gui->addFormat(
"xml");
244 $exp_gui->addFormat(
"html",
"", $this,
"exportHTML");
245 $exp_gui->addCustomColumn(
246 $this->lng->txt(
"cont_public_access"),
248 "getPublicAccessColValue" 250 $exp_gui->addCustomMultiCommand(
251 $this->lng->txt(
"cont_public_access"),
255 $ret = $this->ctrl->forwardCommand($exp_gui);
258 case 'ilobjectcopygui':
262 $this->ctrl->forwardCommand($cp);
265 case "ilglossaryforeigntermcollectorgui":
266 $this->ctrl->setReturn($this,
"");
272 $this->ctrl->forwardCommand($coll);
276 $cmd = $this->ctrl->getCmd(
"listTerms");
278 if (($cmd ==
"create") && (
$_POST[
"new_type"] ==
"term")) {
279 $this->ctrl->setCmd(
"create");
280 $this->ctrl->setCmdClass(
"ilGlossaryTermGUI");
284 if (!in_array($cmd, array(
"quickList"))) {
285 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui" ||
295 if ($cmd ==
"redrawHeaderAction") {
296 $cmd =
"redrawHeaderActionObject";
300 $ret = $this->$cmd();
305 if (!in_array($cmd, array(
"quickList"))) {
306 if (strtolower(
$_GET[
"baseClass"]) !=
"iladministrationgui") {
308 $this->tpl->printToStdout();
312 $this->tpl->printToStdout(
false);
324 $form->setTarget(
"_top");
325 $form->setFormAction($this->ctrl->getFormAction($this));
326 $form->setTitle($this->lng->txt($a_new_type .
"_new"));
332 $ti->setRequired(
true);
343 "none" => $this->lng->txt(
"glo_mode_normal"),
344 "level" => $this->lng->txt(
"glo_mode_level"),
345 "subtree" => $this->lng->txt(
"glo_mode_subtree")
348 $tm->setOptions($stati);
349 $tm->setInfo($this->lng->txt(
"glo_mode_desc"));
350 $tm->setRequired(
true);
356 $form->addCommandButton(
"save", $this->lng->txt($a_new_type .
"_add"));
357 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
374 $new_type = $_REQUEST[
"new_type"];
378 $ilErr->raiseError($this->lng->txt(
"no_create_permission"),
$ilErr->MESSAGE);
381 $this->lng->loadLanguageModule($new_type);
382 $this->ctrl->setParameter($this,
"new_type", $new_type);
385 if ($form->checkInput()) {
386 $this->ctrl->setParameter($this,
"new_type",
"");
389 $newObj->setType($new_type);
390 $newObj->setTitle($form->getInput(
"title"));
391 $newObj->setDescription($form->getInput(
"desc"));
392 $newObj->setVirtualMode($form->getInput(
"glo_mode"));
400 $newObj->applyDidacticTemplate($dtpl);
404 ilUtil::sendSuccess($this->lng->txt(
"glo_added"),
true);
405 ilUtil::redirect(
"ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=" . $newObj->getRefId());
409 $form->setValuesByPost();
410 $this->tpl->setContent($form->getHtml());
424 $this->lng->loadLanguageModule(
"meta");
427 $info->enablePrivateNotes();
429 if ($this->access->checkAccess(
"write",
"",
$_GET[
"ref_id"])) {
430 $info->enableNewsEditing();
432 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
433 if ($enable_internal_rss) {
434 $info->setBlockProperty(
"news",
"settings",
true);
437 $info->addMetaDataSections($this->object->getId(), 0, $this->
object->getType());
441 $this->ctrl->forwardCommand($info);
454 $lng = $DIC->language();
455 $ilAccess = $DIC->access();
457 $info->addSection(
$lng->txt(
"glo_usages"));
459 foreach ($sms as $sm) {
462 foreach ($refs as $ref) {
463 if ($link ===
false) {
464 if ($ilAccess->checkAccess(
"write",
"", $ref)) {
471 if ($link !==
false) {
472 $entry =
"<a href='" . $link .
"' target='_top'>" . $entry .
"</a>";
475 $info->addProperty(
$lng->txt(
"obj_sahs"), $entry);
484 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui") {
485 parent::viewObject();
489 if (!$this->rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
490 $ilErr->raiseError($this->lng->txt(
"permission_denied"),
$ilErr->MESSAGE);
509 $ecs->addSettingsToForm($this->form,
'glo');
511 $this->tpl->setContent($this->form->getHTML());
528 $title->setRequired(
true);
529 $this->form->addItem($title);
533 $this->form->addItem($desc);
535 $this->lng->loadLanguageModule(
"rep");
537 $section->setTitle($this->lng->txt(
'rep_activation_availability'));
543 $online->setInfo($this->lng->txt(
"glo_online_info"));
544 $this->form->addItem($online);
547 $section->setTitle($this->lng->txt(
'glo_content_settings'));
553 $op1 =
new ilRadioOption($this->lng->txt(
"glo_mode_normal"),
"none", $this->lng->txt(
"glo_mode_normal_info"));
554 $glo_mode->addOption($op1);
555 $op2 =
new ilRadioOption($this->lng->txt(
"glo_mode_level"),
"level", $this->lng->txt(
"glo_mode_level_info"));
556 $glo_mode->addOption($op2);
557 $op3 =
new ilRadioOption($this->lng->txt(
"glo_mode_subtree"),
"subtree", $this->lng->txt(
"glo_mode_subtree_info"));
558 $glo_mode->addOption($op3);
559 $this->form->addItem($glo_mode);
574 $section->setTitle($this->lng->txt(
'cont_presentation'));
578 $obj_service->commonSettings()->legacyForm($this->form, $this->
object)->addTileImage();
583 $op1 =
new ilRadioOption($this->lng->txt(
"glo_table_form"),
"table", $this->lng->txt(
"glo_table_form_info"));
586 $snl =
new ilNumberInputGUI($this->lng->txt(
"glo_text_snippet_length"),
"snippet_length");
587 $snl->setMaxValue(3000);
588 $snl->setMinValue(100);
589 $snl->setMaxLength(4);
591 $snl->
setInfo($this->lng->txt(
"glo_text_snippet_length_info"));
595 $pres_mode->addOption($op1);
596 $op2 =
new ilRadioOption($this->lng->txt(
"glo_full_definitions"),
"full_def", $this->lng->txt(
"glo_full_definitions_info"));
597 $pres_mode->addOption($op2);
598 $this->form->addItem($pres_mode);
602 if (count($tax_ids) > 0) {
604 $show_tax->
setInfo($this->lng->txt(
"glo_show_taxonomy_info"));
605 $this->form->addItem($show_tax);
609 $down =
new ilCheckboxInputGUI($this->lng->txt(
"cont_downloads"),
"glo_act_downloads");
611 $down->setInfo($this->lng->txt(
"cont_downloads_desc"));
612 $this->form->addItem($down);
614 if ($a_mode ==
"edit") {
615 $title->setValue($this->object->getTitle());
616 $desc->setValue($this->object->getDescription());
617 $online->setChecked($this->object->getOnline());
618 $glo_mode->setValue($this->object->getVirtualMode());
619 $pres_mode->setValue($this->object->getPresentationMode());
620 $snl->
setValue($this->object->getSnippetLength());
621 if (count($tax_ids) > 0) {
622 $show_tax->setChecked($this->object->getShowTaxonomy());
625 $down->setChecked($this->object->isActiveDownloads());
629 $feat->setTitle($this->lng->txt(
'obj_features'));
630 $this->form->addItem($feat);
633 $this->object->getId(),
643 $cols = $adv_ap->getColumnOrder();
644 if (count($cols) > 1) {
646 $this->form->addItem($ti);
651 $this->form->addCommandButton(
"saveProperties", $this->lng->txt(
"save"));
653 $this->form->setTitle($this->lng->txt(
"cont_glo_properties"));
654 $this->form->setFormAction($this->ctrl->getFormAction($this));
666 if ($this->form->checkInput()) {
667 $this->
object->setTitle(
$_POST[
'title']);
668 $this->
object->setDescription(
$_POST[
'description']);
670 $this->
object->setVirtualMode(
$_POST[
"glo_mode"]);
673 $this->
object->setPresentationMode(
$_POST[
"pres_mode"]);
674 $this->
object->setSnippetLength(
$_POST[
"snippet_length"]);
675 $this->
object->setShowTaxonomy(
$_POST[
"show_tax"]);
676 $this->
object->update();
679 $obj_service->commonSettings()->legacyForm($this->form, $this->
object)->saveTileImage();
683 $cols = $adv_ap->getColumnOrder();
684 if (count($cols) > 1) {
685 $adv_ap->saveColumnOrder(
$_POST[
"field_order"]);
692 $this->object->getId(),
701 if ($ecs->handleSettingsUpdate()) {
702 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
703 $this->ctrl->redirect($this,
"properties");
706 $this->form->setValuesByPost();
707 $this->tpl->setContent($this->form->getHTML());
721 $ti =
new ilTextInputGUI($this->lng->txt(
"cont_new_term"),
"new_term");
722 $ti->setMaxLength(80);
724 $this->toolbar->addInputItem($ti,
true);
727 $this->lng->loadLanguageModule(
"meta");
732 $s_lang = $this->
user->getLanguage();
736 $si->setValue($s_lang);
737 $this->toolbar->addInputItem(
$si,
true);
739 $this->toolbar->setFormAction($this->ctrl->getFormAction($this));
740 $this->toolbar->addFormButton($this->lng->txt(
"glo_add_new_term"),
"addTerm");
742 $this->toolbar->addSeparator();
745 if ($this->
user->clipboardHasObjectsOfType(
"term")) {
746 $this->toolbar->addButton(
747 $this->lng->txt(
"paste"),
748 $this->ctrl->getLinkTarget($this,
"pasteTerms")
750 $this->toolbar->addButton(
751 $this->lng->txt(
"clear_clipboard"),
752 $this->ctrl->getLinkTarget($this,
"clearClipboard")
755 $this->toolbar->addButton(
756 $this->lng->txt(
"glo_add_from_other"),
757 $this->ctrl->getLinkTargetByClass(
"ilglossaryforeigntermcollectorgui",
"")
778 $this->tpl->setContent($tab->getHTML());
789 $this->ctrl->setParameter($this,
"show_tax", 1);
790 $this->ctrl->redirect($this,
"listTerms");
801 $this->ctrl->setParameter($this,
"show_tax",
"");
802 $this->ctrl->redirect($this,
"listTerms");
817 $notoperations = array();
818 $operations = array();
822 if (count($operations) > 0) {
823 foreach ($operations as $val) {
824 $this->tpl->setCurrentBlock(
"tbl_action_btn");
825 $this->tpl->setVariable(
"BTN_NAME", $val[
"name"]);
826 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt($val[
"lng"]));
827 $this->tpl->parseCurrentBlock();
830 $this->tpl->setCurrentBlock(
"tbl_action_row");
832 $this->tpl->parseCurrentBlock();
841 if (trim(
$_POST[
"new_term"]) ==
"") {
843 $this->ctrl->redirect($this,
"listTerms");
848 $term->setGlossary($this->
object);
856 $def->setTermId(
$term->getId());
860 $this->ctrl->setParameterByClass(
"ilglossarydefpagegui",
"term_id",
$term->getId());
861 $this->ctrl->setParameterByClass(
"ilglossarydefpagegui",
"def", $def->getId());
862 $this->ctrl->redirectByClass(array(
"ilglossarytermgui",
863 "iltermdefinitioneditorgui",
"ilglossarydefpagegui"),
"edit");
872 $definition->moveUp();
874 $this->ctrl->redirect($this,
"listTerms");
883 $definition->moveDown();
885 $this->ctrl->redirect($this,
"listTerms");
902 $this->ctrl->setParameterByClass(
907 $link =
"[<a href='" .
908 $this->ctrl->getLinkTargetByClass(
"ilglossarytermgui",
"listUsages") .
909 "'>" . $this->lng->txt(
"glo_list_usages") .
"</a>]";
910 $add =
"<br/>" . sprintf($this->lng->txt(
"glo_term_is_used_n_times"), $nr) .
" " . $link;
914 $cgui->setHeaderText($this->lng->txt(
"info_delete_sure") . $add);
916 $cgui->setFormAction($this->ctrl->getFormAction($this));
917 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancelDefinitionDeletion");
918 $cgui->setConfirm($this->lng->txt(
"confirm"),
"deleteDefinition");
924 $this->tpl->setCurrentBlock(
"SyntaxStyle");
925 $this->tpl->setVariable(
926 "LOCATION_SYNTAX_STYLESHEET",
929 $this->tpl->parseCurrentBlock();
934 $page_gui->setStyleId($this->object->getStyleSheetId());
935 $page_gui->setSourcecodeDownloadScript(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=" .
$_GET[
"ref_id"]);
936 $page_gui->setFileDownloadLink(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=" .
$_GET[
"ref_id"]);
937 $page_gui->setFullscreenLink(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=" .
$_GET[
"ref_id"]);
938 $output = $page_gui->preview();
940 $cgui->addItem(
"def",
$_GET[
"def"],
$term->getTerm() . $output);
942 $this->tpl->setContent($cgui->getHTML());
947 $this->ctrl->redirect($this,
"listTerms");
954 $definition->delete();
955 $this->ctrl->redirect($this,
"listTerms");
977 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
978 $this->ctrl->redirect($this,
"listTerms");
991 $glo_exp->buildExportFile();
992 $this->ctrl->redirectByClass(
"ilexportgui",
"");
1001 $glo_exp->buildExportFile();
1003 $this->ctrl->redirectByClass(
"ilexportgui",
"");
1013 if (!isset(
$_POST[
"file"])) {
1014 $ilErr->raiseError($this->lng->txt(
"no_checkbox"),
$ilErr->MESSAGE);
1016 if (count(
$_POST[
"file"]) > 1) {
1017 $ilErr->raiseError($this->lng->txt(
"cont_select_max_one_item"),
$ilErr->MESSAGE);
1020 $file = explode(
":",
$_POST[
"file"][0]);
1021 $export_dir = $this->
object->getExportDirectory($file[0]);
1023 if ($this->object->getPublicExportFile($file[0]) ==
1025 $this->
object->setPublicExportFile($file[0],
"");
1027 $this->
object->setPublicExportFile($file[0], $file[1]);
1029 $this->
object->update();
1030 $this->ctrl->redirectByClass(
"ilexportgui",
"");
1046 if (!isset(
$_POST[
"id"])) {
1048 $this->ctrl->redirect($this,
"listTerms");
1056 $this->ctrl->redirect($this,
"listTerms");
1062 $cgui->setFormAction($this->ctrl->getFormAction($this));
1063 $cgui->setHeaderText($this->lng->txt(
"info_delete_sure"));
1064 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancelTermDeletion");
1065 $cgui->setConfirm($this->lng->txt(
"confirm"),
"deleteTerms");
1067 foreach (
$_POST[
"id"] as $id) {
1073 $this->ctrl->setParameterByClass(
1074 "ilglossarytermgui",
1080 $add =
" (" . $this->lng->txt(
"glo_term_reference") .
")";
1082 $link =
"[<a href='" .
1083 $this->ctrl->getLinkTargetByClass(
"ilglossarytermgui",
"listUsages") .
1084 "'>" . $this->lng->txt(
"glo_list_usages") .
"</a>]";
1085 $add =
"<div class='small'>" .
1086 sprintf($this->lng->txt(
"glo_term_is_used_n_times"), $nr) .
" " . $link .
"</div>";
1090 $cgui->addItem(
"id[]", $id,
$term->getTerm() . $add);
1093 $this->tpl->setContent($cgui->getHTML());
1103 $this->ctrl->redirect($this,
"listTerms");
1111 foreach (
$_POST[
"id"] as $id) {
1121 $this->ctrl->redirect($this,
"listTerms");
1133 if (strtolower(
$_GET[
"baseClass"]) !=
"ilglossaryeditorgui") {
1134 parent::setLocator($a_tree, $a_id);
1136 if (is_object($this->
object)) {
1138 if (is_object($this->term)) {
1139 $gloss_loc->setTerm($this->term);
1141 $gloss_loc->setGlossary($this->
object);
1143 $gloss_loc->display();
1162 switch (
$_POST[
"new_type"]) {
1165 $term_gui->create();
1173 $term_gui->setGlossary($this->
object);
1176 ilUtil::sendSuccess($this->lng->txt(
"cont_added_term"),
true);
1179 $this->ctrl->redirect($this,
"listTerms");
1191 if ($term_glo_id != $this->object->getId()) {
1193 $this->ctrl->redirect($this,
"listTerms");
1201 $def->setTermId(
$term->getId());
1205 $this->ctrl->setParameterByClass(
"ilglossarydefpagegui",
"term_id",
$term->getId());
1206 $this->ctrl->setParameterByClass(
"ilglossarydefpagegui",
"def", $def->getId());
1207 $this->ctrl->redirectByClass(array(
"ilglossarytermgui",
1208 "iltermdefinitioneditorgui",
"ilglossarydefpagegui"),
"edit");
1213 $this->tpl->loadStandardTemplate();
1215 $title = $this->
object->getTitle();
1218 if ($this->term_id > 0) {
1219 $this->tpl->setTitle($this->lng->txt(
"term") .
": " .
1222 parent::setTitleAndDescription();
1224 $this->tpl->setTitle($this->lng->txt(
"glo") .
": " . $title);
1241 $this->
help->setScreenIdComponent(
"glo");
1244 $force_active = (
$_GET[
"cmd"] ==
"" ||
$_GET[
"cmd"] ==
"listTerms")
1247 $this->tabs_gui->addTarget(
1249 $this->ctrl->getLinkTarget($this,
"listTerms"),
1250 array(
"listTerms",
""),
1256 $force_active =
false;
1257 if ($this->ctrl->getCmd() ==
"showSummary" ||
1258 strtolower($this->ctrl->getNextClass()) ==
"ilinfoscreengui") {
1259 $force_active =
true;
1261 $this->tabs_gui->addTarget(
1263 $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"),
1271 if ($this->rbacsystem->checkAccess(
'write', $this->object->getRefId())) {
1272 $this->tabs_gui->addTarget(
1274 $this->ctrl->getLinkTarget($this,
"properties"),
1281 $mdtab = $mdgui->getTab();
1283 $this->tabs_gui->addTarget(
1287 "ilobjectmetadatagui" 1297 $this->tabs_gui->addTarget(
1299 $this->ctrl->getLinkTargetByClass(
"ilexportgui",
""),
1306 if ($this->rbacsystem->checkAccess(
'edit_permission', $this->object->getRefId())) {
1312 $this->tabs_gui->addTarget(
1314 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
1315 array(
"perm",
"info",
"owner"),
1320 $this->tabs_gui->addNonTabbedLink(
1321 "presentation_view",
1322 $this->lng->txt(
"glo_presentation_view"),
1323 "ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=" . $this->
object->getRefID(),
1335 array(
"general_settings",
"style",
"taxonomy",
"glossaries")
1338 $this->tabs->addSubTab(
1340 $this->lng->txt(
"settings"),
1341 $this->ctrl->getLinkTarget($this,
'properties')
1345 $this->tabs->addSubTab(
1347 $this->lng->txt(
"obj_sty"),
1348 $this->ctrl->getLinkTarget($this,
'editStyleProperties')
1353 $this->tabs->addSubTab(
1355 $this->lng->txt(
"tax_taxonomy"),
1356 $this->ctrl->getLinkTargetByClass(
"ilobjtaxonomygui",
'')
1360 $this->tabs->addSubTab(
1362 $this->lng->txt(
"cont_auto_glossaries"),
1363 $this->ctrl->getLinkTarget($this,
'editGlossaries')
1366 $this->tabs->activateSubTab($a_active);
1380 $lng = $DIC->language();
1381 $ilAccess = $DIC->access();
1384 if ($ilAccess->checkAccess(
"read",
"", $a_target)) {
1385 $_GET[
"ref_id"] = $a_target;
1386 $_GET[
"baseClass"] =
"ilGlossaryPresentationGUI";
1387 include(
"ilias.php");
1389 } elseif ($ilAccess->checkAccess(
"visible",
"", $a_target)) {
1390 $_GET[
"ref_id"] = $a_target;
1391 $_GET[
"cmd"] =
"infoScreen";
1392 $_GET[
"baseClass"] =
"ilGlossaryPresentationGUI";
1393 include(
"ilias.php");
1397 $lng->txt(
"msg_no_perm_read_item"),
1412 $prtab->resetOffset();
1413 $prtab->writeFilterToSession();
1424 $prtab->resetOffset();
1425 $prtab->resetFilter();
1439 if ($a_tpl != null) {
1445 $ctpl->setCurrentBlock(
"ContentStyle");
1447 "LOCATION_CONTENT_STYLESHEET",
1450 $ctpl->parseCurrentBlock();
1462 $this->tpl->setContent($this->form->getHTML());
1464 $this->tabs->activateTab(
"settings");
1473 $this->lng->loadLanguageModule(
"style");
1477 $fixed_style = $this->setting->get(
"fixed_content_style_id");
1478 $style_id = $this->
object->getStyleSheetId();
1480 if ($fixed_style > 0) {
1483 $this->lng->txt(
"global_fixed") .
")");
1484 $this->form->addItem($st);
1492 $st_styles[0] = $this->lng->txt(
"default");
1495 if ($style_id > 0) {
1500 $this->form->addItem($st);
1505 $this->form->addCommandButton(
1507 $this->lng->txt(
"style_edit_style")
1509 $this->form->addCommandButton(
1511 $this->lng->txt(
"style_delete_style")
1525 $style_sel =
new ilSelectInputGUI($this->lng->txt(
"style_current_style"),
"style_id");
1526 $style_sel->setOptions($st_styles);
1527 $style_sel->setValue($style_id);
1528 $this->form->addItem($style_sel);
1530 $this->form->addCommandButton(
1531 "saveStyleSettings",
1532 $this->lng->txt(
"save")
1534 $this->form->addCommandButton(
1536 $this->lng->txt(
"sty_create_ind_style")
1540 $this->form->setTitle($this->lng->txt(
"glo_style"));
1541 $this->form->setFormAction($this->ctrl->getFormAction($this));
1549 $this->ctrl->redirectByClass(
"ilobjstylesheetgui",
"create");
1557 $this->ctrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
1565 $this->ctrl->redirectByClass(
"ilobjstylesheetgui",
"delete");
1573 if ($this->setting->get(
"fixed_content_style_id") <= 0 &&
1575 || $this->object->getStyleSheetId() == 0)) {
1577 $this->
object->update();
1578 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
1580 $this->ctrl->redirect($this,
"editStyleProperties");
1588 if ($this->object->getPublicExportFile($a_type) == $a_file) {
1589 return $this->lng->txt(
"yes");
1604 $ctrl = $DIC->ctrl();
1607 if (count($tax_ids) > 0) {
1608 $tax_id = $tax_ids[0];
1609 $DIC->globalScreen()->tool()->context()->current()
1610 ->addAdditionalData(
1614 $DIC->globalScreen()->tool()->context()->current()
1615 ->addAdditionalData(
1617 $ctrl->getCurrentClassPath()
1619 $DIC->globalScreen()->tool()->context()->current()
1620 ->addAdditionalData(
1624 $DIC->globalScreen()->tool()->context()->current()
1625 ->addAdditionalData(
1629 $DIC->globalScreen()->tool()->context()->current()
1630 ->addAdditionalData(
1643 if (!$tax_exp->handleCommand()) {
1662 $this->tabs->setTabActive(
"settings");
1665 $this->toolbar->addButton(
1666 $this->lng->txt(
"add"),
1667 $this->ctrl->getLinkTarget($this,
"showGlossarySelector")
1672 $this->tpl->setContent($tab->getHTML());
1683 $this->tabs->setTabActive(
"settings");
1687 $exp->
setExpand(
$_GET[
"search_root_expand"] ?
$_GET[
"search_root_expand"] : $this->tree->readRootId());
1688 $exp->setExpandTarget($this->ctrl->getLinkTarget($this,
'showGlossarySelector'));
1689 $exp->setTargetClass(get_class($this));
1690 $exp->setCmd(
'confirmGlossarySelection');
1691 $exp->setClickableTypes(array(
"glo"));
1692 $exp->addFilter(
"glo");
1696 $this->tpl->setContent($exp->getOutput());
1705 $this->ctrl->setParameter($this,
"glo_ref_id",
$_GET[
"root_id"]);
1706 $cgui->setFormAction($this->ctrl->getFormAction($this));
1707 $cgui->setHeaderText($this->lng->txt(
"glo_link_glo_in_glo"));
1708 $cgui->setCancel($this->lng->txt(
"no"),
"selectGlossary");
1709 $cgui->setConfirm($this->lng->txt(
"yes"),
"selectGlossaryLink");
1710 $this->tpl->setContent($cgui->getHTML());
1721 $glo_ref_id = (int)
$_GET[
"glo_ref_id"];
1723 $this->
object->autoLinkGlossaryTerms($glo_ref_id);
1736 $glos = $this->
object->getAutoGlossaries();
1737 $glo_ref_id = (int)
$_GET[
"glo_ref_id"];
1739 if (!in_array($glo_id, $glos)) {
1742 $this->
object->setAutoGlossaries($glos);
1743 $this->
object->update();
1745 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
1746 $this->ctrl->redirect($this,
"editGlossaries");
1757 $this->
object->removeAutoGlossary((
int)
$_GET[
"glo_id"]);
1758 $this->
object->update();
1760 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
1761 $this->ctrl->redirect($this,
"editGlossaries");
1773 if (!is_array($items)) {
1775 $this->ctrl->redirect($this,
"listTerms");
1778 $this->
user->clipboardDeleteObjectsOfType(
"term");
1781 $time = date(
"Y-m-d H:i:s", time());
1783 foreach ($items as $id) {
1784 $this->
user->addObjectToClipboard(
1795 ilUtil::sendInfo($this->lng->txt(
"glo_selected_terms_have_been_copied"),
true);
1796 $this->ctrl->redirect($this,
"listTerms");
1808 if (!is_array($items)) {
1810 $this->ctrl->redirect($this,
"listTerms");
1813 $this->
user->clipboardDeleteObjectsOfType(
"term");
1816 $time = date(
"Y-m-d H:i:s", time());
1818 foreach ($items as $id) {
1819 $this->
user->addObjectToClipboard(
1830 ilUtil::sendInfo($this->lng->txt(
"glo_selected_terms_have_been_copied"),
true);
1831 $this->ctrl->redirect($this,
"listTerms");
1843 $this->
user->clipboardDeleteObjectsOfType(
"term");
1844 $this->ctrl->redirect($this,
"listTerms");
1853 foreach ($this->
user->getClipboardObjects(
"term") as $item) {
1859 foreach ($this->
user->getClipboardObjects(
"term") as $item) {
1864 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
1865 $this->ctrl->redirect($this,
"listTerms");
static getContentStylePath($a_style_id, $add_random=true, $add_token=true)
get content style path
__construct($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
Constructor public.
static getInstance(ilObjGlossaryGUI $a_glossary_gui)
Get instance.
static getInstance()
Get instance.
This class represents an option in a radio group.
showInfoScreen()
Show info screen.
saveObject()
save new content object to db
static isReferenced($a_glo_id, $a_term_id)
Is a term referenced by one or multiple glossaries.
setSettingsSubTabs($a_active)
Set sub tabs.
setValue($a_value)
Set Value.
setTemplateOutput($a_output=true)
static getUsageOfObject($a_obj_id, $a_include_titles=false)
Get usage of object.
cancelTermDeletion()
cancel deletion of object
deleteTerm($a_term_id)
Delete term.
GUI class for the workflow of copying objects.
const TITLE_LENGTH
max length of object title
deleteTerms()
delete selected terms
editGlossaries()
Edit automatically linked glossaries.
static getNumberOfUsages($a_term_id)
Get number of usages.
moveDefinitionUp()
move a definiton up
cancelDefinitionDeletion()
initSettingsForm($a_mode="edit")
Init settings form.
Taxonomy explorer GUI class.
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
executeCommand()
execute command
static _lookupTitle($a_id)
lookup object title
static _getStandardStyles( $a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
removeGlossary()
Remove lm glossary.
exportHTML()
create html package
createObject()
create new object form
export()
export content object
addTerm($a_term_id)
Add term.
showActions($a_actions)
show possible action (form buttons)
resetFilter()
Reset filter (note: this function existed before data table filter has been introduced.
setInfo($a_info)
Set Info.
static _getAllReferences($a_id)
get all reference ids of object
deleteStyle()
Delete Style.
editStyleProperties()
Edit style properties.
showTaxonomy()
Show taxonomy.
static _lookupStandard($a_id)
Lookup standard flag.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
Export User Interface Class.
moveDefinitionDown()
move a definiton down
prepareOutput($a_show_subobjects=true)
prepare output
TableGUI class for auto link glossaries.
setValue($a_value)
Set Value.
deactTaxonomy()
Hide Taxonomy.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
confirmGlossarySelection()
Confirm glossary selection.
actTaxonomy()
Show Taxonomy.
selectGlossaryLink()
Select a glossary and link all its terms.
create()
create new (subobject) in glossary
initDidacticTemplate(ilPropertyFormGUI $form)
Show didactic template types.
Class ilObjectGUI Basic methods of all Output classes.
static _lookupObjId($a_id)
saveProperties()
save properties
omitLocator($a_omit=true)
static addUsagesToInfo($info, $glo_id)
Add usages to info.
setCols($a_cols)
Set Cols.
GUI class for glossary terms.
confirmTermDeletion()
confirm term deletion
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static getSyntaxStylePath()
get syntax style path
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
initCreateForm($a_new_type)
addDefinition()
add definition
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
setLocator($a_tree="", $a_id="")
set Locator
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.
static _lookGlossaryID($term_id)
get glossary id form term id
Class ilGlossaryDefinition.
createStyle()
Create Style.
static _copyTerm($a_term_id, $a_glossary_id)
Copy a term to a glossary.
setContentStyleSheet($a_tpl=null)
Set content style sheet.
static getScormModulesForGlossary($a_glo_id)
Get SCORM modules that assign a certain glossary.
properties()
edit properties of object (admin form)
static formSelect( $selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
This class represents a non editable value in a property form.
Class ilObjStyleSheetGUI.
static _goto($a_target)
redirect script
__construct(Container $dic, ilPlugin $plugin)
This class represents a text area property in a property form.
Glossary definition page GUI class.
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
selectGlossary()
Select lm glossary.
getCreationMode()
get creation mode
referenceTerms()
Reference terms.
putObjectInTree(ilObject $a_obj, $a_parent_node_id=null)
Add object to tree at given position.
confirmDefinitionDeletion()
deletion confirmation screen
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
getDidacticTemplateVar($a_type)
Get didactic template setting from creation screen.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static getLogger($a_component_id)
Get component logger.
Export class for content objects.
getObjectService()
Get object service.
getPublicAccessColValue($a_type, $a_file)
Get public access value for export table.
static yn2tf($a_yn)
convert "y"/"n" to true/false
applyFilter()
Apply filter.
showGlossarySelector()
Select LM Glossary.
static setAction($a_action)
publishExportFile()
download export file
static redirect($a_script)
addHeaderAction()
Add header action menu.
saveStyleSettings()
Save style settings.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
static _lookGlossaryTerm($term_id)
get glossary term
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
static setShortTextsDirty($a_glo_id)
Set short texts dirty.
setExpand($a_node_id)
set the expand option this value is stored in a SESSION variable to save it different view (lo view...
for($i=6; $i< 13; $i++) for($i=1; $i< 13; $i++) $d
Class ilECSGlossarySettings.
initStylePropertiesForm()
Init style properties form.
Confirmation screen class.
clearClipboard()
Clear clipboard.
static loadLanguageModule()
Load language module.