ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilObjTestFolderGUI Class Reference
+ Inheritance diagram for ilObjTestFolderGUI:
+ Collaboration diagram for ilObjTestFolderGUI:

Public Member Functions

 __construct ( $a_data, int $a_id=0, bool $a_call_by_reference=true, bool $a_prepare_output=true)
 
 executeCommand ()
 
 showGlobalSettingsObject (?Form $form=null)
 
 saveGlobalSettingsObject ()
 Save Assessment settings. More...
 
 exportLegacyLogsObject ()
 
 logsObject ()
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getLogdataSubtabs ()
 
- Public Member Functions inherited from ilObjectGUI
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 If true, a creation screen is displayed the current [ref_id] does belong to the parent class The mode is determined in ilRepositoryGUI. More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 editAvailabilityPeriodObject ()
 
 saveAvailabilityPeriodObject ()
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, ?int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Protected Member Functions

 showLogSettingsObject (?Form $form=null)
 
 saveLogSettingsObject ()
 
 buildLogSettingsForm ()
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 createActionDispatcherGUI ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 getCreationFormsHTML (StandardForm|ilPropertyFormGUI|array $form)
 
 getTitleForCreationFormPage ()
 
 getCreationFormTitle ()
 
 initCreateForm (string $new_type)
 
 didacticTemplatesToForm ()
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 retrieveAdditionalDidacticTemplateOptions ()
 
 addAdoptContentLinkToToolbar ()
 
 addImportButtonToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 parseDidacticTemplateVar (string $var, string $type)
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 routeImportCmdObject ()
 
 importFile (string $file_to_import, string $path_to_uploaded_file_in_temp_dir)
 
 deleteUploadedImportFile (string $path_to_uploaded_file_in_temp_dir)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current ["ref_id"] value of the request More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 getCreatableObjectTypes ()
 
 buildAddNewItemElements (array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)
 
 buildGroup (string $create_target_class, array $obj_types_in_group, string $title, array $subtypes)
 

Private Member Functions

 getTestFolder ()
 
 buildGlobalSettingsForm ()
 

Private Attributes

const SHOW_LOGS_CMD = 'logs'
 
RequestDataCollector $testrequest
 
TestLogViewer $log_viewer
 
DataFactory $data_factory
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 
- Data Fields inherited from ilObjectGUI
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
const SUPPORTED_IMPORT_MIME_TYPES = [MimeType::APPLICATION__ZIP, MimeType::APPLICATION__X_ZIP_COMPRESSED]
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
GlobalHttpState $http
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Refinery $refinery
 
ilFavouritesManager $favourites
 
CustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
Filesystem $temp_file_system
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjTestFolderGUI::__construct (   $a_data,
int  $a_id = 0,
bool  $a_call_by_reference = true,
bool  $a_prepare_output = true 
)

Definition at line 42 of file class.ilObjTestFolderGUI.php.

47 {
48 global $DIC;
49 $rbacsystem = $DIC['rbacsystem'];
50 $this->data_factory = new DataFactory();
51
52 $local_dic = TestDIC::dic();
53 $this->testrequest = $local_dic['request_data_collector'];
54 $this->log_viewer = $local_dic['logging.viewer'];
55
56 $this->type = 'assf';
57
58 parent::__construct($a_data, $a_id, $a_call_by_reference, false);
59
60 if (!$rbacsystem->checkAccess('read', $this->object->getRefId())) {
61 $this->ilias->raiseError($this->lng->txt("msg_no_perm_read_assf"), $this->ilias->error_obj->WARNING);
62 }
63
64 $this->lng->loadLanguageModule('assessment');
65 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
Class ilObjForumAdministration.
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

Member Function Documentation

◆ buildGlobalSettingsForm()

ilObjTestFolderGUI::buildGlobalSettingsForm ( )
private

Definition at line 120 of file class.ilObjTestFolderGUI.php.

120 : Form
121 {
122 $inputs = $this->getTestFolder()->getGlobalSettingsRepository()->getGlobalSettings()->toForm(
123 $this->ui_factory,
124 $this->refinery,
125 $this->lng
126 );
127
128 return $this->ui_factory->input()->container()->form()->standard(
129 $this->ctrl->getFormActionByClass(self::class, 'SaveGlobalSettings'),
130 $inputs
131 );
132 }
This describes commonalities between all forms.
Definition: Form.php:33

References ILIAS\UI\Implementation\Component\Input\$inputs, ILIAS\Repository\ctrl(), getTestFolder(), ILIAS\Repository\lng(), and ILIAS\Repository\refinery().

Referenced by saveGlobalSettingsObject(), and showGlobalSettingsObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildLogSettingsForm()

ilObjTestFolderGUI::buildLogSettingsForm ( )
protected

Definition at line 200 of file class.ilObjTestFolderGUI.php.

200 : Form
201 {
202 $inputs = $this->getTestFolder()->getGlobalSettingsRepository()->getLoggingSettings()->toForm(
203 $this->ui_factory,
204 $this->refinery,
205 $this->lng
206 );
207
208 return $this->ui_factory->input()->container()->form()->standard(
209 $this->ctrl->getFormActionByClass(self::class, 'saveLogSettings'),
210 $inputs
211 );
212 }

References ILIAS\UI\Implementation\Component\Input\$inputs, ILIAS\Repository\ctrl(), getTestFolder(), ILIAS\Repository\lng(), and ILIAS\Repository\refinery().

Referenced by saveLogSettingsObject(), and showLogSettingsObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilObjTestFolderGUI::executeCommand ( )

Reimplemented from ilObjectGUI.

Definition at line 73 of file class.ilObjTestFolderGUI.php.

73 : void
74 {
75 $next_class = $this->ctrl->getNextClass($this);
76 $cmd = $this->ctrl->getCmd();
77 $this->prepareOutput();
78
79 switch ($next_class) {
80 case 'ilpermissiongui':
81 $this->tabs_gui->activateTab('perm_settings');
82 $perm_gui = new \ilPermissionGUI($this);
83 $this->ctrl->forwardCommand($perm_gui);
84 break;
85 case 'ilglobalunitconfigurationgui':
86 if (!$this->rbac_system->checkAccess('visible,read', $this->getTestFolder()->getRefId())) {
87 $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->WARNING);
88 }
89
90 $this->tabs_gui->setTabActive('units');
91
92 $gui = new \ilGlobalUnitConfigurationGUI(
94 );
95 $this->ctrl->forwardCommand($gui);
96 break;
97
98 default:
99 if ($cmd === null || $cmd === '' || $cmd === 'view') {
100 $cmd = 'showGlobalSettings';
101 }
102 $cmd .= 'Object';
103 $this->$cmd();
104
105 break;
106 }
107 }
prepareOutput(bool $show_sub_objects=true)
Class ilUnitConfigurationRepository.

References ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ilObjectGUI\prepareOutput().

+ Here is the call graph for this function:

◆ exportLegacyLogsObject()

ilObjTestFolderGUI::exportLegacyLogsObject ( )

Definition at line 158 of file class.ilObjTestFolderGUI.php.

158 : void
159 {
160 $csv_output = $this->getTestFolder()->getTestLogViewer()->getLegacyLogExportForObjId();
161
163 $csv_output,
164 'legacy_logs.csv'
165 );
166 }
static deliverData(string $a_data, string $a_filename, string $mime="application/octet-stream")

References ilUtil\deliverData(), and getTestFolder().

+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjTestFolderGUI::getAdminTabs ( )

administration tabs show only permissions and trash folder

Reimplemented from ilObjectGUI.

Definition at line 247 of file class.ilObjTestFolderGUI.php.

247 : void
248 {
249 $this->getTabs();
250 }
getTabs()
@abstract overwrite in derived GUI class of your object type

References getTabs().

+ Here is the call graph for this function:

◆ getLogdataSubtabs()

ilObjTestFolderGUI::getLogdataSubtabs ( )

Definition at line 252 of file class.ilObjTestFolderGUI.php.

252 : void
253 {
254 $this->tabs_gui->addSubTabTarget(
255 'settings',
256 $this->ctrl->getLinkTarget($this, 'showLogSettings'),
257 ['saveLogSettings', 'showLogSettings'],
258 ''
259 );
260
261 // log output
262 $this->tabs_gui->addSubTabTarget(
263 'logs_output',
264 $this->ctrl->getLinkTargetByClass(self::class, self::SHOW_LOGS_CMD),
265 [self::SHOW_LOGS_CMD],
266 ''
267 );
268 }

References ILIAS\Repository\ctrl().

Referenced by getTabs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTabs()

ilObjTestFolderGUI::getTabs ( )
protected

@abstract overwrite in derived GUI class of your object type

Reimplemented from ilObjectGUI.

Definition at line 270 of file class.ilObjTestFolderGUI.php.

270 : void
271 {
272 if (in_array($this->ctrl->getCmd(), ['saveLogSettings', 'showLogSettings', self::SHOW_LOGS_CMD])) {
273 $this->getLogdataSubtabs();
274 }
275
276 if ($this->rbac_system->checkAccess('visible,read', $this->getTestFolder()->getRefId())) {
277 $this->tabs_gui->addTarget(
278 'settings',
279 $this->ctrl->getLinkTarget($this, 'showGlobalSettings'),
280 ['showGlobalSettings', 'settings', '', 'view'],
281 '',
282 ''
283 );
284
285 $this->tabs_gui->addTarget(
286 'logs',
287 $this->ctrl->getLinkTarget($this, "showLogSettings"),
288 ['saveLogSettings', 'showLogSettings', self::SHOW_LOGS_CMD, 'showLog', 'exportLog', 'logAdmin', 'deleteLog'],
289 '',
290 ''
291 );
292
293 $this->tabs_gui->addTarget(
294 'units',
295 $this->ctrl->getLinkTargetByClass('ilGlobalUnitConfigurationGUI', ''),
296 '',
297 'ilglobalunitconfigurationgui'
298 );
299 }
300
301 if ($this->rbac_system->checkAccess('edit_permission', $this->getTestFolder()->getRefId())) {
302 $this->tabs_gui->addTarget(
303 "perm_settings",
304 $this->ctrl->getLinkTargetByClass([get_class($this), 'ilpermissiongui'], "perm"),
305 ["perm", "info", "owner"],
306 'ilpermissiongui'
307 );
308 }
309 }

References ILIAS\Repository\ctrl(), and getLogdataSubtabs().

Referenced by getAdminTabs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTestFolder()

ilObjTestFolderGUI::getTestFolder ( )
private

@noinspection PhpIncompatibleReturnTypeInspection

Definition at line 67 of file class.ilObjTestFolderGUI.php.

68 {
70 return $this->object;
71 }
Class ilObjTestFolder.

References ilObjectGUI\$object.

Referenced by buildGlobalSettingsForm(), buildLogSettingsForm(), exportLegacyLogsObject(), saveGlobalSettingsObject(), and saveLogSettingsObject().

+ Here is the caller graph for this function:

◆ logsObject()

ilObjTestFolderGUI::logsObject ( )

Definition at line 214 of file class.ilObjTestFolderGUI.php.

214 : void
215 {
216 $this->tabs_gui->activateTab('logs');
217 $this->toolbar->addComponent(
218 $this->ui_factory->button()->standard(
219 $this->lng->txt('export_legacy_logs'),
220 $this->ctrl->getLinkTargetByClass(self::class, 'exportLegacyLogs')
221 )
222 );
223 $here_uri = $this->data_factory->uri(ILIAS_HTTP_PATH
224 . '/' . $this->ctrl->getLinkTargetByClass(self::class, self::SHOW_LOGS_CMD));
225 list($url_builder, $action_parameter_token, $row_id_token) = (new URLBuilder($here_uri))->acquireParameters(
226 LogTable::QUERY_PARAMETER_NAME_SPACE,
227 LogTable::ACTION_TOKEN_STRING,
228 LogTable::ENTRY_TOKEN_STRING
229 );
230
231 if ($this->request_wrapper->has($action_parameter_token->getName())) {
232 $this->object->getTestLogViewer()->executeLogTableAction(
233 $url_builder,
234 $action_parameter_token,
235 $row_id_token
236 );
237 }
238
239 $table_gui = $this->log_viewer->getLogTable(
240 $url_builder,
241 $action_parameter_token,
242 $row_id_token
243 );
244 $this->tpl->setVariable('ADM_CONTENT', $this->ui_renderer->render($table_gui));
245 }

References ILIAS\Repository\ctrl(), and ILIAS\Repository\toolbar().

+ Here is the call graph for this function:

◆ saveGlobalSettingsObject()

ilObjTestFolderGUI::saveGlobalSettingsObject ( )

Save Assessment settings.

Definition at line 137 of file class.ilObjTestFolderGUI.php.

137 : void
138 {
139 if (!$this->access->checkAccess('write', '', $this->getTestFolder()->getRefId())) {
140 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('no_permission'));
142 return;
143 }
144
145 $form = $this->buildGlobalSettingsForm()->withRequest($this->request);
146 $data = $form->getData();
147 if ($data === null) {
148 $this->showGlobalSettingsObject($form);
149 return;
150 }
151
152 $this->getTestFolder()->getGlobalSettingsRepository()
153 ->storeGlobalSettings($data['global_settings']);
154
155 $this->showGlobalSettingsObject($form);
156 }
showGlobalSettingsObject(?Form $form=null)

References ilObjectGUI\$data, ILIAS\Repository\access(), buildGlobalSettingsForm(), getTestFolder(), ILIAS\Repository\lng(), and showGlobalSettingsObject().

+ Here is the call graph for this function:

◆ saveLogSettingsObject()

ilObjTestFolderGUI::saveLogSettingsObject ( )
protected

Definition at line 179 of file class.ilObjTestFolderGUI.php.

179 : void
180 {
181 if (!$this->access->checkAccess('write', '', $this->getTestFolder()->getRefId())) {
182 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('no_permission'));
183 $this->showLogSettingsObject();
184 return;
185 }
186
187 $form = $this->buildLogSettingsForm()->withRequest($this->request);
188 $data = $form->getData();
189 if ($data === null) {
190 $this->showLogSettingsObject($form);
191 return;
192 }
193
194 $this->getTestFolder()->getGlobalSettingsRepository()
195 ->storeLoggingSettings($data['logging']);
196
197 $this->showLogSettingsObject($form);
198 }
showLogSettingsObject(?Form $form=null)

References ilObjectGUI\$data, ILIAS\Repository\access(), buildLogSettingsForm(), getTestFolder(), ILIAS\Repository\lng(), and showLogSettingsObject().

+ Here is the call graph for this function:

◆ showGlobalSettingsObject()

ilObjTestFolderGUI::showGlobalSettingsObject ( ?Form  $form = null)

Definition at line 109 of file class.ilObjTestFolderGUI.php.

109 : void
110 {
111 $this->tabs_gui->setTabActive('settings');
112
113 if ($form === null) {
114 $form = $this->buildGlobalSettingsForm();
115 }
116
117 $this->tpl->setContent($this->ui_renderer->render($form));
118 }

References buildGlobalSettingsForm().

Referenced by saveGlobalSettingsObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showLogSettingsObject()

ilObjTestFolderGUI::showLogSettingsObject ( ?Form  $form = null)
protected

Definition at line 168 of file class.ilObjTestFolderGUI.php.

168 : void
169 {
170 $this->tabs_gui->activateTab('logs');
171
172 if ($form === null) {
173 $form = $this->buildLogSettingsForm();
174 }
175
176 $this->tpl->setContent($this->ui_renderer->render($form));
177 }

References buildLogSettingsForm().

Referenced by saveLogSettingsObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $data_factory

DataFactory ilObjTestFolderGUI::$data_factory
private

Definition at line 40 of file class.ilObjTestFolderGUI.php.

◆ $log_viewer

TestLogViewer ilObjTestFolderGUI::$log_viewer
private

Definition at line 38 of file class.ilObjTestFolderGUI.php.

◆ $testrequest

RequestDataCollector ilObjTestFolderGUI::$testrequest
private

Definition at line 37 of file class.ilObjTestFolderGUI.php.

◆ SHOW_LOGS_CMD

const ilObjTestFolderGUI::SHOW_LOGS_CMD = 'logs'
private

Definition at line 35 of file class.ilObjTestFolderGUI.php.


The documentation for this class was generated from the following file: