87    public function __construct($a_data, $a_id = 0, $a_call_by_reference = 
true, $a_prepare_output = 
true)
 
   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);
 
  180                $style_gui->omitLocator();
 
  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":
 
  216                $this->ctrl->forwardCommand($gui);
 
  219            case "ilobjtaxonomygui":
 
  224                $this->tabs->activateTab(
"settings");
 
  227                $this->ctrl->setReturn($this, 
"properties");
 
  229                $tax_gui->setMultiple(
false);
 
  231                $tax_gui->setAssignedObject($this->object->getId());
 
  232                $ret = $this->ctrl->forwardCommand($tax_gui);
 
  238                $this->tabs->activateTab(
"export");
 
  242                $exp_gui->addFormat(
"xml");
 
  243                $exp_gui->addFormat(
"html", 
"", $this, 
"exportHTML");
 
  244                $exp_gui->addCustomColumn(
 
  245                    $this->lng->txt(
"cont_public_access"),
 
  247                    "getPublicAccessColValue" 
  249                $exp_gui->addCustomMultiCommand(
 
  250                    $this->lng->txt(
"cont_public_access"),
 
  254                $ret = $this->ctrl->forwardCommand($exp_gui);
 
  257            case 'ilobjectcopygui':
 
  261                $this->ctrl->forwardCommand($cp);
 
  264            case "ilglossaryforeigntermcollectorgui":
 
  265                $this->ctrl->setReturn($this, 
"");
 
  271                $this->ctrl->forwardCommand($coll);
 
  275                $cmd = $this->ctrl->getCmd(
"listTerms");
 
  277                if (($cmd == 
"create") && (
$_POST[
"new_type"] == 
"term")) {
 
  278                    $this->ctrl->setCmd(
"create");
 
  279                    $this->ctrl->setCmdClass(
"ilGlossaryTermGUI");
 
  283                    if (!in_array($cmd, array(
"quickList"))) {
 
  284                        if (strtolower(
$_GET[
"baseClass"]) == 
"iladministrationgui" ||
 
  294                            if ($cmd == 
"redrawHeaderAction") {
 
  295                                $cmd = 
"redrawHeaderActionObject";
 
  299                    $ret = $this->$cmd();
 
  304        if (!in_array($cmd, array(
"quickList"))) {
 
  305            if (strtolower(
$_GET[
"baseClass"]) != 
"iladministrationgui") {
 
  307                    $this->tpl->printToStdout();
 
  311            $this->tpl->printToStdout(
false);
 
  323        $form->setTarget(
"_top");
 
  324        $form->setFormAction($this->ctrl->getFormAction($this));
 
  325        $form->setTitle($this->lng->txt($a_new_type . 
"_new"));
 
  331        $ti->setRequired(
true);
 
  342                        "none" => $this->lng->txt(
"glo_mode_normal"),
 
  343                        "level" => $this->lng->txt(
"glo_mode_level"),
 
  344                        "subtree" => $this->lng->txt(
"glo_mode_subtree")
 
  347        $tm->setOptions($stati);
 
  348        $tm->setInfo($this->lng->txt(
"glo_mode_desc"));
 
  349        $tm->setRequired(
true);
 
  352        $form->addCommandButton(
"save", $this->lng->txt($a_new_type . 
"_add"));
 
  353        $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
 
  370        $new_type = $_REQUEST[
"new_type"];
 
  374            $ilErr->raiseError($this->lng->txt(
"no_create_permission"), 
$ilErr->MESSAGE);
 
  377        $this->lng->loadLanguageModule($new_type);
 
  378        $this->ctrl->setParameter($this, 
"new_type", $new_type);
 
  381        if ($form->checkInput()) {
 
  382            $this->ctrl->setParameter($this, 
"new_type", 
"");
 
  385            $newObj->setType($new_type);
 
  386            $newObj->setTitle($form->getInput(
"title"));
 
  387            $newObj->setDescription($form->getInput(
"desc"));
 
  388            $newObj->setVirtualMode($form->getInput(
"glo_mode"));
 
  394            ilUtil::sendSuccess($this->lng->txt(
"glo_added"), 
true);
 
  395            ilUtil::redirect(
"ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=" . $newObj->getRefId());
 
  399        $form->setValuesByPost();
 
  400        $this->tpl->setContent($form->getHtml());
 
  414        $this->lng->loadLanguageModule(
"meta");
 
  417        $info->enablePrivateNotes();
 
  419        if ($this->access->checkAccess(
"write", 
"", 
$_GET[
"ref_id"])) {
 
  420            $info->enableNewsEditing();
 
  422            $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
 
  423            if ($enable_internal_rss) {
 
  424                $info->setBlockProperty(
"news", 
"settings", 
true);
 
  427        $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
 
  431        $this->ctrl->forwardCommand($info);
 
  445        $ilAccess = 
$DIC->access();
 
  447        $info->addSection(
$lng->txt(
"glo_usages"));
 
  449        foreach ($sms as $sm) {
 
  452            foreach ($refs as $ref) {
 
  453                if ($link === 
false) {
 
  454                    if ($ilAccess->checkAccess(
"write", 
"", $ref)) {
 
  461            if ($link !== 
false) {
 
  462                $entry = 
"<a href='" . $link . 
"' target='_top'>" . $entry . 
"</a>";
 
  465            $info->addProperty(
$lng->txt(
"obj_sahs"), $entry);
 
  474        if (strtolower(
$_GET[
"baseClass"]) == 
"iladministrationgui") {
 
  475            parent::viewObject();
 
  479        if (!$this->rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
 
  480            $ilErr->raiseError($this->lng->txt(
"permission_denied"), 
$ilErr->MESSAGE);
 
  499        $ecs->addSettingsToForm($this->form, 
'glo');
 
  501        $this->tpl->setContent($this->form->getHTML());
 
  518        $title->setRequired(
true);
 
  519        $this->form->addItem($title);
 
  523        $this->form->addItem($desc);
 
  525        $this->lng->loadLanguageModule(
"rep");
 
  527        $section->setTitle($this->lng->txt(
'rep_activation_availability'));
 
  532        $online->setValue(
"y");
 
  533        $online->setInfo($this->lng->txt(
"glo_online_info"));
 
  534        $this->form->addItem($online);
 
  537        $section->setTitle($this->lng->txt(
'glo_content_settings'));
 
  543        $op1 = 
new ilRadioOption($this->lng->txt(
"glo_mode_normal"), 
"none", $this->lng->txt(
"glo_mode_normal_info"));
 
  544        $glo_mode->addOption($op1);
 
  545        $op2 = 
new ilRadioOption($this->lng->txt(
"glo_mode_level"), 
"level", $this->lng->txt(
"glo_mode_level_info"));
 
  546        $glo_mode->addOption($op2);
 
  547        $op3 = 
new ilRadioOption($this->lng->txt(
"glo_mode_subtree"), 
"subtree", $this->lng->txt(
"glo_mode_subtree_info"));
 
  548        $glo_mode->addOption($op3);
 
  549        $this->form->addItem($glo_mode);
 
  564        $section->setTitle($this->lng->txt(
'cont_presentation'));
 
  568        $obj_service->commonSettings()->legacyForm($this->form, $this->
object)->addTileImage();
 
  572        $pres_mode->setValue(
"table");
 
  573        $op1 = 
new ilRadioOption($this->lng->txt(
"glo_table_form"), 
"table", $this->lng->txt(
"glo_table_form_info"));
 
  576        $snl = 
new ilNumberInputGUI($this->lng->txt(
"glo_text_snippet_length"), 
"snippet_length");
 
  577        $snl->setMaxValue(3000);
 
  578        $snl->setMinValue(100);
 
  579        $snl->setMaxLength(4);
 
  581        $snl->setInfo($this->lng->txt(
"glo_text_snippet_length_info"));
 
  583        $op1->addSubItem($snl);
 
  585        $pres_mode->addOption($op1);
 
  586        $op2 = 
new ilRadioOption($this->lng->txt(
"glo_full_definitions"), 
"full_def", $this->lng->txt(
"glo_full_definitions_info"));
 
  587        $pres_mode->addOption($op2);
 
  588        $this->form->addItem($pres_mode);
 
  592        if (count($tax_ids) > 0) {
 
  594            $show_tax->setInfo($this->lng->txt(
"glo_show_taxonomy_info"));
 
  595            $this->form->addItem($show_tax);
 
  599        $down = 
new ilCheckboxInputGUI($this->lng->txt(
"cont_downloads"), 
"glo_act_downloads");
 
  600        $down->setValue(
"y");
 
  601        $down->setInfo($this->lng->txt(
"cont_downloads_desc"));
 
  602        $this->form->addItem($down);
 
  604        if ($a_mode == 
"edit") {
 
  605            $title->setValue($this->object->getTitle());
 
  606            $desc->setValue($this->object->getDescription());
 
  607            $online->setChecked($this->object->getOnline());
 
  608            $glo_mode->setValue($this->object->getVirtualMode());
 
  609            $pres_mode->setValue($this->object->getPresentationMode());
 
  610            $snl->setValue($this->object->getSnippetLength());
 
  611            if (count($tax_ids) > 0) {
 
  612                $show_tax->setChecked($this->object->getShowTaxonomy());
 
  615            $down->setChecked($this->object->isActiveDownloads());
 
  619            $feat->setTitle($this->lng->txt(
'obj_features'));
 
  620            $this->form->addItem($feat);
 
  623                $this->object->getId(),
 
  633        $cols = $adv_ap->getColumnOrder();
 
  634        if (count(
$cols) > 1) {
 
  636            $this->form->addItem($ti);
 
  637            $ti->setValue(
$cols);
 
  641        $this->form->addCommandButton(
"saveProperties", $this->lng->txt(
"save"));
 
  643        $this->form->setTitle($this->lng->txt(
"cont_glo_properties"));
 
  644        $this->form->setFormAction($this->ctrl->getFormAction($this));
 
  656        if ($this->form->checkInput()) {
 
  657            $this->
object->setTitle(
$_POST[
'title']);
 
  658            $this->
object->setDescription(
$_POST[
'description']);
 
  660            $this->
object->setVirtualMode(
$_POST[
"glo_mode"]);
 
  663            $this->
object->setPresentationMode(
$_POST[
"pres_mode"]);
 
  664            $this->
object->setSnippetLength(
$_POST[
"snippet_length"]);
 
  665            $this->
object->setShowTaxonomy(
$_POST[
"show_tax"]);
 
  666            $this->
object->update();
 
  669            $obj_service->commonSettings()->legacyForm($this->form, $this->
object)->saveTileImage();
 
  673            $cols = $adv_ap->getColumnOrder();
 
  674            if (count(
$cols) > 1) {
 
  675                $adv_ap->saveColumnOrder(
$_POST[
"field_order"]);
 
  682                $this->object->getId(),
 
  691            if ($ecs->handleSettingsUpdate()) {
 
  692                ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"), 
true);
 
  693                $this->ctrl->redirect($this, 
"properties");
 
  696        $this->form->setValuesByPost();
 
  697        $this->tpl->setContent($this->form->getHTML());
 
  711        $ti = 
new ilTextInputGUI($this->lng->txt(
"cont_new_term"), 
"new_term");
 
  712        $ti->setMaxLength(80);
 
  714        $this->toolbar->addInputItem($ti, 
true);
 
  717        $this->lng->loadLanguageModule(
"meta");
 
  722            $s_lang = $this->
user->getLanguage();
 
  726        $si->setValue($s_lang);
 
  727        $this->toolbar->addInputItem(
$si, 
true);
 
  729        $this->toolbar->setFormAction($this->ctrl->getFormAction($this));
 
  730        $this->toolbar->addFormButton($this->lng->txt(
"glo_add_new_term"), 
"addTerm");
 
  732        $this->toolbar->addSeparator();
 
  735        if ($this->
user->clipboardHasObjectsOfType(
"term")) {
 
  736            $this->toolbar->addButton(
 
  737                $this->lng->txt(
"paste"),
 
  738                $this->ctrl->getLinkTarget($this, 
"pasteTerms")
 
  740            $this->toolbar->addButton(
 
  741                $this->lng->txt(
"clear_clipboard"),
 
  742                $this->ctrl->getLinkTarget($this, 
"clearClipboard")
 
  745            $this->toolbar->addButton(
 
  746                $this->lng->txt(
"glo_add_from_other"),
 
  747                $this->ctrl->getLinkTargetByClass(
"ilglossaryforeigntermcollectorgui", 
"")
 
  768        $this->tpl->setContent(
$tab->getHTML());
 
  779        $this->ctrl->setParameter($this, 
"show_tax", 1);
 
  780        $this->ctrl->redirect($this, 
"listTerms");
 
  791        $this->ctrl->setParameter($this, 
"show_tax", 
"");
 
  792        $this->ctrl->redirect($this, 
"listTerms");
 
  807        $notoperations = array();
 
  808        $operations = array();
 
  812        if (count($operations) > 0) {
 
  813            foreach ($operations as $val) {
 
  814                $this->tpl->setCurrentBlock(
"tbl_action_btn");
 
  815                $this->tpl->setVariable(
"BTN_NAME", $val[
"name"]);
 
  816                $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt($val[
"lng"]));
 
  817                $this->tpl->parseCurrentBlock();
 
  820            $this->tpl->setCurrentBlock(
"tbl_action_row");
 
  822            $this->tpl->parseCurrentBlock();
 
  831        if (trim(
$_POST[
"new_term"]) == 
"") {
 
  833            $this->ctrl->redirect($this, 
"listTerms");
 
  838        $term->setGlossary($this->
object);
 
  846        $def->setTermId(
$term->getId());
 
  850        $this->ctrl->setParameterByClass(
"ilglossarydefpagegui", 
"term_id", 
$term->getId());
 
  851        $this->ctrl->setParameterByClass(
"ilglossarydefpagegui", 
"def", $def->getId());
 
  852        $this->ctrl->redirectByClass(array(
"ilglossarytermgui",
 
  853            "iltermdefinitioneditorgui", 
"ilglossarydefpagegui"), 
"edit");
 
  862        $definition->moveUp();
 
  864        $this->ctrl->redirect($this, 
"listTerms");
 
  873        $definition->moveDown();
 
  875        $this->ctrl->redirect($this, 
"listTerms");
 
  892            $this->ctrl->setParameterByClass(
 
  897            $link = 
"[<a href='" .
 
  898                $this->ctrl->getLinkTargetByClass(
"ilglossarytermgui", 
"listUsages") .
 
  899                "'>" . $this->lng->txt(
"glo_list_usages") . 
"</a>]";
 
  900            $add = 
"<br/>" . sprintf($this->lng->txt(
"glo_term_is_used_n_times"), $nr) . 
" " . $link;
 
  904        $cgui->setHeaderText($this->lng->txt(
"info_delete_sure") . $add);
 
  906        $cgui->setFormAction($this->ctrl->getFormAction($this));
 
  907        $cgui->setCancel($this->lng->txt(
"cancel"), 
"cancelDefinitionDeletion");
 
  908        $cgui->setConfirm($this->lng->txt(
"confirm"), 
"deleteDefinition");
 
  914        $this->tpl->setCurrentBlock(
"SyntaxStyle");
 
  915        $this->tpl->setVariable(
 
  916            "LOCATION_SYNTAX_STYLESHEET",
 
  919        $this->tpl->parseCurrentBlock();
 
  923        $page_gui->setTemplateOutput(
false);
 
  924        $page_gui->setStyleId($this->object->getStyleSheetId());
 
  925        $page_gui->setSourcecodeDownloadScript(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=" . 
$_GET[
"ref_id"]);
 
  926        $page_gui->setFileDownloadLink(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=" . 
$_GET[
"ref_id"]);
 
  927        $page_gui->setFullscreenLink(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=" . 
$_GET[
"ref_id"]);
 
  928        $output = $page_gui->preview();
 
  930        $cgui->addItem(
"def", 
$_GET[
"def"], 
$term->getTerm() . $output);
 
  932        $this->tpl->setContent($cgui->getHTML());
 
  937        $this->ctrl->redirect($this, 
"listTerms");
 
  944        $definition->delete();
 
  945        $this->ctrl->redirect($this, 
"listTerms");
 
  967        ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"), 
true);
 
  968        $this->ctrl->redirect($this, 
"listTerms");
 
  981        $glo_exp->buildExportFile();
 
  982        $this->ctrl->redirectByClass(
"ilexportgui", 
"");
 
  991        $glo_exp->buildExportFile();
 
  993        $this->ctrl->redirectByClass(
"ilexportgui", 
"");
 
 1003        if (!isset(
$_POST[
"file"])) {
 
 1004            $ilErr->raiseError($this->lng->txt(
"no_checkbox"), 
$ilErr->MESSAGE);
 
 1006        if (count(
$_POST[
"file"]) > 1) {
 
 1007            $ilErr->raiseError($this->lng->txt(
"cont_select_max_one_item"), 
$ilErr->MESSAGE);
 
 1010        $file = explode(
":", 
$_POST[
"file"][0]);
 
 1011        $export_dir = $this->
object->getExportDirectory($file[0]);
 
 1013        if ($this->object->getPublicExportFile($file[0]) ==
 
 1015            $this->
object->setPublicExportFile($file[0], 
"");
 
 1017            $this->
object->setPublicExportFile($file[0], $file[1]);
 
 1019        $this->
object->update();
 
 1020        $this->ctrl->redirectByClass(
"ilexportgui", 
"");
 
 1036        if (!isset(
$_POST[
"id"])) {
 
 1038            $this->ctrl->redirect($this, 
"listTerms");
 
 1046                $this->ctrl->redirect($this, 
"listTerms");
 
 1052        $cgui->setFormAction($this->ctrl->getFormAction($this));
 
 1053        $cgui->setHeaderText($this->lng->txt(
"info_delete_sure"));
 
 1054        $cgui->setCancel($this->lng->txt(
"cancel"), 
"cancelTermDeletion");
 
 1055        $cgui->setConfirm($this->lng->txt(
"confirm"), 
"deleteTerms");
 
 1057        foreach (
$_POST[
"id"] as $id) {
 
 1063                $this->ctrl->setParameterByClass(
 
 1064                    "ilglossarytermgui",
 
 1070                    $add = 
" (" . $this->lng->txt(
"glo_term_reference") . 
")";
 
 1072                    $link = 
"[<a href='" .
 
 1073                        $this->ctrl->getLinkTargetByClass(
"ilglossarytermgui", 
"listUsages") .
 
 1074                        "'>" . $this->lng->txt(
"glo_list_usages") . 
"</a>]";
 
 1075                    $add = 
"<div class='small'>" .
 
 1076                        sprintf($this->lng->txt(
"glo_term_is_used_n_times"), $nr) . 
" " . $link . 
"</div>";
 
 1080            $cgui->addItem(
"id[]", $id, 
$term->getTerm() . $add);
 
 1083        $this->tpl->setContent($cgui->getHTML());
 
 1093        $this->ctrl->redirect($this, 
"listTerms");
 
 1101        foreach (
$_POST[
"id"] as $id) {
 
 1104                $refs->deleteTerm($id);
 
 1111        $this->ctrl->redirect($this, 
"listTerms");
 
 1123        if (strtolower(
$_GET[
"baseClass"]) != 
"ilglossaryeditorgui") {
 
 1124            parent::setLocator($a_tree, $a_id);
 
 1126            if (is_object($this->
object)) {
 
 1128                if (is_object($this->term)) {
 
 1129                    $gloss_loc->setTerm($this->term);
 
 1131                $gloss_loc->setGlossary($this->
object);
 
 1133                $gloss_loc->display();
 
 1152        switch (
$_POST[
"new_type"]) {
 
 1155                $term_gui->create();
 
 1163        $term_gui->setGlossary($this->
object);
 
 1166        ilUtil::sendSuccess($this->lng->txt(
"cont_added_term"), 
true);
 
 1169        $this->ctrl->redirect($this, 
"listTerms");
 
 1181        if ($term_glo_id != $this->object->getId()) {
 
 1183            $this->ctrl->redirect($this, 
"listTerms");
 
 1191        $def->setTermId(
$term->getId());
 
 1195        $this->ctrl->setParameterByClass(
"ilglossarydefpagegui", 
"term_id", 
$term->getId());
 
 1196        $this->ctrl->setParameterByClass(
"ilglossarydefpagegui", 
"def", $def->getId());
 
 1197        $this->ctrl->redirectByClass(array(
"ilglossarytermgui",
 
 1198            "iltermdefinitioneditorgui", 
"ilglossarydefpagegui"), 
"edit");
 
 1203        $this->tpl->loadStandardTemplate();
 
 1205        $title = $this->
object->getTitle();
 
 1208        if ($this->term_id > 0) {
 
 1209            $this->tpl->setTitle($this->lng->txt(
"term") . 
": " .
 
 1212            parent::setTitleAndDescription();
 
 1214            $this->tpl->setTitle($this->lng->txt(
"glo") . 
": " . $title);
 
 1231        $this->
help->setScreenIdComponent(
"glo");
 
 1234        $force_active = (
$_GET[
"cmd"] == 
"" || 
$_GET[
"cmd"] == 
"listTerms")
 
 1237        $this->tabs_gui->addTarget(
 
 1239            $this->ctrl->getLinkTarget($this, 
"listTerms"),
 
 1240            array(
"listTerms", 
""),
 
 1246        $force_active = 
false;
 
 1247        if ($this->ctrl->getCmd() == 
"showSummary" ||
 
 1248            strtolower($this->ctrl->getNextClass()) == 
"ilinfoscreengui") {
 
 1249            $force_active = 
true;
 
 1251        $this->tabs_gui->addTarget(
 
 1253            $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui", 
"showSummary"),
 
 1261        if ($this->rbacsystem->checkAccess(
'write', $this->object->getRefId())) {
 
 1262            $this->tabs_gui->addTarget(
 
 1264                $this->ctrl->getLinkTarget($this, 
"properties"),
 
 1271            $mdtab = $mdgui->getTab();
 
 1273                $this->tabs_gui->addTarget(
 
 1277                    "ilobjectmetadatagui" 
 1287            $this->tabs_gui->addTarget(
 
 1289                $this->ctrl->getLinkTargetByClass(
"ilexportgui", 
""),
 
 1296        if ($this->rbacsystem->checkAccess(
'edit_permission', $this->object->getRefId())) {
 
 1302            $this->tabs_gui->addTarget(
 
 1304                $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'), 
"perm"),
 
 1305                array(
"perm",
"info",
"owner"),
 
 1310        $this->tabs_gui->addNonTabbedLink(
 
 1311            "presentation_view",
 
 1312            $this->lng->txt(
"glo_presentation_view"),
 
 1313            "ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=" . $this->object->getRefID(),
 
 1325            array(
"general_settings", 
"style", 
"taxonomy", 
"glossaries")
 
 1328            $this->tabs->addSubTab(
 
 1330                $this->lng->txt(
"settings"),
 
 1331                $this->ctrl->getLinkTarget($this, 
'properties')
 
 1335            $this->tabs->addSubTab(
 
 1337                $this->lng->txt(
"obj_sty"),
 
 1338                $this->ctrl->getLinkTarget($this, 
'editStyleProperties')
 
 1343            $this->tabs->addSubTab(
 
 1345                $this->lng->txt(
"tax_taxonomy"),
 
 1346                $this->ctrl->getLinkTargetByClass(
"ilobjtaxonomygui", 
'')
 
 1350            $this->tabs->addSubTab(
 
 1352                $this->lng->txt(
"cont_auto_glossaries"),
 
 1353                $this->ctrl->getLinkTarget($this, 
'editGlossaries')
 
 1356            $this->tabs->activateSubTab($a_active);
 
 1371        $ilAccess = 
$DIC->access();
 
 1374        if ($ilAccess->checkAccess(
"read", 
"", $a_target)) {
 
 1375            $_GET[
"ref_id"] = $a_target;
 
 1376            $_GET[
"baseClass"] = 
"ilGlossaryPresentationGUI";
 
 1377            include(
"ilias.php");
 
 1379        } elseif ($ilAccess->checkAccess(
"visible", 
"", $a_target)) {
 
 1380            $_GET[
"ref_id"] = $a_target;
 
 1381            $_GET[
"cmd"] = 
"infoScreen";
 
 1382            $_GET[
"baseClass"] = 
"ilGlossaryPresentationGUI";
 
 1383            include(
"ilias.php");
 
 1385        } elseif ($ilAccess->checkAccess(
"read", 
"", ROOT_FOLDER_ID)) {
 
 1387                $lng->txt(
"msg_no_perm_read_item"),
 
 1402        $prtab->resetOffset();
 
 1403        $prtab->writeFilterToSession();
 
 1414        $prtab->resetOffset();
 
 1415        $prtab->resetFilter();
 
 1429        if ($a_tpl != 
null) {
 
 1435        $ctpl->setCurrentBlock(
"ContentStyle");
 
 1437            "LOCATION_CONTENT_STYLESHEET",
 
 1440        $ctpl->parseCurrentBlock();
 
 1452        $this->tpl->setContent($this->form->getHTML());
 
 1454        $this->tabs->activateTab(
"settings");
 
 1463        $this->lng->loadLanguageModule(
"style");
 
 1467        $fixed_style = $this->setting->get(
"fixed_content_style_id");
 
 1468        $style_id = $this->
object->getStyleSheetId();
 
 1470        if ($fixed_style > 0) {
 
 1473                $this->lng->txt(
"global_fixed") . 
")");
 
 1474            $this->form->addItem($st);
 
 1482            $st_styles[0] = $this->lng->txt(
"default");
 
 1485            if ($style_id > 0) {
 
 1490                    $this->form->addItem($st);
 
 1495                    $this->form->addCommandButton(
 
 1497                        $this->lng->txt(
"style_edit_style")
 
 1499                    $this->form->addCommandButton(
 
 1501                        $this->lng->txt(
"style_delete_style")
 
 1515                $style_sel = 
new ilSelectInputGUI($this->lng->txt(
"style_current_style"), 
"style_id");
 
 1516                $style_sel->setOptions($st_styles);
 
 1517                $style_sel->setValue($style_id);
 
 1518                $this->form->addItem($style_sel);
 
 1520                $this->form->addCommandButton(
 
 1521                    "saveStyleSettings",
 
 1522                    $this->lng->txt(
"save")
 
 1524                $this->form->addCommandButton(
 
 1526                    $this->lng->txt(
"sty_create_ind_style")
 
 1530        $this->form->setTitle($this->lng->txt(
"glo_style"));
 
 1531        $this->form->setFormAction($this->ctrl->getFormAction($this));
 
 1539        $this->ctrl->redirectByClass(
"ilobjstylesheetgui", 
"create");
 
 1547        $this->ctrl->redirectByClass(
"ilobjstylesheetgui", 
"edit");
 
 1555        $this->ctrl->redirectByClass(
"ilobjstylesheetgui", 
"delete");
 
 1563        if ($this->setting->get(
"fixed_content_style_id") <= 0 &&
 
 1565            || $this->object->getStyleSheetId() == 0)) {
 
 1567            $this->
object->update();
 
 1568            ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"), 
true);
 
 1570        $this->ctrl->redirect($this, 
"editStyleProperties");
 
 1578        if ($this->object->getPublicExportFile(
$a_type) == $a_file) {
 
 1579            return $this->lng->txt(
"yes");
 
 1597        if (count($tax_ids) > 0) {
 
 1598            $tax_id = $tax_ids[0];
 
 1599            $DIC->globalScreen()->tool()->context()->current()
 
 1600                ->addAdditionalData(
 
 1604            $DIC->globalScreen()->tool()->context()->current()
 
 1605                ->addAdditionalData(
 
 1607                    $ctrl->getCurrentClassPath()
 
 1609            $DIC->globalScreen()->tool()->context()->current()
 
 1610                ->addAdditionalData(
 
 1614            $DIC->globalScreen()->tool()->context()->current()
 
 1615                ->addAdditionalData(
 
 1619            $DIC->globalScreen()->tool()->context()->current()
 
 1620                ->addAdditionalData(
 
 1633            if (!$tax_exp->handleCommand()) {
 
 1652        $this->tabs->setTabActive(
"settings");
 
 1655        $this->toolbar->addButton(
 
 1656            $this->lng->txt(
"add"),
 
 1657            $this->ctrl->getLinkTarget($this, 
"showGlossarySelector")
 
 1662        $this->tpl->setContent(
$tab->getHTML());
 
 1673        $this->tabs->setTabActive(
"settings");
 
 1677        $exp->setExpand(
$_GET[
"search_root_expand"] ? 
$_GET[
"search_root_expand"] : $this->tree->readRootId());
 
 1678        $exp->setExpandTarget($this->ctrl->getLinkTarget($this, 
'showGlossarySelector'));
 
 1679        $exp->setTargetClass(get_class($this));
 
 1680        $exp->setCmd(
'confirmGlossarySelection');
 
 1681        $exp->setClickableTypes(array(
"glo"));
 
 1682        $exp->addFilter(
"glo");
 
 1686        $this->tpl->setContent($exp->getOutput());
 
 1695        $this->ctrl->setParameter($this, 
"glo_ref_id", 
$_GET[
"root_id"]);
 
 1696        $cgui->setFormAction($this->ctrl->getFormAction($this));
 
 1697        $cgui->setHeaderText($this->lng->txt(
"glo_link_glo_in_glo"));
 
 1698        $cgui->setCancel($this->lng->txt(
"no"), 
"selectGlossary");
 
 1699        $cgui->setConfirm($this->lng->txt(
"yes"), 
"selectGlossaryLink");
 
 1700        $this->tpl->setContent($cgui->getHTML());
 
 1711        $glo_ref_id = (int) 
$_GET[
"glo_ref_id"];
 
 1713        $this->
object->autoLinkGlossaryTerms($glo_ref_id);
 
 1726        $glos = $this->
object->getAutoGlossaries();
 
 1727        $glo_ref_id = (int) 
$_GET[
"glo_ref_id"];
 
 1729        if (!in_array($glo_id, $glos)) {
 
 1732        $this->
object->setAutoGlossaries($glos);
 
 1733        $this->
object->update();
 
 1735        ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"), 
true);
 
 1736        $this->ctrl->redirect($this, 
"editGlossaries");
 
 1747        $this->
object->removeAutoGlossary((
int) 
$_GET[
"glo_id"]);
 
 1748        $this->
object->update();
 
 1750        ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"), 
true);
 
 1751        $this->ctrl->redirect($this, 
"editGlossaries");
 
 1763        if (!is_array($items)) {
 
 1765            $this->ctrl->redirect($this, 
"listTerms");
 
 1768        $this->
user->clipboardDeleteObjectsOfType(
"term");
 
 1771        $time = date(
"Y-m-d H:i:s", time());
 
 1773        foreach ($items as $id) {
 
 1774            $this->
user->addObjectToClipboard(
 
 1785        ilUtil::sendInfo($this->lng->txt(
"glo_selected_terms_have_been_copied"), 
true);
 
 1786        $this->ctrl->redirect($this, 
"listTerms");
 
 1798        if (!is_array($items)) {
 
 1800            $this->ctrl->redirect($this, 
"listTerms");
 
 1803        $this->
user->clipboardDeleteObjectsOfType(
"term");
 
 1806        $time = date(
"Y-m-d H:i:s", time());
 
 1808        foreach ($items as $id) {
 
 1809            $this->
user->addObjectToClipboard(
 
 1820        ilUtil::sendInfo($this->lng->txt(
"glo_selected_terms_have_been_copied"), 
true);
 
 1821        $this->ctrl->redirect($this, 
"listTerms");
 
 1833        $this->
user->clipboardDeleteObjectsOfType(
"term");
 
 1834        $this->ctrl->redirect($this, 
"listTerms");
 
 1843            foreach ($this->
user->getClipboardObjects(
"term") as $item) {
 
 1849            foreach ($this->
user->getClipboardObjects(
"term") as $item) {
 
 1850                $refs->addTerm($item[
"id"]);
 
 1854        ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"), 
true);
 
 1855        $this->ctrl->redirect($this, 
"listTerms");
 
An exception for terminatinating execution or to throw for unit testing.
error($a_errmsg)
set error message @access public
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Confirmation screen class.
Class ilECSGlossarySettings.
static setAction($a_action)
Export User Interface Class.
TableGUI class for auto link glossaries.
Glossary definition page GUI class.
Class ilGlossaryDefinition.
static setShortTextsDirty($a_glo_id)
Set short texts dirty.
Export class for content objects.
static getInstance(ilObjGlossaryGUI $a_glossary_gui)
Get instance.
GUI class for glossary terms.
static getInstance()
Get instance.
static isReferenced($a_glo_id, $a_term_id)
Is a term referenced by one or multiple glossaries.
static getNumberOfUsages($a_term_id)
Get number of usages.
static _lookGlossaryID($term_id)
get glossary id form term id
static _copyTerm($a_term_id, $a_glossary_id)
Copy a term to a glossary.
static _lookGlossaryTerm($term_id)
get glossary term
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
static getLogger($a_component_id)
Get component logger.
This class represents a non editable value in a property form.
initSettingsForm($a_mode="edit")
Init settings form.
exportHTML()
create html package
addDefinition()
add definition
deleteStyle()
Delete Style.
referenceTerms()
Reference terms.
moveDefinitionDown()
move a definiton down
setLocator($a_tree="", $a_id="")
set Locator
static _goto($a_target)
redirect script
setContentStyleSheet($a_tpl=null)
Set content style sheet.
setSettingsSubTabs($a_active)
Set sub tabs.
createStyle()
Create Style.
initStylePropertiesForm()
Init style properties form.
confirmGlossarySelection()
Confirm glossary selection.
confirmTermDeletion()
confirm term deletion
confirmDefinitionDeletion()
deletion confirmation screen
getPublicAccessColValue($a_type, $a_file)
Get public access value for export table.
static addUsagesToInfo($info, $glo_id)
Add usages to info.
applyFilter()
Apply filter.
actTaxonomy()
Show Taxonomy.
executeCommand()
execute command
showActions($a_actions)
show possible action (form buttons)
properties()
edit properties of object (admin form)
deleteTerms()
delete selected terms
moveDefinitionUp()
move a definiton up
viewObject()
viewObject container presentation for "administration -> repository, trash, permissions"
showTaxonomy()
Show taxonomy.
editStyleProperties()
Edit style properties.
selectGlossaryLink()
Select a glossary and link all its terms.
__construct($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
Constructor @access public.
showGlossarySelector()
Select LM Glossary.
publishExportFile()
download export file
saveObject()
save new content object to db
selectGlossary()
Select lm glossary.
cancelDefinitionDeletion()
resetFilter()
Reset filter (note: this function existed before data table filter has been introduced.
create()
create new (subobject) in glossary
deactTaxonomy()
Hide Taxonomy.
clearClipboard()
Clear clipboard.
export()
export content object
saveStyleSettings()
Save style settings.
initCreateForm($a_new_type)
Init object creation form.
cancelTermDeletion()
cancel deletion of object
removeGlossary()
Remove lm glossary.
showInfoScreen()
Show info screen.
saveProperties()
save properties
editGlossaries()
Edit automatically linked glossaries.
static getScormModulesForGlossary($a_glo_id)
Get SCORM modules that assign a certain glossary.
Class ilObjStyleSheetGUI.
static _lookupStandard($a_id)
Lookup standard flag.
static getSyntaxStylePath()
get syntax style path
static _getStandardStyles( $a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
static getContentStylePath($a_style_id, $add_random=true, $add_token=true)
get content style path
static getUsageOfObject($a_obj_id, $a_include_titles=false)
Get usage of object.
static loadLanguageModule()
Load language module.
GUI class for the workflow of copying objects.
Class ilObjectGUI Basic methods of all Output classes.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
putObjectInTree(ilObject $a_obj, $a_parent_node_id=null)
Add object to tree at given position.
prepareOutput($a_show_subobjects=true)
prepare output
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
getCreationMode()
get creation mode
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
addHeaderAction()
Add header action menu.
createObject()
create new object form
getObjectService()
Get object service.
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
static _lookupObjId($a_id)
const TITLE_LENGTH
max length of object title
static _lookupTitle($a_id)
lookup object title
static _getAllReferences($a_id)
get all reference ids of object
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
This class represents an option in a radio group.
Taxonomy explorer GUI class.
This class represents a text area property in a property form.
This class represents a text property in a property form.
static redirect($a_script)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static yn2tf($a_yn)
convert "y"/"n" to true/false
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.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static stripSlashesArray($a_arr, $a_strip_html=true, $a_allow="")
Strip slashes from array.
for( $i=6;$i< 13;$i++) for($i=1; $i< 13; $i++) $d
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc