ILIAS  release_8 Revision v8.24
class.ilObjTestDynamicQuestionSetConfigGUI.php
Go to the documentation of this file.
1<?php
2
30{
31 public const CMD_SHOW_FORM = 'showForm';
32 public const CMD_SAVE_FORM = 'saveForm';
33 public const CMD_GET_TAXONOMY_OPTIONS_ASYNC = 'getTaxonomyOptionsAsync';
34
35 public const QUESTION_ORDERING_TYPE_UPDATE_DATE = 'ordering_by_date';
36 public const QUESTION_ORDERING_TYPE_TAXONOMY = 'ordering_by_tax';
37
40 protected ilTabsGUI $tabs;
41 protected ilLanguage $lng;
43 protected ilDBInterface $db;
44 protected ilTree $tree;
47
48 public function __construct(
56 ilComponentRepository $component_repository,
58 ) {
59 $this->ctrl = $ctrl;
60 $this->access = $access;
61 $this->tabs = $tabs;
62 $this->lng = $lng;
63 $this->tpl = $tpl;
64 $this->db = $db;
65 $this->tree = $tree;
66 $this->testOBJ = $testOBJ;
67
68 $this->questionSetConfig = new ilObjTestDynamicQuestionSetConfig(
69 $this->tree,
70 $this->db,
71 $component_repository,
72 $this->testOBJ
73 );
74 }
75
76 public function executeCommand()
77 {
78 // allow only write access
79
80 if (!$this->access->checkAccess("write", "", $this->testOBJ->getRefId())) {
81 $this->tpl->setOnScreenMessage('info', $this->lng->txt("cannot_edit_test"), true);
82 $this->ctrl->redirectByClass('ilObjTestGUI', "infoScreen");
83 }
84
85 // activate corresponding tab (auto activation does not work in ilObjTestGUI-Tabs-Salad)
86
87 $this->tabs->activateTab('assQuestions');
88 $this->tpl->setOnScreenMessage('info', $this->lng->txt("ctm_cannot_be_changed"));
89 }
90}
Class ilCtrl provides processing control methods.
language handling
__construct(ilCtrl $ctrl, ilAccessHandler $access, ilTabsGUI $tabs, ilLanguage $lng, ilGlobalTemplateInterface $tpl, ilDBInterface $db, ilTree $tree, ilComponentRepository $component_repository, ilObjTest $testOBJ)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Readable part of repository interface to ilComponentDataDB.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface ilDBInterface.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...