ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilObjAssessmentFolderGUI Class Reference

Class ilObjAssessmentFolderGUI. More...

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

Public Member Functions

 __construct ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor. More...
 
 saveObject ()
 save object @access public More...
 
 settingsObject (ilPropertyFormGUI $form=null)
 display assessment folder settings form More...
 
 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 ()
 
 getTabs ()
 get tabs More...
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 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 @access public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 

Static Public Member Functions

static getSettingsTemplateConfig ()
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 

Data Fields

 $conditions
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Protected Member Functions

 getLogDataOutputForm ()
 
 showLogSettingsObject (ilPropertyFormGUI $form=null)
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs @access public More...
 
 setAdminTabs ()
 set admin tabs @access public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_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 $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_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...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Private Member Functions

 forwardToSettingsTemplateGUI ()
 

Additional Inherited Members

- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $rbacsystem
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjAssessmentFolderGUI::__construct (   $a_data,
  $a_id = 0,
  $a_call_by_reference = true,
  $a_prepare_output = true 
)

Constructor.

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

27 {
28 global $rbacsystem;
29
30 $this->type = "assf";
31 parent::__construct($a_data, $a_id, $a_call_by_reference, false);
32
33 if (!$rbacsystem->checkAccess('read', $this->object->getRefId())) {
34 $this->ilias->raiseError($this->lng->txt("msg_no_perm_read_assf"), $this->ilias->error_obj->WARNING);
35 }
36
37 $this->lng->loadLanguageModule('assessment');
38 }
redirection script todo: (a better solution should control the processing via a xml file)

References ilObjectGUI\$rbacsystem.

Member Function Documentation

◆ deleteLogObject()

ilObjAssessmentFolderGUI::deleteLogObject ( )

Deletes the log entries for one or more tests.

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

524 {
525 if (is_array($_POST["chb_test"]) && (count($_POST["chb_test"]))) {
526 $this->object->deleteLogEntries($_POST["chb_test"]);
527 ilUtil::sendSuccess($this->lng->txt("ass_log_deleted"));
528 } else {
529 ilUtil::sendInfo($this->lng->txt("ass_log_delete_no_selection"));
530 }
531 $this->logAdminObject();
532 }
$_POST["username"]
logAdminObject()
Administration output for assessment log files.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.

References $_POST, logAdminObject(), ilUtil\sendInfo(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ exportLogObject()

ilObjAssessmentFolderGUI::exportLogObject ( )

Called when the a log should be exported.

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

332 {
333 $form = $this->getLogDataOutputForm();
334 if (!$form->checkInput()) {
335 $form->setValuesByPost();
336 $this->logsObject($form);
337 return;
338 }
339
340 $test = $form->getInput('sel_test');
341 $from = $form->getItemByPostVar('log_from')->getDate()->get(IL_CAL_UNIX);
342 $until = $form->getItemByPostVar('log_until')->getDate()->get(IL_CAL_UNIX);
343
344 $csv = array();
345 $separator = ";";
346 $row = array(
347 $this->lng->txt("assessment_log_datetime"),
348 $this->lng->txt("user"),
349 $this->lng->txt("assessment_log_text"),
350 $this->lng->txt("question")
351 );
352 include_once "./Modules/Test/classes/class.ilObjTest.php";
353 include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
354 $available_tests =&ilObjTest::_getAvailableTests(1);
355 array_push($csv, ilUtil::processCSVRow($row, true, $separator));
356 $log_output = ilObjAssessmentFolder::getLog($from, $until, $test);
357 $users = array();
358 foreach ($log_output as $key => $log) {
359 if (!array_key_exists($log["user_fi"], $users)) {
360 $users[$log["user_fi"]] = ilObjUser::_lookupName($log["user_fi"]);
361 }
362 $title = "";
363 if ($log["question_fi"] || $log["original_fi"]) {
365 if (strlen($title) == 0) {
367 }
368 $title = $this->lng->txt("assessment_log_question") . ": " . $title;
369 }
370 $csvrow = array();
371 $date = new ilDateTime($log['tstamp'], IL_CAL_UNIX);
372 array_push($csvrow, $date->get(IL_CAL_FKT_DATE, 'Y-m-d H:i'));
373 array_push($csvrow, trim($users[$log["user_fi"]]["title"] . " " . $users[$log["user_fi"]]["firstname"] . " " . $users[$log["user_fi"]]["lastname"]));
374 array_push($csvrow, trim($log["logtext"]));
375 array_push($csvrow, $title);
376 array_push($csv, ilUtil::processCSVRow($csvrow, true, $separator));
377 }
378 $csvoutput = "";
379 foreach ($csv as $row) {
380 $csvoutput .= join($row, $separator) . "\n";
381 }
382 ilUtil::deliverData($csvoutput, str_replace(" ", "_", "log_" . $from . "_" . $until . "_" . $available_tests[$test]) . ".csv");
383 }
$test
Definition: Utf8Test.php:84
$users
Definition: authpage.php:44
const IL_CAL_UNIX
const IL_CAL_FKT_DATE
static _getQuestionTitle($question_id)
Returns the question title of a question with a given id.
@classDescription Date and time handling
static getLog($ts_from, $ts_to, $test_id, $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($a_user_id)
lookup user name
static deliverData($a_data, $a_filename, $mime="application/octet-stream", $charset="")
deliver data for download via browser.
static & processCSVRow(&$row, $quoteAll=false, $separator=";", $outUTF8=false, $compatibleWithMSExcel=true)
Convertes an array for CSV usage.
$key
Definition: croninfo.php:18
if(isset($_POST['submit'])) $form
$from

References $form, $from, $key, $log, $row, $test, $title, $users, ilObjTest\_getAvailableTests(), assQuestion\_getQuestionTitle(), ilObjUser\_lookupName(), ilUtil\deliverData(), ilObjAssessmentFolder\getLog(), getLogDataOutputForm(), IL_CAL_FKT_DATE, IL_CAL_UNIX, and ilUtil\processCSVRow().

+ Here is the call graph for this function:

◆ forwardToSettingsTemplateGUI()

ilObjAssessmentFolderGUI::forwardToSettingsTemplateGUI ( )
private

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

741 {
742 global $ilTabs;
743
744 $ilTabs->setTabActive('templates');
745
746 require_once 'Services/Administration/classes/class.ilSettingsTemplateGUI.php';
747 $gui = new ilSettingsTemplateGUI(self::getSettingsTemplateConfig());
748
749 $this->ctrl->forwardCommand($gui);
750 }

◆ getAdminTabs()

ilObjAssessmentFolderGUI::getAdminTabs ( )

administration tabs show only permissions and trash folder

Reimplemented from ilObjectGUI.

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

566 {
567 $this->getTabs();
568 }

References getTabs().

+ Here is the call graph for this function:

◆ getLogDataOutputForm()

ilObjAssessmentFolderGUI::getLogDataOutputForm ( )
protected
Returns
ilPropertyFormGUI

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

389 {
390 require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
391 $form = new ilPropertyFormGUI();
392 $form->setPreventDoubleSubmission(false);
393 $form->setFormAction($this->ctrl->getFormAction($this));
394 $form->setTableWidth("100%");
395 $form->setId("logs");
396
398 $header->setTitle($this->lng->txt("assessment_log"));
399 $form->addItem($header);
400
401 // from
402 $from = new ilDateTimeInputGUI($this->lng->txt('cal_from'), "log_from");
403 $from->setShowTime(true);
404 $from->setRequired(true);
405 $form->addItem($from);
406
407 // until
408 $until = new ilDateTimeInputGUI($this->lng->txt('cal_until'), "log_until");
409 $until->setShowTime(true);
410 $until->setRequired(true);
411 $form->addItem($until);
412
413 require_once 'Modules/Test/classes/class.ilObjTest.php';
414 require_once 'Modules/TestQuestionPool/classes/class.assQuestion.php';
415 $available_tests = ilObjTest::_getAvailableTests(1);
416
417 // tests
418 $fortest = new ilSelectInputGUI($this->lng->txt('assessment_log_for_test'), "sel_test");
419 $fortest->setRequired(true);
420 $sorted_options = array();
421 foreach ($available_tests as $key => $value) {
422 $sorted_options[] = array(
423 'title' => ilUtil::prepareFormOutput($value) . " [" . $this->object->getNrOfLogEntries($key) . " " . $this->lng->txt("assessment_log_log_entries") . "]",
424 'key' => $key
425 );
426 }
427 $sorted_options = ilUtil::sortArray($sorted_options, 'title', 'asc');
428 $options = array('' => $this->lng->txt('please_choose'));
429 foreach ($sorted_options as $option) {
430 $options[$option['key']] = $option['title'];
431 }
432 $fortest->setOptions($options);
433 $form->addItem($fortest);
434
435 $form->addCommandButton('showLog', $this->lng->txt('show'));
436 $form->addCommandButton('exportLog', $this->lng->txt('export'));
437
438 return $form;
439 }
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
Definition: as_login.php:20
This class represents a date/time property in a property form.
This class represents a section header in a property form.
This class represents a property form user interface.
This class represents a selection list property in a property form.
static sortArray( $array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public

References $form, $from, $header, $key, $options, ilObjTest\_getAvailableTests(), ilUtil\prepareFormOutput(), and ilUtil\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 570 of file class.ilObjAssessmentFolderGUI.php.

571 {
572 global $ilTabs;
573
574 // log settings
575 $ilTabs->addSubTabTarget(
576 "settings",
577 $this->ctrl->getLinkTarget($this, "showLogSettings"),
578 array("saveLogSettings", "showLogSettings"),
579 ""
580 );
581
582 // log output
583 $ilTabs->addSubTabTarget(
584 "ass_log_output",
585 $this->ctrl->getLinkTarget($this, "logs"),
586 array("logs", "showLog", "exportLog"),
587 ""
588 );
589
590 // log administration
591 $ilTabs->addSubTabTarget(
592 "ass_log_admin",
593 $this->ctrl->getLinkTarget($this, "logAdmin"),
594 array("logAdmin", "deleteLog"),
595 "",
596 ""
597 );
598 }

Referenced by getTabs().

+ Here is the caller graph for this function:

◆ getSettingsTemplateConfig()

static ilObjAssessmentFolderGUI::getSettingsTemplateConfig ( )
static
Returns
ilTestSettingsTemplateConfig

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

756 {
757 global $lng;
758
759 require_once 'Modules/Test/classes/class.ilTestSettingsTemplateConfig.php';
761 $config->init();
762
763 return $config;
764 }

References $config, and ilObjectGUI\$lng.

Referenced by ilObjTestSettingsScoringResultsGUI\__construct(), ilTestSettingsGUI\__construct(), ilObjTestGUI\afterSave(), ilLOEditorGUI\applySettingsTemplate(), ilObjTestGUI\getQuestionsSubTabs(), and ilObjTestGUI\getTabs().

+ Here is the caller graph for this function:

◆ getTabs()

ilObjAssessmentFolderGUI::getTabs ( )

get tabs

Parameters
objecttabs gui object

Reimplemented from ilObjectGUI.

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

606 {
607 global $rbacsystem, $lng;
608
609 switch ($this->ctrl->getCmd()) {
610 case "saveLogSettings":
611 case "showLogSettings":
612 case "logs":
613 case "showLog":
614 case "exportLog":
615 case "logAdmin":
616 case "deleteLog":
617 $this->getLogdataSubtabs();
618 break;
619 }
620
621 if ($rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
622 $this->tabs_gui->addTarget(
623 "settings",
624 $this->ctrl->getLinkTarget($this, "settings"),
625 array("settings","","view"),
626 "",
627 ""
628 );
629
630 $this->tabs_gui->addTarget(
631 "logs",
632 $this->ctrl->getLinkTarget($this, "showLogSettings"),
633 array('saveLogSettings', 'showLogSettings', "logs","showLog", "exportLog", "logAdmin", "deleteLog"),
634 "",
635 ""
636 );
637
638 $this->tabs_gui->addTab(
639 "templates",
640 $lng->txt("adm_settings_templates"),
641 $this->ctrl->getLinkTargetByClass("ilsettingstemplategui", "")
642 );
643 }
644
645 if ($rbacsystem->checkAccess("write", $this->object->getRefId())) {
646 $this->tabs_gui->addTarget('units', $this->ctrl->getLinkTargetByClass('ilGlobalUnitConfigurationGUI', ''), '', 'ilglobalunitconfigurationgui');
647 }
648
649 if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
650 $this->tabs_gui->addTarget(
651 "perm_settings",
652 $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"),
653 array("perm","info","owner"),
654 'ilpermissiongui'
655 );
656 }
657 }

References ilObjectGUI\$lng, ilObjectGUI\$rbacsystem, and getLogdataSubtabs().

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 537 of file class.ilObjAssessmentFolderGUI.php.

538 {
539 global $ilAccess, $ilTabs;
540
541 $ilTabs->activateTab('logs');
542
543 $a_write_access = ($ilAccess->checkAccess("write", "", $this->object->getRefId())) ? true : false;
544
545 include_once "./Modules/Test/classes/tables/class.ilAssessmentFolderLogAdministrationTableGUI.php";
546 $table_gui = new ilAssessmentFolderLogAdministrationTableGUI($this, 'logAdmin', $a_write_access);
547 include_once "./Modules/Test/classes/class.ilObjTest.php";
548 require_once "./Services/Link/classes/class.ilLink.php";
549 $available_tests = ilObjTest::_getAvailableTests(false);
550 $data = array();
551 foreach ($available_tests as $ref_id => $title) {
553 array_push($data, array(
554 "title" => $title,
555 "nr" => $this->object->getNrOfLogEntries($obj_id),
556 "id" => $obj_id,
557 "location_href" => ilLink::_getLink($ref_id, 'tst'),
558 "location_txt" => $this->lng->txt("perma_link")
559 ));
560 }
561 $table_gui->setData($data);
562 $this->tpl->setVariable('ADM_CONTENT', $table_gui->getHTML());
563 }
static _lookupObjectId($a_ref_id)
lookup object id

References ilObjectGUI\$data, ilObjectGUI\$obj_id, ilObjectGUI\$ref_id, $title, ilObjTest\_getAvailableTests(), ilLink\_getLink(), and ilObject\_lookupObjectId().

Referenced by deleteLogObject().

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

◆ saveObject()

ilObjAssessmentFolderGUI::saveObject ( )

save object @access public

Reimplemented from ilObjectGUI.

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

97 {
98 global $rbacadmin;
99
100 // create and insert forum in objecttree
101 $newObj = parent::saveObject();
102
103 // put here object specific stuff
104
105 // always send a message
106 ilUtil::sendSuccess($this->lng->txt("object_added"), true);
107
108 $this->ctrl->redirect($this);
109 }

References ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ saveSettingsObject()

ilObjAssessmentFolderGUI::saveSettingsObject ( )

Save Assessment settings.

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

264 {
265 global $ilAccess;
266 if (!$ilAccess->checkAccess("write", "", $this->object->getRefId())) {
267 $this->ctrl->redirect($this, 'settings');
268 }
269
270 $form = $this->buildSettingsForm();
271 if (!$form->checkInput()) {
272 $form->setValuesByPost();
273 return $this->settingsObject($form);
274 }
275
276 $this->object->setSkillTriggeringNumAnswersBarrier((int) $_POST['num_req_answers']);
277 $this->object->setExportEssayQuestionsWithHtml((int) $_POST["export_essay_qst_with_html"] == 1);
278 $this->object->_setManualScoring($_POST["chb_manual_scoring"]);
279 include_once "./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php";
280 $questiontypes =&ilObjQuestionPool::_getQuestionTypes(true);
281 $forbidden_types = array();
282 foreach ($questiontypes as $name => $row) {
283 if (!in_array($row["question_type_id"], $_POST["chb_allowed_questiontypes"])) {
284 array_push($forbidden_types, $row["question_type_id"]);
285 }
286 }
287 $this->object->_setForbiddenQuestionTypes($forbidden_types);
288
289 $this->object->setScoringAdjustmentEnabled($_POST['chb_scoring_adjust']);
290 $scoring_types = array();
291 foreach ($questiontypes as $name => $row) {
292 if (in_array($row["question_type_id"], (array) $_POST["chb_scoring_adjustment"])) {
293 array_push($scoring_types, $row["question_type_id"]);
294 }
295 }
296 $this->object->setScoringAdjustableQuestions($scoring_types);
297
298 if (!$_POST['ass_process_lock']) {
299 $this->object->setAssessmentProcessLockMode(ilObjAssessmentFolder::ASS_PROC_LOCK_MODE_NONE);
300 } elseif (in_array($_POST['ass_process_lock_mode'], ilObjAssessmentFolder::getValidAssessmentProcessLockModes())) {
301 $this->object->setAssessmentProcessLockMode($_POST['ass_process_lock_mode']);
302 }
303
304 $assessmentSetting = new ilSetting('assessment');
305 $assessmentSetting->set('use_javascript', '1');
306 if (strlen($_POST['imap_line_color']) == 6) {
307 $assessmentSetting->set('imap_line_color', ilUtil::stripSlashes($_POST['imap_line_color']));
308 }
309 $assessmentSetting->set('user_criteria', ilUtil::stripSlashes($_POST['user_criteria']));
310
311 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
312
313 $this->ctrl->redirect($this, 'settings');
314 }
settingsObject(ilPropertyFormGUI $form=null)
display assessment folder settings form
static _getQuestionTypes($all_tags=false, $fixOrder=false)
ILIAS Setting Class.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
if($format !==null) $name
Definition: metadata.php:146

References $_POST, $form, $name, $row, ilObjQuestionPool\_getQuestionTypes(), ilObjAssessmentFolder\ASS_PROC_LOCK_MODE_NONE, ilObjAssessmentFolder\getValidAssessmentProcessLockModes(), ilUtil\sendSuccess(), settingsObject(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ settingsObject()

ilObjAssessmentFolderGUI::settingsObject ( ilPropertyFormGUI  $form = null)

display assessment folder settings form

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

116 {
117 global $ilTabs;
118
119 $ilTabs->setTabActive('settings');
120
121 if ($form === null) {
122 $form = $this->buildSettingsForm();
123 }
124
125 $this->tpl->setVariable("ADM_CONTENT", $form->getHTML());
126 }

References $form.

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 319 of file class.ilObjAssessmentFolderGUI.php.

320 {
321 $form = $this->getLogDataOutputForm();
322 $form->checkInput();
323
324 $form->setValuesByPost();
325 $this->logsObject($form);
326 }

References $form, and getLogDataOutputForm().

+ Here is the call graph for this function:

◆ showLogSettingsObject()

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

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

663 {
664 $this->tabs_gui->activateTab('logs');
665
666 if (!($form instanceof ilPropertyFormGUI)) {
667 $form = $this->getLogSettingsForm();
668 $form->setValuesByArray(array(
669 'chb_assessment_logging' => ilObjAssessmentFolder::_enabledAssessmentLogging(),
670 'reporting_language' => ilObjAssessmentFolder::_getLogLanguage()
671 ));
672 }
673
674 $this->tpl->setContent($form->getHTML());
675 }
static _getLogLanguage()
retrieve the log language for assessment logging
static _enabledAssessmentLogging()
check wether assessment logging is enabled or not

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

+ Here is the call graph for this function:

Field Documentation

◆ $conditions

ilObjAssessmentFolderGUI::$conditions

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


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