19declare(strict_types=1);
45 bool $a_call_by_reference =
true,
46 bool $a_prepare_output =
true
49 $rbacsystem =
$DIC[
'rbacsystem'];
50 $this->data_factory =
new DataFactory();
52 $local_dic = TestDIC::dic();
53 $this->testrequest = $local_dic[
'request_data_collector'];
54 $this->log_viewer = $local_dic[
'logging.viewer'];
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);
64 $this->
lng->loadLanguageModule(
'assessment');
75 $next_class = $this->
ctrl->getNextClass($this);
76 $cmd = $this->
ctrl->getCmd();
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);
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);
90 $this->tabs_gui->setTabActive(
'units');
92 $gui = new \ilGlobalUnitConfigurationGUI(
95 $this->
ctrl->forwardCommand($gui);
99 if ($cmd ===
null || $cmd ===
'' || $cmd ===
'view') {
100 $cmd =
'showGlobalSettings';
111 $this->tabs_gui->setTabActive(
'settings');
113 if ($form ===
null) {
117 $this->tpl->setContent($this->ui_renderer->render($form));
128 return $this->ui_factory->input()->container()->form()->standard(
129 $this->
ctrl->getFormActionByClass(self::class,
'SaveGlobalSettings'),
139 if (!$this->
access->checkAccess(
'write',
'', $this->getTestFolder()->getRefId())) {
140 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'no_permission'));
146 $data = $form->getData();
147 if (
$data ===
null) {
153 ->storeGlobalSettings(
$data[
'global_settings']);
160 $csv_output = $this->
getTestFolder()->getTestLogViewer()->getLegacyLogExportForObjId();
170 $this->tabs_gui->activateTab(
'logs');
172 if ($form ===
null) {
176 $this->tpl->setContent($this->ui_renderer->render($form));
181 if (!$this->
access->checkAccess(
'write',
'', $this->getTestFolder()->getRefId())) {
182 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'no_permission'));
188 $data = $form->getData();
189 if (
$data ===
null) {
195 ->storeLoggingSettings(
$data[
'logging']);
208 return $this->ui_factory->input()->container()->form()->standard(
209 $this->
ctrl->getFormActionByClass(self::class,
'saveLogSettings'),
216 $this->tabs_gui->activateTab(
'logs');
218 $this->ui_factory->button()->standard(
219 $this->lng->txt(
'export_legacy_logs'),
220 $this->ctrl->getLinkTargetByClass(self::class,
'exportLegacyLogs')
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
231 if ($this->request_wrapper->has($action_parameter_token->getName())) {
232 $this->
object->getTestLogViewer()->executeLogTableAction(
234 $action_parameter_token,
239 $table_gui = $this->log_viewer->getLogTable(
241 $action_parameter_token,
244 $this->tpl->setVariable(
'ADM_CONTENT', $this->ui_renderer->render($table_gui));
254 $this->tabs_gui->addSubTabTarget(
256 $this->
ctrl->getLinkTarget($this,
'showLogSettings'),
257 [
'saveLogSettings',
'showLogSettings'],
262 $this->tabs_gui->addSubTabTarget(
264 $this->
ctrl->getLinkTargetByClass(self::class, self::SHOW_LOGS_CMD),
265 [self::SHOW_LOGS_CMD],
272 if (in_array($this->
ctrl->getCmd(), [
'saveLogSettings',
'showLogSettings', self::SHOW_LOGS_CMD])) {
276 if ($this->rbac_system->checkAccess(
'visible,read', $this->getTestFolder()->getRefId())) {
277 $this->tabs_gui->addTarget(
279 $this->
ctrl->getLinkTarget($this,
'showGlobalSettings'),
280 [
'showGlobalSettings',
'settings',
'',
'view'],
285 $this->tabs_gui->addTarget(
287 $this->
ctrl->getLinkTarget($this,
"showLogSettings"),
288 [
'saveLogSettings',
'showLogSettings', self::SHOW_LOGS_CMD,
'showLog',
'exportLog',
'logAdmin',
'deleteLog'],
293 $this->tabs_gui->addTarget(
295 $this->
ctrl->getLinkTargetByClass(
'ilGlobalUnitConfigurationGUI',
''),
297 'ilglobalunitconfigurationgui'
301 if ($this->rbac_system->checkAccess(
'edit_permission', $this->getTestFolder()->getRefId())) {
302 $this->tabs_gui->addTarget(
304 $this->
ctrl->getLinkTargetByClass([get_class($this),
'ilpermissiongui'],
"perm"),
305 [
"perm",
"info",
"owner"],
showGlobalSettingsObject(?Form $form=null)
buildGlobalSettingsForm()
saveGlobalSettingsObject()
Save Assessment settings.
showLogSettingsObject(?Form $form=null)
DataFactory $data_factory
RequestDataCollector $testrequest
getAdminTabs()
administration tabs show only permissions and trash folder
getTabs()
@abstract overwrite in derived GUI class of your object type
TestLogViewer $log_viewer
__construct( $a_data, int $a_id=0, bool $a_call_by_reference=true, bool $a_prepare_output=true)
Class ilObjectGUI Basic methods of all Output classes.
prepareOutput(bool $show_sub_objects=true)
Class ilUnitConfigurationRepository.
static deliverData(string $a_data, string $a_filename, string $mime="application/octet-stream")
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
Class ilObjForumAdministration.