ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilObjGlossary.php
Go to the documentation of this file.
1 <?php
2 
23 {
24  protected \ILIAS\Glossary\Term\TermManager $term_manager;
25  protected \ILIAS\Style\Content\DomainService $content_style_domain;
27  protected array $file_ids = [];
28  protected array $mob_ids = [];
29  protected bool $show_tax = false;
30  protected int $style_id = 0;
31  protected bool $downloads_active = false;
32  protected bool $glo_menu_active = false;
33  protected bool $online = false;
34  protected int $snippet_length = 0;
35  protected string $pres_mode = "";
36  protected bool $virtual = false;
37  protected string $virtual_mode = "";
38  protected bool $flashcards_active = false;
39  protected string $flashcards_mode = "";
41  public array $auto_glossaries = array();
42  protected ilObjUser $user;
43  protected array $public_export_file = [];
44 
45 
46  public function __construct(
47  int $a_id = 0,
48  bool $a_call_by_reference = true
49  ) {
50  global $DIC;
51  $this->tpl = $DIC["tpl"];
52 
53  $this->db = $DIC->database();
54  $this->user = $DIC->user();
55  $this->type = "glo";
56  parent::__construct($a_id, $a_call_by_reference);
57  $this->content_style_domain = $DIC
58  ->contentStyle()
59  ->domain();
60  $this->term_manager = $DIC->glossary()->internal()->domain()->term($this);
61  }
62 
63  public function create(bool $a_upload = false): int
64  {
65  $id = parent::create();
66 
67  // meta data will be created by
68  // import parser
69  if (!$a_upload) {
70  $this->createMetaData();
71  }
72  $this->db->insert(
73  'glossary',
74  array(
75  'id' => array('integer', $this->getId()),
76  'is_online' => array('text', 'n'),
77  'virtual' => array('text', $this->getVirtualMode()),
78  'pres_mode' => array('text', 'table'),
79  'snippet_length' => array('integer', 200)
80  )
81  );
82 
83  $this->setPresentationMode("table");
84  $this->setSnippetLength(200);
85 
86  $this->updateAutoGlossaries();
87 
88  return $id;
89  }
90 
91  public function read(): void
92  {
93  parent::read();
94 
95  $q = "SELECT * FROM glossary WHERE id = " .
96  $this->db->quote($this->getId(), "integer");
97  $gl_set = $this->db->query($q);
98  $gl_rec = $this->db->fetchAssoc($gl_set);
99  $this->setOnline(ilUtil::yn2tf($gl_rec["is_online"]));
100  $this->setVirtualMode((string) ($gl_rec["virtual"] ?? ""));
101  if (isset($gl_rec["public_xml_file"]) && $gl_rec["public_xml_file"] != "") {
102  $this->setPublicExportFile("xml", $gl_rec["public_xml_file"]);
103  }
104  if (isset($gl_rec["public_html_file"]) && $gl_rec["public_html_file"] != "") {
105  $this->setPublicExportFile("html", $gl_rec["public_html_file"]);
106  }
107  $this->setActiveGlossaryMenu(ilUtil::yn2tf($gl_rec["glo_menu_active"]));
108  $this->setActiveDownloads(ilUtil::yn2tf($gl_rec["downloads_active"]));
109  $this->setPresentationMode((string) $gl_rec["pres_mode"]);
110  $this->setSnippetLength((int) $gl_rec["snippet_length"]);
111  $this->setShowTaxonomy((bool) $gl_rec["show_tax"]);
112  $this->setActiveFlashcards(ilUtil::yn2tf($gl_rec["flash_active"]));
113  $this->setFlashcardsMode($gl_rec["flash_mode"]);
114 
115  // read auto glossaries
116  $set = $this->db->query(
117  "SELECT * FROM glo_glossaries " .
118  " WHERE id = " . $this->db->quote($this->getId(), "integer")
119  );
120  $glos = array();
121  while ($rec = $this->db->fetchAssoc($set)) {
122  $glos[] = $rec["glo_id"];
123  }
124  $this->setAutoGlossaries($glos);
125  }
126 
127  public function setVirtualMode(string $a_mode): void
128  {
129  switch ($a_mode) {
130  case "coll":
131  $this->virtual_mode = $a_mode;
132  $this->virtual = true;
133  break;
134 
135  default:
136  $this->virtual_mode = "none";
137  $this->virtual = false;
138  break;
139  }
140  }
141 
142  public function getVirtualMode(): string
143  {
144  return $this->virtual_mode;
145  }
146 
147  public function isVirtual(): bool
148  {
149  return $this->virtual;
150  }
151 
152  public function setPresentationMode(string $a_val): void
153  {
154  $this->pres_mode = $a_val;
155  }
156 
157  public function getPresentationMode(): string
158  {
159  return $this->pres_mode;
160  }
161 
163  public function setSnippetLength(int $a_val): void
164  {
165  $this->snippet_length = $a_val;
166  }
167 
168  public function getSnippetLength(): int
169  {
170  return ($this->snippet_length > 0)
171  ? $this->snippet_length
172  : 200;
173  }
174 
175  public function setOnline(bool $a_online): void
176  {
177  $this->online = $a_online;
178  }
179 
180  public function getOnline(): bool
181  {
182  return $this->online;
183  }
184 
185  public static function _lookupOnline(
186  int $a_id
187  ): bool {
188  global $DIC;
189 
190  $db = $DIC->database();
191 
192  $q = "SELECT is_online FROM glossary WHERE id = " .
193  $db->quote($a_id, "integer");
194  $lm_set = $db->query($q);
195  $lm_rec = $db->fetchAssoc($lm_set);
196 
197  return ilUtil::yn2tf($lm_rec["is_online"]);
198  }
199 
203  protected static function lookup(
204  int $a_id,
205  string $a_property
206  ): string {
207  global $DIC;
208 
209  $db = $DIC->database();
210 
211  $set = $db->query("SELECT $a_property FROM glossary WHERE id = " .
212  $db->quote($a_id, "integer"));
213  $rec = $db->fetchAssoc($set);
214 
215  return $rec[$a_property];
216  }
217 
218  public static function lookupSnippetLength(int $a_id): int
219  {
220  return (int) self::lookup($a_id, "snippet_length");
221  }
222 
223 
224  public function setActiveGlossaryMenu(bool $a_act_glo_menu): void
225  {
226  $this->glo_menu_active = $a_act_glo_menu;
227  }
228 
229  public function isActiveGlossaryMenu(): bool
230  {
231  return $this->glo_menu_active;
232  }
233 
234  public function setActiveDownloads(bool $a_down): void
235  {
236  $this->downloads_active = $a_down;
237  }
238 
239  public function isActiveDownloads(): bool
240  {
242  }
243 
244  public function setShowTaxonomy(bool $a_val): void
245  {
246  $this->show_tax = $a_val;
247  }
248 
249  public function getShowTaxonomy(): bool
250  {
251  return $this->show_tax;
252  }
253 
254  public function setActiveFlashcards(bool $a_flash): void
255  {
256  $this->flashcards_active = $a_flash;
257  }
258 
259  public function isActiveFlashcards(): bool
260  {
262  }
263 
264  public function setFlashcardsMode(string $a_flash): void
265  {
266  $this->flashcards_mode = $a_flash;
267  }
268 
269  public function getFlashcardsMode(): string
270  {
271  return $this->flashcards_mode;
272  }
273 
277  public function setAutoGlossaries(
278  array $a_val
279  ): void {
280  $this->auto_glossaries = array();
281  foreach ($a_val as $v) {
282  $this->addAutoGlossary($v);
283  }
284  }
285 
286  public function addAutoGlossary(int $glo_id): void
287  {
288  if ($glo_id > 0 && ilObject::_lookupType($glo_id) == "glo" &&
289  !in_array($glo_id, $this->auto_glossaries)) {
290  $this->auto_glossaries[] = $glo_id;
291  }
292  }
293 
297  public function getAutoGlossaries(): array
298  {
299  return $this->auto_glossaries;
300  }
301 
302  public function removeAutoGlossary(
303  int $a_glo_id
304  ): void {
305  $glo_ids = array();
306  foreach ($this->getAutoGlossaries() as $g) {
307  if ($g != $a_glo_id) {
308  $glo_ids[] = $g;
309  }
310  }
311  $this->setAutoGlossaries($glo_ids);
312  }
313 
314  public function update(): bool
315  {
316  $this->updateMetaData();
317 
318  $this->db->update(
319  'glossary',
320  array(
321  'is_online' => array('text', ilUtil::tf2yn($this->getOnline())),
322  'virtual' => array('text', $this->getVirtualMode()),
323  'public_xml_file' => array('text', $this->getPublicExportFile("xml")),
324  'public_html_file' => array('text', $this->getPublicExportFile("html")),
325  'glo_menu_active' => array('text', ilUtil::tf2yn($this->isActiveGlossaryMenu())),
326  'downloads_active' => array('text', ilUtil::tf2yn($this->isActiveDownloads())),
327  'pres_mode' => array('text', $this->getPresentationMode()),
328  'show_tax' => array('integer', $this->getShowTaxonomy()),
329  'snippet_length' => array('integer', $this->getSnippetLength()),
330  'flash_active' => array('text', ilUtil::tf2yn($this->isActiveFlashcards())),
331  'flash_mode' => array('text', $this->getFlashcardsMode())
332  ),
333  array(
334  'id' => array('integer', $this->getId())
335  )
336  );
337 
338  $this->updateAutoGlossaries();
339  return parent::update();
340  }
341 
342  public function updateAutoGlossaries(): void
343  {
344  // update auto glossaries
345  $this->db->manipulate(
346  "DELETE FROM glo_glossaries WHERE " .
347  " id = " . $this->db->quote($this->getId(), "integer")
348  );
349  foreach ($this->getAutoGlossaries() as $glo_id) {
350  $this->db->insert(
351  'glo_glossaries',
352  array(
353  'id' => array('integer', $this->getId()),
354  'glo_id' => array('integer', $glo_id)
355  )
356  );
357  }
358  }
359 
360  public static function lookupAutoGlossaries(
361  int $a_id
362  ): array {
363  global $DIC;
364 
365  $db = $DIC->database();
366 
367  // read auto glossaries
368  $set = $db->query(
369  "SELECT * FROM glo_glossaries " .
370  " WHERE id = " . $db->quote($a_id, "integer")
371  );
372  $glos = array();
373  while ($rec = $db->fetchAssoc($set)) {
374  $glos[] = (int) $rec["glo_id"];
375  }
376  return $glos;
377  }
378 
382  public function getGlossariesForCollection(): array
383  {
384  $set = $this->db->query(
385  "SELECT * FROM glossary_collection " .
386  " WHERE id = " . $this->db->quote($this->getId(), "integer")
387  );
388  $glos = [];
389  while ($rec = $this->db->fetchAssoc($set)) {
390  $glos[] = (int) $rec["glo_id"];
391  }
392 
393  return $glos;
394  }
395 
396  public function addGlossaryForCollection(int $glo_id): void
397  {
398  $this->db->replace(
399  "glossary_collection",
400  [
401  "id" => ["integer", $this->getId()],
402  "glo_id" => ["integer", $glo_id]
403  ],
404  []
405  );
406  }
407 
408  public function removeGlossaryFromCollection(int $glo_id): void
409  {
410  $this->db->manipulate(
411  "DELETE FROM glossary_collection WHERE " .
412  " id = " . $this->db->quote($this->getId(), "integer") .
413  " AND glo_id = " . $this->db->quote($glo_id, "integer")
414  );
415  }
416 
417  public function getTermList(
418  string $searchterm = "",
419  string $a_letter = "",
420  string $a_def = "",
421  int $a_tax_node = 0,
422  bool $a_include_offline_childs = false,
423  bool $a_add_amet_fields = false,
424  ?array $a_amet_filter = null,
425  bool $a_omit_virtual = false,
426  bool $a_include_references = false
427  ): array {
428  if ($a_omit_virtual) {
429  $glo_ref_ids[] = $this->getRefId();
430  } else {
431  $glo_ref_ids = $this->getAllGlossaryIds($a_include_offline_childs, true);
432  }
434  $glo_ref_ids,
435  $searchterm,
436  $a_letter,
437  $a_def,
438  $a_tax_node,
439  $a_add_amet_fields,
440  $a_amet_filter,
441  $a_include_references
442  );
443  return $list;
444  }
445 
446  public function getFirstLetters(
447  int $a_tax_node = 0
448  ): array {
449  $glo_ids = $this->getAllGlossaryIds();
450  $first_letters = ilGlossaryTerm::getFirstLetters($glo_ids, $a_tax_node);
451  return $first_letters;
452  }
453 
458  public function getAllGlossaryIds(
459  bool $a_include_offline_childs = false,
460  bool $ids_are_ref_ids = false
461  ): array {
462  global $DIC;
463 
464  $tree = $DIC->repositoryTree();
465 
466  if ($this->isVirtual()) {
467  $glo_ids = array();
468 
469  $virtual_mode = $this->getRefId() ? $this->getVirtualMode() : '';
470  if ($virtual_mode === "coll") {
471  $glo_ids = $this->getGlossariesForCollection();
472  if ($ids_are_ref_ids) {
473  $glo_ref_ids = [];
474  foreach ($glo_ids as $obj_id) {
475  $glo_ref_ids[] = current(ilObject::_getAllReferences($obj_id));
476  }
477  $glo_ids = $glo_ref_ids;
478  }
479  }
480  if (!$a_include_offline_childs) {
481  $glo_ids = $this->removeOfflineGlossaries($glo_ids, $ids_are_ref_ids);
482  }
483  // always show entries of current glossary (if no permission is given, user will not come to the presentation screen)
484  // see bug #14477
485  if ($ids_are_ref_ids) {
486  if (!in_array($this->getRefId(), $glo_ids)) {
487  $glo_ids[] = $this->getRefId();
488  }
489  } elseif (!in_array($this->getId(), $glo_ids)) {
490  $glo_ids[] = $this->getId();
491  }
492  } elseif ($ids_are_ref_ids) {
493  $glo_ids = [$this->getRefId()];
494  } else {
495  $glo_ids = [$this->getId()];
496  }
497 
498  return $glo_ids;
499  }
500 
501  public function createExportDirectory(string $a_type = "xml"): string
502  {
503  return ilExport::_createExportDirectory($this->getId(), $a_type, $this->getType());
504  }
505 
506  public function getExportDirectory(string $a_type = "xml"): string
507  {
508  return ilExport::_getExportDirectory($this->getId(), $a_type, $this->getType());
509  }
510 
516  public function setPublicExportFile(
517  string $a_type,
518  string $a_file
519  ): void {
520  $this->public_export_file[$a_type] = $a_file;
521  }
522 
527  public function getPublicExportFile(string $a_type): string
528  {
529  return $this->public_export_file[$a_type] ?? "";
530  }
531 
532  public function delete(): bool
533  {
534  // always call parent delete function first!!
535  if (!parent::delete()) {
536  return false;
537  }
538 
539  // delete terms
540  if (!$this->isVirtual()) {
541  $terms = $this->getTermList();
542  foreach ($terms as $term) {
543  $this->term_manager->deleteTerm((int) $term["id"]);
544  }
545  }
546 
547  // delete term references
548  $refs = new ilGlossaryTermReferences($this->getId());
549  $refs->delete();
550 
551  // delete glossary data entry
552  $q = "DELETE FROM glossary WHERE id = " . $this->db->quote($this->getId());
553  $this->db->query($q);
554 
555  // delete meta data
556  $this->deleteMetaData();
557 
558  return true;
559  }
560 
561  public static function getDeletionDependencies(int $obj_id): array
562  {
563  global $DIC;
564 
565  $lng = $DIC->language();
566 
567  $dep = array();
569  foreach ($sms as $sm) {
570  $lng->loadLanguageModule("content");
571  $dep[$sm] = $lng->txt("glo_used_in_scorm");
572  }
573  return $dep;
574  }
575 
576  public function getTaxonomyId(): int
577  {
578  $tax_ids = ilObjTaxonomy::getUsageOfObject($this->getId());
579  if (count($tax_ids) > 0) {
580  // glossaries handle max. one taxonomy
581  return (int) $tax_ids[0];
582  }
583  return 0;
584  }
585 
586 
587  public function cloneObject(int $target_id, int $copy_id = 0, bool $omit_tree = false): ?ilObject
588  {
589  $new_obj = parent::cloneObject($target_id, $copy_id, $omit_tree);
590  $this->cloneMetaData($new_obj);
591 
592  $tax_ass = null;
593  $new_tax_ass = null;
594  $map = [];
595 
596  //copy online status if object is not the root copy object
597  $cp_options = ilCopyWizardOptions::_getInstance($copy_id);
598 
599  if (!$cp_options->isRootNode($this->getRefId())) {
600  $new_obj->setOnline($this->getOnline());
601  }
602 
603  // $new_obj->setTitle($this->getTitle());
604  $new_obj->setDescription($this->getDescription());
605  $new_obj->setVirtualMode($this->getVirtualMode());
606  $new_obj->setPresentationMode($this->getPresentationMode());
607  $new_obj->setSnippetLength($this->getSnippetLength());
608  $new_obj->setAutoGlossaries($this->getAutoGlossaries());
609  $new_obj->setActiveFlashcards($this->isActiveFlashcards());
610  $new_obj->setFlashcardsMode($this->getFlashcardsMode());
611  $new_obj->update();
612 
613  // set/copy stylesheet
614  $this->content_style_domain->styleForRefId($this->getRefId())->cloneTo($new_obj->getId());
615 
616  // copy taxonomy
617  if (($tax_id = $this->getTaxonomyId()) > 0) {
618  // clone it
619  $tax = new ilObjTaxonomy($tax_id);
620  $new_tax = $tax->cloneObject(0, 0, true);
621  $map = $tax->getNodeMapping();
622 
623  // assign new taxonomy to new glossary
624  ilObjTaxonomy::saveUsage($new_tax->getId(), $new_obj->getId());
625 
626  $tax_ass = new ilTaxNodeAssignment("glo", $this->getId(), "term", $tax_id);
627  $new_tax_ass = new ilTaxNodeAssignment("glo", $new_obj->getId(), "term", $new_tax->getId());
628  }
629 
630  // copy terms
631  $term_mappings = array();
632  foreach (ilGlossaryTerm::getTermList([$this->getRefId()]) as $term) {
633  $new_term_id = ilGlossaryTerm::_copyTerm($term["id"], $new_obj->getId());
634  $term_mappings[$term["id"]] = $new_term_id;
635 
636  // copy tax node assignments
637  if ($tax_id > 0) {
638  $assignmts = $tax_ass->getAssignmentsOfItem($term["id"]);
639  foreach ($assignmts as $a) {
640  if ($map[$a["node_id"]] > 0) {
641  $new_tax_ass->addAssignment($map[$a["node_id"]], $new_term_id);
642  }
643  }
644  }
645  }
646 
647  // add mapping of term_ids to copy wizard options
648  if (!empty($term_mappings)) {
649  $cp_options->appendMapping($this->getRefId() . '_glo_terms', $term_mappings);
650  }
651 
652  // copy collection glossaries
653  foreach ($this->getGlossariesForCollection() as $glo_id) {
654  $new_obj->addGlossaryForCollection($glo_id);
655  }
656 
657  return $new_obj;
658  }
659 
663  public function removeOfflineGlossaries(
664  array $a_glo_ids,
665  bool $ids_are_ref_ids = false
666  ): array {
667  $glo_ids = $a_glo_ids;
668  if ($ids_are_ref_ids) {
669  $glo_ids = array_map(static function ($id): int {
671  }, $a_glo_ids);
672  }
673 
674  $set = $this->db->query(
675  "SELECT id FROM glossary " .
676  " WHERE " . $this->db->in("id", $glo_ids, false, "integer") .
677  " AND is_online = " . $this->db->quote("y", "text")
678  );
679  $online_glo_ids = array();
680  while ($rec = $this->db->fetchAssoc($set)) {
681  $online_glo_ids[] = $rec["id"];
682  }
683 
684  if (!$ids_are_ref_ids) {
685  return $online_glo_ids;
686  }
687 
688  $online_ref_ids = array_filter($a_glo_ids, static function ($ref_id) use ($online_glo_ids): bool {
689  return in_array(ilObject::_lookupObjectId($ref_id), $online_glo_ids);
690  });
691 
692 
693  return $online_ref_ids;
694  }
695 
696  public static function getAdvMDSubItemTitle(int $a_obj_id, string $a_sub_type, int $a_sub_id): string
697  {
698  global $DIC;
699 
700  $lng = $DIC->language();
701 
702  if ($a_sub_type == "term") {
703  $lng->loadLanguageModule("glo");
704 
705  return $lng->txt("glo_term") . ' "' . ilGlossaryTerm::_lookGlossaryTerm($a_sub_id) . '"';
706  }
707  return "";
708  }
709 
713  public function autoLinkGlossaryTerms(
714  int $a_glo_ref_id
715  ): void {
716  // get terms of target glossary
717  $terms = ilGlossaryTerm::getTermList([$a_glo_ref_id]);
718 
719  // for each get page: get content
720  $source_terms = ilGlossaryTerm::getTermList([$this->getRefId()]);
721  $found_pages = array();
722  foreach ($source_terms as $source_term) {
723  $pg = new ilGlossaryDefPage($source_term["id"]);
724  $c = $pg->getXMLContent();
725  foreach ($terms as $t) {
726  if (is_int(stripos($c, $t["term"]))) {
727  $found_pages[$source_term["id"]]["terms"][] = $t;
728  if (!isset($found_pages[$source_term["id"]]["page"])) {
729  $found_pages[$source_term["id"]]["page"] = $pg;
730  }
731  }
732  }
733  reset($terms);
734  }
735 
736  // ilPCParagraph autoLinkGlossariesPage with page and terms
737  foreach ($found_pages as $id => $fp) {
738  ilPCParagraph::autoLinkGlossariesPage($fp["page"], $fp["terms"]);
739  }
740  }
741 
745  public function supportsLongTextQuery(): bool
746  {
747  return true;
748  }
749 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setSnippetLength(int $a_val)
Set definition snippet length (in overview)
cloneObject(int $target_id, int $copy_id=0, bool $omit_tree=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getTermList(string $searchterm="", string $a_letter="", string $a_def="", int $a_tax_node=0, bool $a_include_offline_childs=false, bool $a_add_amet_fields=false, ?array $a_amet_filter=null, bool $a_omit_virtual=false, bool $a_include_references=false)
getAllGlossaryIds(bool $a_include_offline_childs=false, bool $ids_are_ref_ids=false)
Get all glossary ids.
setAutoGlossaries(array $a_val)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
removeAutoGlossary(int $a_glo_id)
ilGlossaryDefPage $page_object
addGlossaryForCollection(int $glo_id)
fetchAssoc(ilDBStatement $statement)
setActiveFlashcards(bool $a_flash)
setPresentationMode(string $a_val)
static autoLinkGlossariesPage(ilPageObject $a_page, array $a_terms)
Auto link glossary of whole page.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setOnline(bool $a_online)
static _lookupOnline(int $a_id)
static _getAllReferences(int $id)
get all reference ids for object ID
ilTree $tree
static getScormModulesForGlossary(int $a_glo_id)
Get SCORM modules that assign a certain glossary.
static getUsageOfObject(int $a_obj_id, bool $a_include_titles=false)
quote($value, string $type)
loadLanguageModule(string $a_module)
Load language module.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getAdvMDSubItemTitle(int $a_obj_id, string $a_sub_type, int $a_sub_id)
static tf2yn(bool $a_tf)
addAutoGlossary(int $glo_id)
$c
Definition: deliver.php:25
setActiveGlossaryMenu(bool $a_act_glo_menu)
setFlashcardsMode(string $a_flash)
static _getExportDirectory(int $a_obj_id, string $a_type="xml", string $a_obj_type="", string $a_entity="")
Get export directory for an repository object
static getTermList(array $a_glo_ref_id, string $searchterm="", string $a_first_letter="", string $a_def="", int $a_tax_node=0, bool $a_add_amet_fields=false, ?array $a_amet_filter=null, bool $a_include_references=false)
Get all terms for given set of glossary ids.
setPublicExportFile(string $a_type, string $a_file)
specify public export file for type
static _copyTerm(int $a_term_id, int $a_glossary_id)
Copy a term to a glossary.
ilGlobalTemplateInterface $tpl
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getExportDirectory(string $a_type="xml")
create(bool $a_upload=false)
__construct(int $a_id=0, bool $a_call_by_reference=true)
cloneMetaData(ilObject $target_obj)
Copy meta data.
Interface for repository objects to use adv md with subitems.
ilLanguage $lng
static _createExportDirectory(int $a_obj_id, string $a_export_type="xml", string $a_obj_type="")
getPublicExportFile(string $a_type)
get public export file
ilDBInterface $db
static _lookGlossaryTerm(int $term_id)
get glossary term
global $DIC
Definition: shib_login.php:22
static _lookupObjectId(int $ref_id)
query(string $query)
Run a (read-only) Query on the database.
removeOfflineGlossaries(array $a_glo_ids, bool $ids_are_ref_ids=false)
Remove offline glossaries from obj id array.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getAssignmentsOfItem(int $a_item_id)
Get assignments for item.
setActiveDownloads(bool $a_down)
static saveUsage(int $a_tax_id, int $a_obj_id)
$lm_set
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
__construct(Container $dic, ilPlugin $plugin)
createExportDirectory(string $a_type="xml")
static lookupSnippetLength(int $a_id)
setVirtualMode(string $a_mode)
$q
Definition: shib_logout.php:21
autoLinkGlossaryTerms(int $a_glo_ref_id)
Auto link glossary terms.
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
setShowTaxonomy(bool $a_val)
static yn2tf(string $a_yn)
static lookupAutoGlossaries(int $a_id)
removeGlossaryFromCollection(int $glo_id)
static _getInstance(int $a_copy_id)
static getDeletionDependencies(int $obj_id)
static _lookupType(int $id, bool $reference=false)
getFirstLetters(int $a_tax_node=0)
ILIAS Style Content DomainService $content_style_domain
static getFirstLetters(array $a_glo_id, int $a_tax_node=0)
supportsLongTextQuery()
Is long text search supported.
ILIAS Glossary Term TermManager $term_manager
static lookup(int $a_id, string $a_property)
Lookup glossary property.