ILIAS  release_8 Revision v8.24
ilObjAssessmentFolderGUI Class Reference

Class ilObjAssessmentFolderGUI. More...

+ Inheritance diagram for ilObjAssessmentFolderGUI:
+ Collaboration diagram for ilObjAssessmentFolderGUI:

Public Member Functions

 __construct ($a_data, int $a_id=0, bool $a_call_by_reference=true, bool $a_prepare_output=true)
 
 settingsObject (ilPropertyFormGUI $form=null)
 
 saveSettingsObject ()
 Save Assessment settings. More...
 
 showLogObject ()
 Called when the a log should be shown. More...
 
 exportLogObject ()
 Called when the a log should be exported. More...
 
 deleteLogObject ()
 Deletes the log entries for one or more tests. More...
 
 logAdminObject ()
 Administration output for assessment log files. More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getLogdataSubtabs ()
 
- Public Member Functions inherited from ilObjectGUI
 __construct ($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
 
 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] don't belong to the current 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...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 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)
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html Should be overwritten and redirect to settings screen. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Static Public Member Functions

static getSettingsTemplateConfig ()
 
- 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)
 

Protected Member Functions

 getLogDataOutputForm ()
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 showLogSettingsObject (ilPropertyFormGUI $form=null)
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 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...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 getCreationFormsHTML (array $forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm (string $new_type)
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 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...
 
 initImportForm (string $new_type)
 
 importFileObject (int $parent_id=null)
 
 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...
 
 fillCloneTemplate (?string $tpl_name, string $type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. 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...
 
 showCustomIconsEditing ( $input_colspan=1, ilPropertyFormGUI $form=null, $as_section=true)
 show edit section of custom icons for container More...
 

Protected Attributes

ILIAS Test InternalRequestService $testrequest
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
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
 
Factory $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
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 = ""
 

Private Member Functions

 getAssessmentFolder ()
 
 forwardToSettingsTemplateGUI ()
 

Additional Inherited Members

- Data Fields inherited from ilObjectGUI
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
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
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjAssessmentFolderGUI::__construct (   $data,
int  $id = 0,
bool  $call_by_reference = true,
bool  $prepare_output = true 
)
Parameters
mixed$data
int$id
bool$call_by_reference
bool$prepare_output
Exceptions
ilCtrlException

Reimplemented from ilObjectGUI.

Definition at line 30 of file class.ilObjAssessmentFolderGUI.php.

31 {
32 global $DIC;
33 $rbacsystem = $DIC['rbacsystem'];
34 $this->testrequest = $DIC->test()->internal()->request();
35 $this->type = "assf";
36 parent::__construct($a_data, $a_id, $a_call_by_reference, false);
37
38 if (!$rbacsystem->checkAccess('read', $this->object->getRefId())) {
39 $this->ilias->raiseError($this->lng->txt("msg_no_perm_read_assf"), $this->ilias->error_obj->WARNING);
40 }
41
42 $this->lng->loadLanguageModule('assessment');
43 }
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
header include for all ilias files.

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

+ Here is the call graph for this function:

Member Function Documentation

◆ deleteLogObject()

ilObjAssessmentFolderGUI::deleteLogObject ( )

Deletes the log entries for one or more tests.

Definition at line 544 of file class.ilObjAssessmentFolderGUI.php.

544 : void
545 {
546 $test_ids = $this->post_wrapper->retrieve(
547 'chb_test',
548 $this->refinery->byTrying([
549 $this->refinery->kindlyTo()->listOf($this->refinery->kindlyTo()->int()),
550 $this->refinery->always([])
551 ])
552 );
553
554 if ($test_ids !== []) {
555 $this->getAssessmentFolder()->deleteLogEntries($test_ids);
556 $this->tpl->setOnScreenMessage('success', $this->lng->txt("ass_log_deleted"));
557 } else {
558 $this->tpl->setOnScreenMessage('info', $this->lng->txt("ass_log_delete_no_selection"));
559 }
560
561 $this->logAdminObject();
562 }
logAdminObject()
Administration output for assessment log files.

References getAssessmentFolder(), ILIAS\Repository\lng(), logAdminObject(), and ILIAS\Repository\refinery().

+ Here is the call graph for this function:

◆ exportLogObject()

ilObjAssessmentFolderGUI::exportLogObject ( )

Called when the a log should be exported.

Definition at line 352 of file class.ilObjAssessmentFolderGUI.php.

352 : void
353 {
354 $form = $this->getLogDataOutputForm();
355 if (!$form->checkInput()) {
356 $form->setValuesByPost();
357 $this->logsObject($form);
358 return;
359 }
360
361 $test = (int) $form->getInput('sel_test');
362 $from = $form->getItemByPostVar('log_from')->getDate()->get(IL_CAL_UNIX);
363 $until = $form->getItemByPostVar('log_until')->getDate()->get(IL_CAL_UNIX);
364
365 $csv = [];
366 $separator = ";";
367 $row = [
368 $this->lng->txt("assessment_log_datetime"),
369 $this->lng->txt("user"),
370 $this->lng->txt("assessment_log_text"),
371 $this->lng->txt("question")
372 ];
373
374 $available_tests = ilObjTest::_getAvailableTests(1);
375 $csv[] = ilCSVUtil::processCSVRow($row, true, $separator);
376 $log_output = ilObjAssessmentFolder::getLog($from, $until, $test);
377 $users = [];
378 foreach ($log_output as $key => $log) {
379 if (!array_key_exists($log["user_fi"], $users)) {
380 $users[$log["user_fi"]] = ilObjUser::_lookupName((int) $log["user_fi"]);
381 }
382 $title = "";
383 if ($log["question_fi"] || $log["original_fi"]) {
384 $title = assQuestion::_getQuestionTitle((int) $log["question_fi"]);
385 if ($title === '') {
386 $title = assQuestion::_getQuestionTitle((int) $log["original_fi"]);
387 }
388 $title = $this->lng->txt("assessment_log_question") . ": " . $title;
389 }
390 $csvrow = [];
391 $date = new ilDateTime((int) $log['tstamp'], IL_CAL_UNIX);
392 $csvrow[] = $date->get(IL_CAL_FKT_DATE, 'Y-m-d H:i');
393 $csvrow[] = trim($users[$log["user_fi"]]["title"] . " " . $users[$log["user_fi"]]["firstname"] . " " . $users[$log["user_fi"]]["lastname"]);
394 $csvrow[] = trim($log["logtext"]);
395 $csvrow[] = $title;
396 $csv[] = ilCSVUtil::processCSVRow($csvrow, true, $separator);
397 }
398 $csvoutput = "";
399 foreach ($csv as $row) {
400 $csvoutput .= implode($separator, $row) . "\n";
401 }
403 $csvoutput,
404 str_replace(" ", "_", "log_" . $from . "_" . $until . "_" . $available_tests[$test]) . ".csv"
405 );
406 }
const IL_CAL_UNIX
const IL_CAL_FKT_DATE
static _getQuestionTitle(int $question_id)
static & processCSVRow(array &$row, bool $quoteAll=false, string $separator=";", bool $outUTF8=false, bool $compatibleWithMSExcel=true)
Convertes an array for CSV usage.
@classDescription Date and time handling
static getLog(int $ts_from, int $ts_to, int $test_id, bool $test_only=false)
Retrieve assessment log datasets from the database.
static _getAvailableTests($use_object_id=false)
Returns the available tests for the active user.
static _lookupName(int $a_user_id)
lookup user name
static deliverData(string $a_data, string $a_filename, string $mime="application/octet-stream")
string $key
Consumer key/client ID value.
Definition: System.php:193
$log
Definition: result.php:33

References ILIAS\LTI\ToolProvider\$key, $log, ilObjTest\_getAvailableTests(), assQuestion\_getQuestionTitle(), ilObjUser\_lookupName(), ilUtil\deliverData(), ilObjAssessmentFolder\getLog(), getLogDataOutputForm(), IL_CAL_FKT_DATE, IL_CAL_UNIX, ILIAS\Repository\int(), ILIAS\Repository\lng(), and ilCSVUtil\processCSVRow().

+ Here is the call graph for this function:

◆ forwardToSettingsTemplateGUI()

ilObjAssessmentFolderGUI::forwardToSettingsTemplateGUI ( )
private

Definition at line 775 of file class.ilObjAssessmentFolderGUI.php.

775 : void
776 {
777 global $DIC;
778 $ilTabs = $DIC['ilTabs'];
779
780 $ilTabs->setTabActive('templates');
781
782 $gui = new ilSettingsTemplateGUI(self::getSettingsTemplateConfig());
783
784 $this->ctrl->forwardCommand($gui);
785 }

References $DIC, and ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjAssessmentFolderGUI::getAdminTabs ( )

administration tabs show only permissions and trash folder

Reimplemented from ilObjectGUI.

Definition at line 595 of file class.ilObjAssessmentFolderGUI.php.

595 : void
596 {
597 $this->getTabs();
598 }
getTabs()
@abstract overwrite in derived GUI class of your object type

References getTabs().

+ Here is the call graph for this function:

◆ getAssessmentFolder()

ilObjAssessmentFolderGUI::getAssessmentFolder ( )
private

@noinspection PhpIncompatibleReturnTypeInspection

Definition at line 45 of file class.ilObjAssessmentFolderGUI.php.

46 {
48 return $this->object;
49 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ilObjectGUI\$object.

Referenced by deleteLogObject(), getLogDataOutputForm(), logAdminObject(), and saveSettingsObject().

+ Here is the caller graph for this function:

◆ getLogDataOutputForm()

ilObjAssessmentFolderGUI::getLogDataOutputForm ( )
protected
Returns
ilPropertyFormGUI

Definition at line 411 of file class.ilObjAssessmentFolderGUI.php.

412 {
413 $form = new ilPropertyFormGUI();
414 $form->setPreventDoubleSubmission(false);
415 $form->setFormAction($this->ctrl->getFormAction($this));
416 $form->setTableWidth("100%");
417 $form->setId("logs");
418
419 $header = new ilFormSectionHeaderGUI();
420 $header->setTitle($this->lng->txt("assessment_log"));
421 $form->addItem($header);
422
423 // from
424 $from = new ilDateTimeInputGUI($this->lng->txt('cal_from'), "log_from");
425 $from->setShowTime(true);
426 $from->setRequired(true);
427 $form->addItem($from);
428
429 // until
430 $until = new ilDateTimeInputGUI($this->lng->txt('cal_until'), "log_until");
431 $until->setShowTime(true);
432 $until->setRequired(true);
433 $form->addItem($until);
434
435 $available_tests = ilObjTest::_getAvailableTests(1);
436
437 // tests
438 $fortest = new ilSelectInputGUI($this->lng->txt('assessment_log_for_test'), "sel_test");
439 $fortest->setRequired(true);
440 $sorted_options = [];
441 foreach ($available_tests as $key => $value) {
442 $sorted_options[] = [
443 'title' => ilLegacyFormElementsUtil::prepareFormOutput($value) . " [" . $this->getAssessmentFolder()->getNrOfLogEntries((int) $key) . " " . $this->lng->txt("assessment_log_log_entries") . "]",
444 'key' => $key
445 ];
446 }
447 $sorted_options = ilArrayUtil::sortArray($sorted_options, 'title', 'asc');
448 $options = ['' => $this->lng->txt('please_choose')];
449 foreach ($sorted_options as $option) {
450 $options[$option['key']] = $option['title'];
451 }
452 $fortest->setOptions($options);
453 $form->addItem($fortest);
454
455 $form->addCommandButton('showLog', $this->lng->txt('show'));
456 $form->addCommandButton('exportLog', $this->lng->txt('export'));
457
458 return $form;
459 }
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)
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...
static prepareFormOutput($a_str, bool $a_strip=false)
This class represents a property form user interface.
This class represents a selection list property in a property form.

References ILIAS\LTI\ToolProvider\$key, ilObjTest\_getAvailableTests(), ILIAS\Repository\ctrl(), getAssessmentFolder(), ILIAS\Repository\lng(), ilLegacyFormElementsUtil\prepareFormOutput(), and ilArrayUtil\sortArray().

Referenced by exportLogObject(), and showLogObject().

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

◆ getLogdataSubtabs()

ilObjAssessmentFolderGUI::getLogdataSubtabs ( )

Definition at line 600 of file class.ilObjAssessmentFolderGUI.php.

600 : void
601 {
602 global $DIC;
603 $ilTabs = $DIC['ilTabs'];
604
605 // log settings
606 $ilTabs->addSubTabTarget(
607 "settings",
608 $this->ctrl->getLinkTarget($this, "showLogSettings"),
609 ["saveLogSettings", "showLogSettings"],
610 ""
611 );
612
613 // log output
614 $ilTabs->addSubTabTarget(
615 "ass_log_output",
616 $this->ctrl->getLinkTarget($this, "logs"),
617 ["logs", "showLog", "exportLog"],
618 ""
619 );
620
621 // log administration
622 $ilTabs->addSubTabTarget(
623 "ass_log_admin",
624 $this->ctrl->getLinkTarget($this, "logAdmin"),
625 ["logAdmin", "deleteLog"],
626 "",
627 ""
628 );
629 }

References $DIC, and ILIAS\Repository\ctrl().

Referenced by getTabs().

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

◆ getSettingsTemplateConfig()

static ilObjAssessmentFolderGUI::getSettingsTemplateConfig ( )
static
Returns
ilTestSettingsTemplateConfig

Definition at line 790 of file class.ilObjAssessmentFolderGUI.php.

791 {
792 global $DIC;
793 $lng = $DIC['lng'];
794
796 $config->init();
797
798 return $config;
799 }
ilLanguage $lng
if(!array_key_exists('PATH_INFO', $_SERVER)) $config
Definition: metadata.php:85

References $config, $DIC, and ilObjectGUI\$lng.

Referenced by ilObjTestSettingsScoringResultsGUI\__construct(), ilTestSettingsGUI\__construct(), ilLOEditorGUI\applySettingsTemplate(), and ilTestTabsManager\initSettingsTemplate().

+ Here is the caller graph for this function:

◆ getTabs()

ilObjAssessmentFolderGUI::getTabs ( )
protected

@abstract overwrite in derived GUI class of your object type

Reimplemented from ilObjectGUI.

Definition at line 631 of file class.ilObjAssessmentFolderGUI.php.

631 : void
632 {
633 global $DIC;
634 $rbacsystem = $DIC['rbacsystem'];
635 $lng = $DIC['lng'];
636
637 switch ($this->ctrl->getCmd()) {
638 case "saveLogSettings":
639 case "showLogSettings":
640 case "logs":
641 case "showLog":
642 case "exportLog":
643 case "logAdmin":
644 case "deleteLog":
645 $this->getLogdataSubtabs();
646 break;
647 }
648
649 if ($rbacsystem->checkAccess("visible,read", $this->getAssessmentFolder()->getRefId())) {
650 $this->tabs_gui->addTarget(
651 "settings",
652 $this->ctrl->getLinkTarget($this, "settings"),
653 ["settings", "", "view"],
654 "",
655 ""
656 );
657
658 $this->tabs_gui->addTarget(
659 "logs",
660 $this->ctrl->getLinkTarget($this, "showLogSettings"),
661 ['saveLogSettings', 'showLogSettings', "logs", "showLog", "exportLog", "logAdmin", "deleteLog"],
662 "",
663 ""
664 );
665
666 $this->tabs_gui->addTab(
667 "templates",
668 $lng->txt("adm_settings_templates"),
669 $this->ctrl->getLinkTargetByClass("ilsettingstemplategui", "")
670 );
671
672 $this->tabs_gui->addTarget(
673 'units',
674 $this->ctrl->getLinkTargetByClass('ilGlobalUnitConfigurationGUI', ''),
675 '',
676 'ilglobalunitconfigurationgui'
677 );
678 }
679
680 if ($rbacsystem->checkAccess('edit_permission', $this->getAssessmentFolder()->getRefId())) {
681 $this->tabs_gui->addTarget(
682 "perm_settings",
683 $this->ctrl->getLinkTargetByClass([get_class($this), 'ilpermissiongui'], "perm"),
684 ["perm", "info", "owner"],
685 'ilpermissiongui'
686 );
687 }
688 }
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...

References $DIC, ilObjectGUI\$lng, ILIAS\Repository\ctrl(), getLogdataSubtabs(), and ilLanguage\txt().

Referenced by getAdminTabs().

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

◆ logAdminObject()

ilObjAssessmentFolderGUI::logAdminObject ( )

Administration output for assessment log files.

Definition at line 567 of file class.ilObjAssessmentFolderGUI.php.

567 : void
568 {
569 global $DIC;
570 $ilAccess = $DIC['ilAccess'];
571 $ilTabs = $DIC['ilTabs'];
572
573 $ilTabs->activateTab('logs');
574
575 $a_write_access = ($ilAccess->checkAccess("write", "", $this->getAssessmentFolder()->getRefId())) ? true : false;
576
577 $table_gui = new ilAssessmentFolderLogAdministrationTableGUI($this, 'logAdmin', $a_write_access);
578
579 $available_tests = ilObjTest::_getAvailableTests(false);
580 $data = [];
581 foreach ($available_tests as $ref_id => $title) {
583 $data[] = [
584 "title" => $title,
585 "nr" => $this->getAssessmentFolder()->getNrOfLogEntries((int) $obj_id),
586 "id" => $obj_id,
587 "location_href" => ilLink::_getLink($ref_id, 'tst'),
588 "location_txt" => $this->lng->txt("perma_link")
589 ];
590 }
591 $table_gui->setData($data);
592 $this->tpl->setVariable('ADM_CONTENT', $table_gui->getHTML());
593 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupObjectId(int $ref_id)

References ilObjectGUI\$data, $DIC, ilObjectGUI\$obj_id, ilObjectGUI\$ref_id, ilObjTest\_getAvailableTests(), ilLink\_getLink(), ilObject\_lookupObjectId(), getAssessmentFolder(), ilObjectGUI\getRefId(), and ILIAS\Repository\lng().

Referenced by deleteLogObject().

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

◆ saveSettingsObject()

ilObjAssessmentFolderGUI::saveSettingsObject ( )

Save Assessment settings.

Definition at line 275 of file class.ilObjAssessmentFolderGUI.php.

275 : void
276 {
277 global $DIC;
278 $ilAccess = $DIC['ilAccess'];
279 if (!$ilAccess->checkAccess("write", "", $this->getAssessmentFolder()->getRefId())) {
280 $this->ctrl->redirect($this, 'settings');
281 }
282
283 $form = $this->buildSettingsForm();
284 if (!$form->checkInput()) {
285 $form->setValuesByPost();
286 $this->settingsObject($form);
287 return;
288 }
289
290 $this->getAssessmentFolder()->setSkillTriggeringNumAnswersBarrier((int) $form->getInput('num_req_answers'));
291 $this->getAssessmentFolder()->setExportEssayQuestionsWithHtml(
292 (bool) ($form->getInput('export_essay_qst_with_html') ?? '0')
293 );
294 $this->getAssessmentFolder()->_setManualScoring($form->getInput('chb_manual_scoring') ?? []);
295 $question_types = ilObjQuestionPool::_getQuestionTypes(true);
296 $forbidden_types = [];
297 foreach ($question_types as $name => $row) {
298 if (!$form->getItemByPostVar('chb_allowed_questiontypes') ||
299 !in_array($row["question_type_id"], $form->getInput('chb_allowed_questiontypes'))) {
300 $forbidden_types[] = (int) $row["question_type_id"];
301 }
302 }
303 $this->getAssessmentFolder()->_setForbiddenQuestionTypes($forbidden_types);
304 $this->getAssessmentFolder()->setScoringAdjustmentEnabled(
305 (bool) ($form->getInput('chb_scoring_adjust') ?? '0')
306 );
307 $scoring_types = [];
308 foreach ($question_types as $name => $row) {
309 if ($form->getItemByPostVar('chb_scoring_adjustment') &&
310 in_array($row["question_type_id"], $form->getInput('chb_scoring_adjustment'))) {
311 $scoring_types[] = $row["question_type_id"];
312 }
313 }
314 $this->getAssessmentFolder()->setScoringAdjustableQuestions($scoring_types);
315 if (!$form->getInput('ass_process_lock')) {
316 $this->getAssessmentFolder()->setAssessmentProcessLockMode(ilObjAssessmentFolder::ASS_PROC_LOCK_MODE_NONE);
317 } elseif (in_array(
318 $form->getInput('ass_process_lock_mode'),
320 true
321 )) {
322 $this->getAssessmentFolder()->setAssessmentProcessLockMode($form->getInput('ass_process_lock_mode'));
323 }
324
325 $assessmentSetting = new ilSetting('assessment');
326 $assessmentSetting->set('use_javascript', '1');
327 if (strlen($form->getInput('imap_line_color') ?? '') === 6) {
328 $assessmentSetting->set('imap_line_color', ilUtil::stripSlashes($form->getInput('imap_line_color')));
329 }
330 $assessmentSetting->set('user_criteria', ilUtil::stripSlashes($form->getInput('user_criteria')));
331
332 $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
333
334 $this->ctrl->redirect($this, 'settings');
335 }
settingsObject(ilPropertyFormGUI $form=null)
static _getQuestionTypes($all_tags=false, $fixOrder=false, $withDeprecatedTypes=true)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
if($format !==null) $name
Definition: metadata.php:247

References $DIC, $name, ilObjQuestionPool\_getQuestionTypes(), ilObjAssessmentFolder\ASS_PROC_LOCK_MODE_NONE, ILIAS\Repository\ctrl(), getAssessmentFolder(), ilObjAssessmentFolder\getValidAssessmentProcessLockModes(), ILIAS\Repository\int(), ILIAS\Repository\lng(), settingsObject(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ settingsObject()

ilObjAssessmentFolderGUI::settingsObject ( ilPropertyFormGUI  $form = null)

Definition at line 100 of file class.ilObjAssessmentFolderGUI.php.

100 : void
101 {
102 global $DIC;
103 $ilTabs = $DIC['ilTabs'];
104
105 $ilTabs->setTabActive('settings');
106
107 if ($form === null) {
108 $form = $this->buildSettingsForm();
109 }
110
111 $this->tpl->setVariable("ADM_CONTENT", $form->getHTML());
112 }

References $DIC.

Referenced by saveSettingsObject().

+ Here is the caller graph for this function:

◆ showLogObject()

ilObjAssessmentFolderGUI::showLogObject ( )

Called when the a log should be shown.

Definition at line 340 of file class.ilObjAssessmentFolderGUI.php.

340 : void
341 {
342 $form = $this->getLogDataOutputForm();
343 $form->checkInput();
344
345 $form->setValuesByPost();
346 $this->logsObject($form);
347 }

References getLogDataOutputForm().

+ Here is the call graph for this function:

◆ showLogSettingsObject()

ilObjAssessmentFolderGUI::showLogSettingsObject ( ilPropertyFormGUI  $form = null)
protected
Parameters
ilPropertyFormGUI$form

Definition at line 693 of file class.ilObjAssessmentFolderGUI.php.

693 : void
694 {
695 $this->tabs_gui->activateTab('logs');
696
697 if (!($form instanceof ilPropertyFormGUI)) {
698 $form = $this->getLogSettingsForm();
699 $form->setValuesByArray([
700 'chb_assessment_logging' => ilObjAssessmentFolder::_enabledAssessmentLogging(),
701 'reporting_language' => ilObjAssessmentFolder::_getLogLanguage()
702 ]);
703 }
704
705 $this->tpl->setContent($form->getHTML());
706 }
setValuesByArray(array $a_values, bool $a_restrict_to_value_keys=false)

References ilObjAssessmentFolder\_enabledAssessmentLogging(), and ilObjAssessmentFolder\_getLogLanguage().

+ Here is the call graph for this function:

Field Documentation

◆ $testrequest

ILIAS Test InternalRequestService ilObjAssessmentFolderGUI::$testrequest
protected

Definition at line 28 of file class.ilObjAssessmentFolderGUI.php.


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