ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilDidacticTemplateSettingsGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateSetting.php';
5
15{
17
21 private $object = null;
25 private $dic;
29 private $lng;
33 private $rbacsystem;
37 private $ctrl;
38
42 public function __construct($a_parent_obj)
43 {
44 global $DIC;
45
46 $this->parent_object = $a_parent_obj;
47 $this->dic = $DIC;
48 $this->lng = $this->dic->language();
49 $this->rbacsystem = $this->dic->rbac()->system();
50 $this->ctrl = $this->dic->ctrl();
51
52 if (isset($_REQUEST["tplid"])) {
53 $this->initObject($_REQUEST["tplid"]);
54 }
55 }
56
61 protected function initObject($a_id)
62 {
63 return $this->object = new ilDidacticTemplateSetting($a_id);
64 }
65
70 public function executeCommand()
71 {
75 global $DIC;
76
77 $ilCtrl = $DIC['ilCtrl'];
78 $ilAccess = $DIC['ilAccess'];
79
80 $next_class = $ilCtrl->getNextClass($this);
81 $cmd = $ilCtrl->getCmd();
82
83 switch ($next_class) {
84 case "ilpropertyformgui":
85 $settings = new ilDidacticTemplateSetting((int) $_REQUEST['tplid']);
86 $form = $this->initEditTemplate($settings);
87 $ilCtrl->forwardCommand($form);
88 // no break
89 case 'ilmultilingualismgui':
90 if (!$ilAccess->checkAccess('write', '', $_REQUEST["ref_id"]) ||
91 !isset($this->object) ||
92 $this->object->isAutoGenerated()) {
93 $ilCtrl->redirect($this, "overview");
94 }
95 //$this->tabs_gui->setTabActive('export');
96 $this->setEditTabs("settings_trans");
97 include_once("./Services/Multilingualism/classes/class.ilMultilingualismGUI.php");
98 $transgui = new ilMultilingualismGUI($_REQUEST["tplid"], 'dtpl');
99 $defaultl = $this->object->getTranslationObject()->getDefaultLanguage();
100
101 $transgui->setStartValues(
102 $this->object->getPresentationTitle($defaultl),
103 $this->object->getPresentationDescription($defaultl)
104 );
105
106 $ilCtrl->forwardCommand($transgui);
107 break;
108 default:
109 if (!$cmd) {
110 $cmd = 'overview';
111 }
112 $this->$cmd();
113
114 break;
115 }
116 return true;
117 }
118
124 protected function overview()
125 {
126 if ($this->rbacsystem->checkAccess('write', $_REQUEST["ref_id"])) {
127 $this->dic->toolbar()->addButton(
128 $this->lng->txt('didactic_import_btn'),
129 $this->ctrl->getLinkTarget($this, 'showImportForm')
130 );
131 }
132
133 include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateSettingsTableGUI.php';
134 $table = new ilDidacticTemplateSettingsTableGUI($this, 'overview');
135 $table->init();
136 $table->parse();
137
138 $GLOBALS['DIC']['tpl']->setContent($table->getHTML());
139 }
140
146 protected function showImportForm(ilPropertyFormGUI $form = null)
147 {
148 global $DIC;
149
150 $ilTabs = $DIC['ilTabs'];
151 $ilCtrl = $DIC['ilCtrl'];
152
153 if (isset($_REQUEST["tplid"])) {
154 $this->setEditTabs('import');
155 } else {
156 $ilTabs->clearTargets();
157 $ilTabs->setBackTarget(
158 $this->lng->txt('didactic_back_to_overview'),
159 $ilCtrl->getLinkTarget($this, 'overview')
160 );
161 }
162
163 if (!$form instanceof ilPropertyFormGUI) {
164 $form = $this->createImportForm();
165 }
166 $GLOBALS['DIC']['tpl']->setContent($form->getHTML());
167 }
168
173 protected function createImportForm()
174 {
175 global $DIC;
176
177 $ilCtrl = $DIC['ilCtrl'];
178
179 include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
180 $form = new ilPropertyFormGUI();
181 $form->setShowTopButtons(false);
182 $form->setFormAction($ilCtrl->getFormAction($this));
183 $form->setTitle($this->lng->txt('didactic_import_table_title'));
184 $form->addCommandButton('importTemplate', $this->lng->txt('import'));
185 $form->addCommandButton('overview', $this->lng->txt('cancel'));
186
187 $file = new ilFileInputGUI($this->lng->txt('import_file'), 'file');
188 $file->setSuffixes(array('xml'));
189 $file->setRequired(true);
190 $form->addItem($file);
191
192 $created = true;
193
194 return $form;
195 }
196
200 protected function importTemplate()
201 {
202 global $DIC;
203
204 $ilCtrl = $DIC['ilCtrl'];
205 $ilAccess = $DIC['ilAccess'];
206
207 if (!$ilAccess->checkAccess('write', '', $_REQUEST["ref_id"])) {
208 $ilCtrl->redirect($this, "overview");
209 }
210
211 $edit = isset($_REQUEST['tplid']);
212
213 if ($edit) {
214 $form = $this->createImportForm();
215 } else {
216 $form = $this->editImportForm();
217 }
218
219
220 if (!$form->checkInput()) {
221 ilUtil::sendFailure($this->lng->txt('err_check_input'));
222 $form->setValuesByPost();
223
224 if ($edit) {
225 $this->showEditImportForm();
226 } else {
227 $this->showImportForm($form);
228 }
229 }
230
231 // Do import
232 include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateImport.php';
233
235
236 $file = $form->getInput('file');
237 $tmp = ilUtil::ilTempnam() . '.xml';
238
239 // move uploaded file
241 $file['tmp_name'],
242 $file['name'],
243 $tmp
244 );
245 $import->setInputFile($tmp);
246
247 try {
248 $settings = $import->import();
249
250 if ($edit) {
251 $this->editImport($settings);
252 }
254 ilLoggerFactory::getLogger('otpl')->error('Import failed with message: ' . $e->getMessage());
255 ilUtil::sendFailure($this->lng->txt('didactic_import_failed') . ': ' . $e->getMessage());
256 }
257
258 ilUtil::sendSuccess($this->lng->txt('didactic_import_success'), true);
259
260 if ($edit) {
261 $ilCtrl->redirect($this, 'editTemplate');
262 } else {
263 $ilCtrl->redirect($this, 'overview');
264 }
265 }
266
271 protected function editTemplate(ilPropertyFormGUI $form = null)
272 {
273 global $DIC;
274
275 $ilCtrl = $DIC['ilCtrl'];
276 $ilTabs = $DIC['ilTabs'];
277
278 $this->setEditTabs("edit");
279
280 if (!$_REQUEST['tplid']) {
281 ilUtil::sendFailure($this->lng->txt('select_one'), true);
282 $ilCtrl->redirect($this, 'overview');
283 }
284
285 //$ilTabs->clearTargets();
286 //$ilTabs->setBackTarget(
287 // $this->lng->txt('didactic_back_to_overview'),
288 // $ilCtrl->getLinkTarget($this,'overview')
289 //);
290
291
292 $ilCtrl->saveParameter($this, 'tplid');
293
294 if (!$form instanceof ilPropertyFormGUI) {
295 $form = $this->initEditTemplate($this->object);
296 }
297 $GLOBALS['DIC']['tpl']->setContent($form->getHTML());
298 }
299
303 protected function updateTemplate()
304 {
305 global $DIC;
306
307 $ilCtrl = $DIC['ilCtrl'];
308 $ilAccess = $DIC['ilAccess'];
309
310 if (!$ilAccess->checkAccess('write', '', $_REQUEST["ref_id"])) {
311 $this->ctrl->redirect($this, "overview");
312 }
313
314 $temp = new ilDidacticTemplateSetting((int) $_REQUEST['tplid']);
315 $form = $this->initEditTemplate($temp);
316
317 if ($form->checkInput()) {
318 //change default entrys if translation is active
319 if (count($lang = $temp->getTranslationObject()->getLanguages())) {
320 $temp->getTranslationObject()->setDefaultTitle($form->getInput('title'));
321 $temp->getTranslationObject()->setDefaultDescription($form->getInput('description'));
322 $temp->getTranslationObject()->save();
323 }
324
325 if (!$temp->isAutoGenerated()) {
326 $temp->setTitle($form->getInput('title'));
327 $temp->setDescription($form->getInput('description'));
328 }
329
330 $temp->setInfo($form->getInput('info'));
331 $temp->enable($form->getInput('enable'));
332
333 if (!$temp->isAutoGenerated()) {
334 $temp->setAssignments(array($form->getInput('type')));
335 }
336
337 if ($form->getInput('local_template') && count($form->getInput('effective_from')) > 0) {
338 $temp->setEffectiveFrom($form->getInput('effective_from'));
339 } else {
340 $temp->setEffectiveFrom(array());
341 }
342
343 $temp->setExclusive((bool) $form->getInput('exclusive_template'));
344
345 $temp->update();
346
347 ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
348 $ilCtrl->redirect($this, 'overview');
349 }
350
351 ilUtil::sendFailure($this->lng->txt('err_check_input'));
352 $form->setValuesByPost();
353 $this->editTemplate($form);
354 }
355
363 {
364 global $DIC;
365
366 $ilCtrl = $DIC['ilCtrl'];
367 $objDefinition = $DIC['objDefinition'];
368
369 include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
370 $form = new ilPropertyFormGUI();
371 $form->setShowTopButtons(false);
372 $form->setFormAction($ilCtrl->getFormAction($this, 'updateTemplate'));
373 $form->setTitle($this->lng->txt('didactic_edit_tpl'));
374 $form->addCommandButton('updateTemplate', $this->lng->txt('save'));
375 $form->addCommandButton('overview', $this->lng->txt('cancel'));
376
377 // title
378 $title = new ilTextInputGUI($this->lng->txt('title'), 'title');
379 $title->setSize(40);
380 $title->setMaxLength(64);
381 $title->setRequired(true);
382 //use presentation title if autogenerated is set
383 $title->setDisabled($set->isAutoGenerated());
384
385 if (!$set->isAutoGenerated()) {
386 $trans = $set->getTranslations();
387 $def = $trans[0]; // default
388
389 if (sizeof($trans) > 1) {
390 include_once('Services/MetaData/classes/class.ilMDLanguageItem.php');
391 $languages = ilMDLanguageItem::_getLanguages();
392 $title->setInfo($this->lng->txt("language") . ": " . $languages[$def["lang_code"]] .
393 ' <a href="' . $ilCtrl->getLinkTargetByClass("ilmultilingualismgui", "listTranslations") .
394 '">&raquo; ' . $this->lng->txt("more_translations") . '</a>');
395 }
396 }
397
398 if ($set->isAutoGenerated()) {
399 $title->setValue($set->getPresentationTitle());
400 } else {
401 $title->setValue($def["title"]);
402 }
403
404 $form->addItem($title);
405
406 // desc
407 $desc = new ilTextAreaInputGUI($this->lng->txt('description'), 'description');
408 //use presentation title if autogenerated is set
409 if ($set->isAutoGenerated()) {
410 $desc->setValue($set->getPresentationDescription());
411 } else {
412 $desc->setValue($def["description"]);
413 }
414 $desc->setRows(3);
415 $desc->setDisabled($set->isAutoGenerated());
416 $form->addItem($desc);
417
418 // info
419 $info = new ilTextAreaInputGUI($this->lng->txt('didactic_install_info'), 'info');
420 $info->setValue($set->getInfo());
421 $info->setRows(6);
422 $form->addItem($info);
423
424 //activate
425 $enable = new ilCheckboxInputGUI($this->lng->txt('active'), 'enable');
426 $enable->setChecked($set->isEnabled());
427 $enable->setRequired(true);
428 $form->addItem($enable);
429
430 // object type
431 if (!$set->isAutoGenerated()) {
432 $type = new ilSelectInputGUI($this->lng->txt('obj_type'), 'type');
433 $type->setRequired(true);
434 $type->setInfo($this->lng->txt('dtpl_obj_type_info'));
435 $assigned = $set->getAssignments();
436 $type->setValue(isset($assigned[0]) ? $assigned[0] : '');
437 $subs = $objDefinition->getSubObjectsRecursively('root', false);
438 $options = array();
439 foreach (array_merge($subs, array('fold' => 1)) as $obj => $null) {
440 ilLoggerFactory::getLogger('root')->dump($null);
441 if ($objDefinition->isPlugin($obj)) {
442 $options[$obj] = ilObjectPlugin::lookupTxtById($obj, "obj_" . $obj);
443 } elseif ($objDefinition->isAllowedInRepository($obj)) {
444 $options[$obj] = $this->lng->txt('obj_' . $obj);
445 }
446 }
447 asort($options);
448
449 $type->setOptions($options);
450 $form->addItem($type);
451
452 $lokal_templates = new ilCheckboxInputGUI($this->lng->txt("activate_local_didactic_template"), "local_template");
453 $lokal_templates->setChecked(count($set->getEffectiveFrom()) > 0);
454 $lokal_templates->setInfo($this->lng->txt("activate_local_didactic_template_info"));
455
456 //effective from (multinode)
457 include_once("./Services/Form/classes/class.ilRepositorySelector2InputGUI.php");
458 $effrom = new ilRepositorySelector2InputGUI($this->lng->txt("effective_form"), "effective_from", true);
459 //$effrom->setMulti(true);
460 $definition = $GLOBALS['DIC']['objDefinition'];
461 $white_list = [];
462 foreach ($definition->getAllRepositoryTypes() as $type) {
463 if ($definition->isContainer($type)) {
464 $white_list[] = $type;
465 }
466 }
467 $effrom->getExplorerGUI()->setTypeWhiteList($white_list);
468 $effrom->setValue($set->getEffectiveFrom());
469
470 $lokal_templates->addSubItem($effrom);
471 $form->addItem($lokal_templates);
472
473 $excl = new ilCheckboxInputGUI($this->lng->txt("activate_exclusive_template"), "exclusive_template");
474 $excl->setInfo($this->lng->txt("activate_exclusive_template_info"));
475 $excl->setChecked($set->isExclusive());
476
477 $form->addItem($excl);
478 }
479
480
481
482 return $form;
483 }
484
488 protected function copyTemplate()
489 {
490 global $DIC;
491
492 $ilErr = $DIC['ilErr'];
493 $ilCtrl = $DIC['ilCtrl'];
494 $ilAccess = $DIC['ilAccess'];
495
496 if (!$ilAccess->checkAccess('write', '', $_REQUEST["ref_id"])) {
497 $this->ctrl->redirect($this, "overview");
498 }
499
500 if (!$_REQUEST['tplid']) {
501 ilUtil::sendFailure($this->lng->txt('select_one'));
502 return $ilCtrl->redirect($this, 'overview');
503 }
504
505 include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateCopier.php';
506
507 $copier = new ilDidacticTemplateCopier((int) $_REQUEST['tplid']);
508 $copier->start();
509
510 ilUtil::sendSuccess($this->lng->txt('didactic_copy_suc_message'), true);
511 $ilCtrl->redirect($this, 'overview');
512 }
513
517 protected function exportTemplate()
518 {
519 global $DIC;
520
521 $ilErr = $DIC['ilErr'];
522 $ilCtrl = $DIC['ilCtrl'];
523
524 if (!$_REQUEST['tplid']) {
525 ilUtil::sendFailure($this->lng->txt('select_one'));
526 return $ilCtrl->redirect($this, 'overview');
527 }
528
529 include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateXmlWriter.php';
530 $writer = new ilDidacticTemplateXmlWriter((int) $_REQUEST['tplid']);
531 $writer->write();
532
534 $writer->xmlDumpMem(true),
535 $writer->getSetting()->getTitle() . '.xml',
536 'application/xml'
537 );
538 }
539
545 protected function confirmDelete()
546 {
550 global $DIC;
551
552 $ilErr = $DIC['ilErr'];
553 $ilCtrl = $DIC['ilCtrl'];
554
555 if (!$_REQUEST['tpls']) {
556 ilUtil::sendFailure($this->lng->txt('select_one'));
557 return $ilCtrl->redirect($this, 'overview');
558 }
559
560 include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
561
562 $confirm = new ilConfirmationGUI();
563 $confirm->setFormAction($ilCtrl->getFormAction($this));
564 $confirm->setConfirm($this->lng->txt('delete'), 'deleteTemplates');
565 $confirm->setCancel($this->lng->txt('cancel'), 'overview');
566
567 $forbidden = array();
568
569 foreach ((array) $_REQUEST['tpls'] as $tplid) {
570 $tpl = new ilDidacticTemplateSetting($tplid);
571
572 if (!$tpl->isAutoGenerated()) {
573 $confirm->addItem('tpls[]', $tpl->getId(), $tpl->getPresentationTitle());
574 } else {
575 $forbidden[] = $tpl->getId();
576 }
577 }
578
579 if (count($forbidden) > 0 && count($_REQUEST['tpls']) == 1) {
580 ilUtil::sendFailure($this->lng->txt('didactic_cannot_delete_auto_generated'), true);
581 $ilCtrl->redirect($this, "overview");
582 } elseif (count($forbidden) > 0 && count($_REQUEST['tpls']) > 1) {
583 ilUtil::sendInfo($this->lng->txt('didactic_cannot_delete_auto_generated_confirmation'));
584 }
585
586 ilUtil::sendQuestion($this->lng->txt('didactic_confirm_delete_msg'));
587 $GLOBALS['DIC']['tpl']->setContent($confirm->getHTML());
588 }
589
596 protected function deleteTemplates()
597 {
598 global $DIC;
599
600 $ilErr = $DIC['ilErr'];
601 $ilCtrl = $DIC['ilCtrl'];
602 $ilAccess = $DIC['ilAccess'];
603
604 if (!$ilAccess->checkAccess('write', '', $_REQUEST["ref_id"])) {
605 $this->ctrl->redirect($this, "overview");
606 }
607
608 if (!$_REQUEST['tpls']) {
609 ilUtil::sendFailure($this->lng->txt('select_one'));
610 return $ilCtrl->redirect($this, 'overview');
611 }
612
613 foreach ((array) $_REQUEST['tpls'] as $tplid) {
614 $tpl = new ilDidacticTemplateSetting($tplid);
615 $tpl->delete();
616 }
617
618 ilUtil::sendSuccess($this->lng->txt('didactic_delete_msg'), true);
619 $ilCtrl->redirect($this, 'overview');
620 }
621
628 protected function activateTemplates()
629 {
630 global $DIC;
631
632 $ilErr = $DIC['ilErr'];
633 $ilCtrl = $DIC['ilCtrl'];
634 $ilAccess = $DIC['ilAccess'];
635
636 if (!$ilAccess->checkAccess('write', '', $_REQUEST["ref_id"])) {
637 $this->ctrl->redirect($this, "overview");
638 }
639 if (!$_REQUEST['tpls']) {
640 ilUtil::sendFailure($this->lng->txt('select_one'));
641 return $ilCtrl->redirect($this, 'overview');
642 }
643
644 foreach ($_REQUEST['tpls'] as $tplid) {
645 $tpl = new ilDidacticTemplateSetting($tplid);
646 $tpl->enable(true);
647 $tpl->update();
648 }
649
650 ilUtil::sendSuccess($this->lng->txt('didactic_activated_msg'), true);
651 $ilCtrl->redirect($this, 'overview');
652 }
653
660 protected function deactivateTemplates()
661 {
662 global $DIC;
663
664 $ilErr = $DIC['ilErr'];
665 $ilCtrl = $DIC['ilCtrl'];
666 $ilAccess = $DIC['ilAccess'];
667
668 if (!$ilAccess->checkAccess('write', '', $_REQUEST["ref_id"])) {
669 $this->ctrl->redirect($this, "overview");
670 }
671
672 if (!$_REQUEST['tpls']) {
673 ilUtil::sendFailure($this->lng->txt('select_one'));
674 $ilCtrl->redirect($this, 'overview');
675 }
676
677 foreach ($_REQUEST['tpls'] as $tplid) {
678 $tpl = new ilDidacticTemplateSetting($tplid);
679 $tpl->enable(false);
680 $tpl->update();
681 }
682
683 ilUtil::sendSuccess($this->lng->txt('didactic_deactivated_msg'), true);
684 $ilCtrl->redirect($this, 'overview');
685 }
686
690 protected function setEditTabs($a_tab_active = "edit")
691 {
696 global $DIC;
697
698 $ilCtrl = $DIC['ilCtrl'];
699 $ilTabs = $DIC['ilTabs'];
700
701
702 $ilTabs->clearTargets();
703 $ilTabs->setBackTarget(
704 $this->lng->txt('didactic_back_to_overview'),
705 $ilCtrl->getLinkTarget($this, 'overview')
706 );
707 $ilCtrl->saveParameter($this, "tplid");
708
709 if (!$this->object->isAutoGenerated()) {
710 $ilTabs->addTab('edit', $this->lng->txt('settings'), $ilCtrl->getLinkTarget($this, 'editTemplate'));
711 $ilTabs->addTab('import', $this->lng->txt('import'), $ilCtrl->getLinkTarget($this, 'showEditImportForm'));
712
713 if (in_array($a_tab_active, array('edit', 'settings_trans'))) {
714 $ilTabs->addSubTab('edit', $this->lng->txt('settings'), $ilCtrl->getLinkTarget($this, 'editTemplate'));
715 $ilTabs->addSubTab('settings_trans', $this->lng->txt("obj_multilinguality"), $ilCtrl->getLinkTargetByClass(array( "ilmultilingualismgui"), 'listTranslations'));
716 $ilTabs->setTabActive('edit');
717 $ilTabs->setSubTabActive($a_tab_active);
718 } else {
719 $ilTabs->setTabActive($a_tab_active);
720 }
721 }
722 }
723
724 public function showEditImportForm()
725 {
726 $this->setEditTabs("import");
727
728 $form = $this->editImportForm();
729
730 $GLOBALS['DIC']['tpl']->setContent($form->getHTML());
731 }
732
733 public function editImportForm()
734 {
735 global $DIC;
736
737 $ilCtrl = $DIC['ilCtrl'];
738
739 include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
740 $form = new ilPropertyFormGUI();
741 $form->setShowTopButtons(false);
742 $form->setFormAction($ilCtrl->getFormAction($this));
743 $form->setTitle($this->lng->txt('didactic_import_table_title'));
744 $form->addCommandButton('importTemplate', $this->lng->txt('import'));
745 $form->addCommandButton('overview', $this->lng->txt('cancel'));
746
747 $file = new ilFileInputGUI($this->lng->txt('didactic_template_update_import'), 'file');
748 $file->setSuffixes(array('xml'));
749 $file->setInfo($this->lng->txt('didactic_template_update_import_info'));
750 $form->addItem($file);
751
752 return $form;
753 }
754
759 public function editImport($a_settings)
760 {
761 global $DIC;
762
763 $ilCtrl = $DIC['ilCtrl'];
764 $tplid = $_REQUEST['tplid'];
765
766 include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
768
770
771 $this->object->delete();
772
773 foreach ($assignments as $obj) {
774 ilDidacticTemplateObjSettings::assignTemplate($obj["ref_id"], $obj["obj_id"], $a_settings->getId());
775 }
776
777 $ilCtrl->setParameter($this, "tplid", $a_settings->getId());
778 }
779}
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
An exception for terminatinating execution or to throw for unit testing.
This class represents a checkbox property in a property form.
Confirmation screen class.
Copy a didactic template and all subitems.
Description of ilDidacticTemplateImportException.
Description of ilDidacticTemplateImport.
static assignTemplate($a_ref_id, $a_obj_id, $a_tpl_id)
Assign template to object @global ilDB $ilDB.
static getAssignmentsByTemplateID($a_tpl_id)
Lookup template id @global ilDB $ilDB.
static transferAutoGenerateStatus($a_src, $a_dest)
transfer auto generated flag if source is auto generated
getTranslations()
get all translations from this object
getInfo()
Get installation info text.
isEnabled()
Check if template is enabled.
Settings for a single didactic template.
deactivateTemplates()
Activate didactic templates @global ilErrorHandling $ilErr @global ilCtrl $ilCtrl.
initEditTemplate(ilDidacticTemplateSetting $set)
Init edit template form.
editImport($a_settings)
@global ilCtrl $ilCtrl
overview()
Show didactic template administration.
showImportForm(ilPropertyFormGUI $form=null)
Show template import form.
activateTemplates()
Activate didactic templates @global ilErrorHandling $ilErr @global ilCtrl $ilCtrl.
editTemplate(ilPropertyFormGUI $form=null)
Edit template.
deleteTemplates()
Delete chosen didactic templates @global ilErrorHandling $ilErr @global ilCtrl $ilCtrl.
Description of ilDidacticTemplateSettingsTableGUI.
This class represents a file property in a property form.
static getLogger($a_component_id)
Get component logger.
GUI class for object translation handling.
static lookupTxtById($plugin_id, $lang_var)
This class represents a property form user interface.
This class represents a selection list property in a property form.
This class represents a text area property in a property form.
This class represents a text property in a property form.
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
static sendQuestion($a_info="", $a_keep=false)
Send Question to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static deliverData($a_data, $a_filename, $mime="application/octet-stream", $charset="")
deliver data for download via browser.
static ilTempnam($a_temp_path=null)
Returns a unique and non existing Path for e temporary file or directory.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
global $ilCtrl
Definition: ilias.php:18
$type
$ilErr
Definition: raiseError.php:18
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
$lang
Definition: xapiexit.php:8
$DIC
Definition: xapitoken.php:46