ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 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 ()
 
 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 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...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. 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
 getObjectService ()
 Get object service. More...
 
 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 public More...
 
 setAdminTabs ()
 set admin tabs 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
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 

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.

References $DIC, $ret, ilObjectGUI\executeCommand(), forwardToSettingsTemplateGUI(), and ilObjectGUI\prepareOutput().

27  {
28  global $DIC;
29  $rbacsystem = $DIC['rbacsystem'];
30 
31  $this->type = "assf";
32  parent::__construct($a_data, $a_id, $a_call_by_reference, false);
33 
34  if (!$rbacsystem->checkAccess('read', $this->object->getRefId())) {
35  $this->ilias->raiseError($this->lng->txt("msg_no_perm_read_assf"), $this->ilias->error_obj->WARNING);
36  }
37 
38  $this->lng->loadLanguageModule('assessment');
39  }
global $DIC
Definition: saml.php:7
redirection script todo: (a better solution should control the processing via a xml file) ...
+ 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 531 of file class.ilObjAssessmentFolderGUI.php.

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

532  {
533  if (is_array($_POST["chb_test"]) && (count($_POST["chb_test"]))) {
534  $this->object->deleteLogEntries($_POST["chb_test"]);
535  ilUtil::sendSuccess($this->lng->txt("ass_log_deleted"));
536  } else {
537  ilUtil::sendInfo($this->lng->txt("ass_log_delete_no_selection"));
538  }
539  $this->logAdminObject();
540  }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
logAdminObject()
Administration output for assessment log files.
$_POST["username"]
+ Here is the call graph for this function:

◆ exportLogObject()

ilObjAssessmentFolderGUI::exportLogObject ( )

Called when the a log should be exported.

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

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().

339  {
340  $form = $this->getLogDataOutputForm();
341  if (!$form->checkInput()) {
342  $form->setValuesByPost();
343  $this->logsObject($form);
344  return;
345  }
346 
347  $test = $form->getInput('sel_test');
348  $from = $form->getItemByPostVar('log_from')->getDate()->get(IL_CAL_UNIX);
349  $until = $form->getItemByPostVar('log_until')->getDate()->get(IL_CAL_UNIX);
350 
351  $csv = array();
352  $separator = ";";
353  $row = array(
354  $this->lng->txt("assessment_log_datetime"),
355  $this->lng->txt("user"),
356  $this->lng->txt("assessment_log_text"),
357  $this->lng->txt("question")
358  );
359  include_once "./Modules/Test/classes/class.ilObjTest.php";
360  include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
361  $available_tests = &ilObjTest::_getAvailableTests(1);
362  array_push($csv, ilUtil::processCSVRow($row, true, $separator));
363  $log_output = ilObjAssessmentFolder::getLog($from, $until, $test);
364  $users = array();
365  foreach ($log_output as $key => $log) {
366  if (!array_key_exists($log["user_fi"], $users)) {
367  $users[$log["user_fi"]] = ilObjUser::_lookupName($log["user_fi"]);
368  }
369  $title = "";
370  if ($log["question_fi"] || $log["original_fi"]) {
371  $title = assQuestion::_getQuestionTitle($log["question_fi"]);
372  if (strlen($title) == 0) {
373  $title = assQuestion::_getQuestionTitle($log["original_fi"]);
374  }
375  $title = $this->lng->txt("assessment_log_question") . ": " . $title;
376  }
377  $csvrow = array();
378  $date = new ilDateTime($log['tstamp'], IL_CAL_UNIX);
379  array_push($csvrow, $date->get(IL_CAL_FKT_DATE, 'Y-m-d H:i'));
380  array_push($csvrow, trim($users[$log["user_fi"]]["title"] . " " . $users[$log["user_fi"]]["firstname"] . " " . $users[$log["user_fi"]]["lastname"]));
381  array_push($csvrow, trim($log["logtext"]));
382  array_push($csvrow, $title);
383  array_push($csv, ilUtil::processCSVRow($csvrow, true, $separator));
384  }
385  $csvoutput = "";
386  foreach ($csv as $row) {
387  $csvoutput .= join($separator, $row) . "\n";
388  }
389  ilUtil::deliverData($csvoutput, str_replace(" ", "_", "log_" . $from . "_" . $until . "_" . $available_tests[$test]) . ".csv");
390  }
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 getLog($ts_from, $ts_to, $test_id, $test_only=false)
Retrieve assessment log datasets from the database.
$from
$log
Definition: sabredav.php:21
const IL_CAL_UNIX
static & processCSVRow(&$row, $quoteAll=false, $separator=";", $outUTF8=false, $compatibleWithMSExcel=true)
Convertes an array for CSV usage.
if(isset($_POST['submit'])) $form
const IL_CAL_FKT_DATE
Date and time handling
$users
Definition: authpage.php:44
$row
static _getAvailableTests($use_object_id=false)
Returns the available tests for the active user.
$key
Definition: croninfo.php:18
static _getQuestionTitle($question_id)
Returns the question title of a question with a given id.
$test
Definition: Utf8Test.php:84
+ Here is the call graph for this function:

◆ forwardToSettingsTemplateGUI()

ilObjAssessmentFolderGUI::forwardToSettingsTemplateGUI ( )
private

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

References $DIC.

Referenced by __construct().

756  {
757  global $DIC;
758  $ilTabs = $DIC['ilTabs'];
759 
760  $ilTabs->setTabActive('templates');
761 
762  require_once 'Services/Administration/classes/class.ilSettingsTemplateGUI.php';
763  $gui = new ilSettingsTemplateGUI(self::getSettingsTemplateConfig());
764 
765  $this->ctrl->forwardCommand($gui);
766  }
global $DIC
Definition: saml.php:7
+ Here is the caller graph for this function:

◆ getAdminTabs()

ilObjAssessmentFolderGUI::getAdminTabs ( )

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

References getTabs().

576  {
577  $this->getTabs();
578  }
+ Here is the call graph for this function:

◆ getLogDataOutputForm()

ilObjAssessmentFolderGUI::getLogDataOutputForm ( )
protected
Returns
ilPropertyFormGUI

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

References $_GET, $DIC, $form, $from, $header, $key, PHPMailer\PHPMailer\$options, $row, $template, $values, ilObjTest\_getAvailableTests(), ilLink\_getLink(), ilObjAssessmentFolder\getLog(), IL_CAL_UNIX, ilUtil\prepareFormOutput(), ilFormPropertyGUI\setRequired(), ilDateTimeInputGUI\setShowTime(), and ilUtil\sortArray().

Referenced by exportLogObject(), and showLogObject().

396  {
397  require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
398  $form = new ilPropertyFormGUI();
399  $form->setPreventDoubleSubmission(false);
400  $form->setFormAction($this->ctrl->getFormAction($this));
401  $form->setTableWidth("100%");
402  $form->setId("logs");
403 
405  $header->setTitle($this->lng->txt("assessment_log"));
406  $form->addItem($header);
407 
408  // from
409  $from = new ilDateTimeInputGUI($this->lng->txt('cal_from'), "log_from");
410  $from->setShowTime(true);
411  $from->setRequired(true);
412  $form->addItem($from);
413 
414  // until
415  $until = new ilDateTimeInputGUI($this->lng->txt('cal_until'), "log_until");
416  $until->setShowTime(true);
417  $until->setRequired(true);
418  $form->addItem($until);
419 
420  require_once 'Modules/Test/classes/class.ilObjTest.php';
421  require_once 'Modules/TestQuestionPool/classes/class.assQuestion.php';
422  $available_tests = ilObjTest::_getAvailableTests(1);
423 
424  // tests
425  $fortest = new ilSelectInputGUI($this->lng->txt('assessment_log_for_test'), "sel_test");
426  $fortest->setRequired(true);
427  $sorted_options = array();
428  foreach ($available_tests as $key => $value) {
429  $sorted_options[] = array(
430  'title' => ilUtil::prepareFormOutput($value) . " [" . $this->object->getNrOfLogEntries($key) . " " . $this->lng->txt("assessment_log_log_entries") . "]",
431  'key' => $key
432  );
433  }
434  $sorted_options = ilUtil::sortArray($sorted_options, 'title', 'asc');
435  $options = array('' => $this->lng->txt('please_choose'));
436  foreach ($sorted_options as $option) {
437  $options[$option['key']] = $option['title'];
438  }
439  $fortest->setOptions($options);
440  $form->addItem($fortest);
441 
442  $form->addCommandButton('showLog', $this->lng->txt('show'));
443  $form->addCommandButton('exportLog', $this->lng->txt('export'));
444 
445  return $form;
446  }
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 public
This class represents a selection list property in a property form.
This class represents a property form user interface.
This class represents a section header in a property form.
$from
This class represents a date/time property in a property form.
if(isset($_POST['submit'])) $form
static _getAvailableTests($use_object_id=false)
Returns the available tests for the active user.
$key
Definition: croninfo.php:18
setRequired($a_required)
Set Required.
setShowTime($a_showtime)
Set Show Time Information.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLogdataSubtabs()

ilObjAssessmentFolderGUI::getLogdataSubtabs ( )

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

References $DIC.

Referenced by getTabs().

581  {
582  global $DIC;
583  $ilTabs = $DIC['ilTabs'];
584 
585  // log settings
586  $ilTabs->addSubTabTarget(
587  "settings",
588  $this->ctrl->getLinkTarget($this, "showLogSettings"),
589  array("saveLogSettings", "showLogSettings"),
590  ""
591  );
592 
593  // log output
594  $ilTabs->addSubTabTarget(
595  "ass_log_output",
596  $this->ctrl->getLinkTarget($this, "logs"),
597  array("logs", "showLog", "exportLog"),
598  ""
599  );
600 
601  // log administration
602  $ilTabs->addSubTabTarget(
603  "ass_log_admin",
604  $this->ctrl->getLinkTarget($this, "logAdmin"),
605  array("logAdmin", "deleteLog"),
606  "",
607  ""
608  );
609  }
global $DIC
Definition: saml.php:7
+ Here is the caller graph for this function:

◆ getSettingsTemplateConfig()

static ilObjAssessmentFolderGUI::getSettingsTemplateConfig ( )
static
Returns
ilTestSettingsTemplateConfig

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

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

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

772  {
773  global $DIC;
774  $lng = $DIC['lng'];
775 
776  require_once 'Modules/Test/classes/class.ilTestSettingsTemplateConfig.php';
778  $config->init();
779 
780  return $config;
781  }
$config
Definition: bootstrap.php:15
global $DIC
Definition: saml.php:7
+ Here is the caller graph for this function:

◆ getTabs()

ilObjAssessmentFolderGUI::getTabs ( )

get tabs

Parameters
objecttabs gui object

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

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

Referenced by getAdminTabs().

617  {
618  global $DIC;
619  $rbacsystem = $DIC['rbacsystem'];
620  $lng = $DIC['lng'];
621 
622  switch ($this->ctrl->getCmd()) {
623  case "saveLogSettings":
624  case "showLogSettings":
625  case "logs":
626  case "showLog":
627  case "exportLog":
628  case "logAdmin":
629  case "deleteLog":
630  $this->getLogdataSubtabs();
631  break;
632  }
633 
634  if ($rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
635  $this->tabs_gui->addTarget(
636  "settings",
637  $this->ctrl->getLinkTarget($this, "settings"),
638  array("settings","","view"),
639  "",
640  ""
641  );
642 
643  $this->tabs_gui->addTarget(
644  "logs",
645  $this->ctrl->getLinkTarget($this, "showLogSettings"),
646  array('saveLogSettings', 'showLogSettings', "logs","showLog", "exportLog", "logAdmin", "deleteLog"),
647  "",
648  ""
649  );
650 
651  $this->tabs_gui->addTab(
652  "templates",
653  $lng->txt("adm_settings_templates"),
654  $this->ctrl->getLinkTargetByClass("ilsettingstemplategui", "")
655  );
656  }
657 
658  if ($rbacsystem->checkAccess("write", $this->object->getRefId())) {
659  $this->tabs_gui->addTarget('units', $this->ctrl->getLinkTargetByClass('ilGlobalUnitConfigurationGUI', ''), '', 'ilglobalunitconfigurationgui');
660  }
661 
662  if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
663  $this->tabs_gui->addTarget(
664  "perm_settings",
665  $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"),
666  array("perm","info","owner"),
667  'ilpermissiongui'
668  );
669  }
670  }
global $DIC
Definition: saml.php:7
+ 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 545 of file class.ilObjAssessmentFolderGUI.php.

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

Referenced by deleteLogObject().

546  {
547  global $DIC;
548  $ilAccess = $DIC['ilAccess'];
549  $ilTabs = $DIC['ilTabs'];
550 
551  $ilTabs->activateTab('logs');
552 
553  $a_write_access = ($ilAccess->checkAccess("write", "", $this->object->getRefId())) ? true : false;
554 
555  include_once "./Modules/Test/classes/tables/class.ilAssessmentFolderLogAdministrationTableGUI.php";
556  $table_gui = new ilAssessmentFolderLogAdministrationTableGUI($this, 'logAdmin', $a_write_access);
557  include_once "./Modules/Test/classes/class.ilObjTest.php";
558  require_once "./Services/Link/classes/class.ilLink.php";
559  $available_tests = ilObjTest::_getAvailableTests(false);
560  $data = array();
561  foreach ($available_tests as $ref_id => $title) {
563  array_push($data, array(
564  "title" => $title,
565  "nr" => $this->object->getNrOfLogEntries($obj_id),
566  "id" => $obj_id,
567  "location_href" => ilLink::_getLink($ref_id, 'tst'),
568  "location_txt" => $this->lng->txt("perma_link")
569  ));
570  }
571  $table_gui->setData($data);
572  $this->tpl->setVariable('ADM_CONTENT', $table_gui->getHTML());
573  }
global $DIC
Definition: saml.php:7
static _lookupObjectId($a_ref_id)
lookup object id
static _getAvailableTests($use_object_id=false)
Returns the available tests for the active user.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveObject()

ilObjAssessmentFolderGUI::saveObject ( )

save object public

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

References $DIC.

100  {
101  global $DIC;
102  $rbacadmin = $DIC['rbacadmin'];
103 
104  // create and insert forum in objecttree
105  $newObj = parent::saveObject();
106 
107  // put here object specific stuff
108 
109  // always send a message
110  ilUtil::sendSuccess($this->lng->txt("object_added"), true);
111 
112  $this->ctrl->redirect($this);
113  }
global $DIC
Definition: saml.php:7

◆ saveSettingsObject()

ilObjAssessmentFolderGUI::saveSettingsObject ( )

Save Assessment settings.

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

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

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

◆ settingsObject()

ilObjAssessmentFolderGUI::settingsObject ( ilPropertyFormGUI  $form = null)

display assessment folder settings form

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

References $_GET, $DIC, $form, $header, ilObjAssessmentFolder\_getForbiddenQuestionTypes(), ilObjAssessmentFolder\_getManualScoring(), ilObjQuestionPool\_getQuestionTypes(), ilObjAssessmentFolder\ASS_PROC_LOCK_MODE_DB, ilObjAssessmentFolder\ASS_PROC_LOCK_MODE_FILE, ilObjAssessmentFolder\ASS_PROC_LOCK_MODE_NONE, ilCheckboxInputGUI\setChecked(), ilRadioOption\setInfo(), ilFormPropertyGUI\setInfo(), ilFormPropertyGUI\setRequired(), ilColorPickerInputGUI\setValue(), and ilCheckboxGroupInputGUI\setValue().

Referenced by saveSettingsObject().

120  {
121  global $DIC;
122  $ilTabs = $DIC['ilTabs'];
123 
124  $ilTabs->setTabActive('settings');
125 
126  if ($form === null) {
127  $form = $this->buildSettingsForm();
128  }
129 
130  $this->tpl->setVariable("ADM_CONTENT", $form->getHTML());
131  }
global $DIC
Definition: saml.php:7
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showLogObject()

ilObjAssessmentFolderGUI::showLogObject ( )

Called when the a log should be shown.

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

References $form, and getLogDataOutputForm().

327  {
328  $form = $this->getLogDataOutputForm();
329  $form->checkInput();
330 
331  $form->setValuesByPost();
332  $this->logsObject($form);
333  }
if(isset($_POST['submit'])) $form
+ Here is the call graph for this function:

◆ showLogSettingsObject()

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

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

References $DIC, $form, $lang, $languages, PHPMailer\PHPMailer\$options, ilObjAssessmentFolder\_enabledAssessmentLogging(), and ilObjAssessmentFolder\_getLogLanguage().

676  {
677  $this->tabs_gui->activateTab('logs');
678 
679  if (!($form instanceof ilPropertyFormGUI)) {
680  $form = $this->getLogSettingsForm();
681  $form->setValuesByArray(array(
682  'chb_assessment_logging' => ilObjAssessmentFolder::_enabledAssessmentLogging(),
683  'reporting_language' => ilObjAssessmentFolder::_getLogLanguage()
684  ));
685  }
686 
687  $this->tpl->setContent($form->getHTML());
688  }
This class represents a property form user interface.
static _getLogLanguage()
retrieve the log language for assessment logging
static _enabledAssessmentLogging()
check wether assessment logging is enabled or not
setValuesByArray($a_values, $a_restrict_to_value_keys=false)
Set form values from an array.
+ 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: