ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
ilObjAssessmentFolderGUI Class Reference

Class ilObjAssessmentFolderGUI. More...

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

Public Member Functions

 ilObjAssessmentFolderGUI ($a_data, $a_id, $a_call_by_reference)
 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...
 
 logsObject ($p_from=null, $p_until=null, $p_test=null)
 display assessment folder logs form More...
 
 deleteLogObject ()
 Deletes the log entries for one or more tests. More...
 
 logAdminObject ()
 Administration output for assessment log files. More...
 
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder More...
 
 getLogdataSubtabs ()
 
 getTabs (&$tabs_gui)
 get tabs More...
 
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor @access public. More...
 
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...
 
 getAdminTabs (&$tabs_gui)
 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 ($in_rep=false)
 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...
 
 editObject ()
 edit object More...
 
 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
 
 $ilias
 
 $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

 showLogSettingsObject (ilPropertyFormGUI $form=null)
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 prepareOutput ()
 prepare output More...
 
 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...
 
 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...
 
 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)
 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...
 
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste More...
 
 getTabs (&$tabs_gui)
 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 ($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 ()
 

Detailed Description

Member Function Documentation

◆ deleteLogObject()

ilObjAssessmentFolderGUI::deleteLogObject ( )

Deletes the log entries for one or more tests.

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

464 {
465 if (is_array($_POST["chb_test"]) && (count($_POST["chb_test"])))
466 {
467 $this->object->deleteLogEntries($_POST["chb_test"]);
468 ilUtil::sendSuccess($this->lng->txt("ass_log_deleted"));
469 }
470 else
471 {
472 ilUtil::sendInfo($this->lng->txt("ass_log_delete_no_selection"));
473 }
474 $this->logAdminObject();
475 }
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.
$_POST['username']
Definition: cron.php:12

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

327 {
328 $from = mktime($_POST['log_from']['time']['h'], $_POST['log_from']['time']['m'], 0, $_POST['log_from']['date']['m'], $_POST['log_from']['date']['d'], $_POST['log_from']['date']['y']);
329 $until = mktime($_POST['log_until']['time']['h'], $_POST['log_until']['time']['m'], 0, $_POST['log_until']['date']['m'], $_POST['log_until']['date']['d'], $_POST['log_until']['date']['y']);
330 $test = $_POST['sel_test'];
331
332 $csv = array();
333 $separator = ";";
334 $row = array(
335 $this->lng->txt("assessment_log_datetime"),
336 $this->lng->txt("user"),
337 $this->lng->txt("assessment_log_text"),
338 $this->lng->txt("question")
339 );
340 include_once "./Modules/Test/classes/class.ilObjTest.php";
341 include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
342 $available_tests =& ilObjTest::_getAvailableTests(1);
343 array_push($csv, ilUtil::processCSVRow($row, TRUE, $separator));
344 $log_output =& $this->object->getLog($from, $until, $test);
345 $users = array();
346 foreach ($log_output as $key => $log)
347 {
348 if (!array_key_exists($log["user_fi"], $users))
349 {
350 $users[$log["user_fi"]] = ilObjUser::_lookupName($log["user_fi"]);
351 }
352 $title = "";
353 if ($log["question_fi"] || $log["original_fi"])
354 {
355 $title = assQuestion::_getQuestionTitle($log["question_fi"]);
356 if (strlen($title) == 0)
357 {
358 $title = assQuestion::_getQuestionTitle($log["original_fi"]);
359 }
360 $title = $this->lng->txt("assessment_log_question") . ": " . $title;
361 }
362 $csvrow = array();
363 $date = new ilDateTime($log['tstamp'],IL_CAL_UNIX);
364 array_push($csvrow, $date->get(IL_CAL_FKT_DATE,'Y-m-d H:i'));
365 array_push($csvrow, trim($users[$log["user_fi"]]["title"] . " " . $users[$log["user_fi"]]["firstname"] . " " . $users[$log["user_fi"]]["lastname"]));
366 array_push($csvrow, trim($log["logtext"]));
367 array_push($csvrow, $title);
368 array_push($csv, ilUtil::processCSVRow($csvrow, TRUE, $separator));
369 }
370 $csvoutput = "";
371 foreach ($csv as $row)
372 {
373 $csvoutput .= join($row, $separator) . "\n";
374 }
375 ilUtil::deliverData($csvoutput, str_replace(" ", "_", "log_" . $from . "_" . $until . "_" . $available_tests[$test]).".csv");
376 }
$test
Definition: Utf8Test.php:85
const IL_CAL_UNIX
const IL_CAL_FKT_DATE
_getQuestionTitle($question_id)
Returns the question title of a question with a given id.
@classDescription Date and time handling
& _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.
$separator

References $_POST, $log, $row, $separator, $test, ilObjTest\_getAvailableTests(), assQuestion\_getQuestionTitle(), ilObjUser\_lookupName(), ilUtil\deliverData(), 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 666 of file class.ilObjAssessmentFolderGUI.php.

667 {
668 global $ilTabs;
669
670 $ilTabs->setTabActive('templates');
671
672 require_once 'Services/Administration/classes/class.ilSettingsTemplateGUI.php';
673 $gui = new ilSettingsTemplateGUI(self::getSettingsTemplateConfig());
674
675 $this->ctrl->forwardCommand($gui);
676 }

◆ getAdminTabs()

ilObjAssessmentFolderGUI::getAdminTabs ( $tabs_gui)

administration tabs show only permissions and trash folder

Reimplemented from ilObjectGUI.

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

503 {
504 $this->getTabs($tabs_gui);
505 }

References getTabs().

+ Here is the call graph for this function:

◆ getLogdataSubtabs()

ilObjAssessmentFolderGUI::getLogdataSubtabs ( )

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

508 {
509 global $ilTabs;
510
511 // log settings
512 $ilTabs->addSubTabTarget("settings",
513 $this->ctrl->getLinkTarget($this, "showLogSettings"),
514 array("saveLogSettings", "showLogSettings")
515 , "");
516
517 // log output
518 $ilTabs->addSubTabTarget("ass_log_output",
519 $this->ctrl->getLinkTarget($this, "logs"),
520 array("logs", "showLog", "exportLog")
521 , "");
522
523 // log administration
524 $ilTabs->addSubTabTarget("ass_log_admin",
525 $this->ctrl->getLinkTarget($this, "logAdmin"),
526 array("logAdmin", "deleteLog"),
527 "", "");
528
529 }

Referenced by getTabs().

+ Here is the caller graph for this function:

◆ getSettingsTemplateConfig()

static ilObjAssessmentFolderGUI::getSettingsTemplateConfig ( )
static
Returns
ilTestSettingsTemplateConfig

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

682 {
683 global $lng;
684
685 require_once 'Modules/Test/classes/class.ilTestSettingsTemplateConfig.php';
686 $config = new ilTestSettingsTemplateConfig($lng);
687 $config->init();
688
689 return $config;
690 }

References 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 ( $tabs_gui)

get tabs

Parameters
objecttabs gui object

Reimplemented from ilObjectGUI.

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

537 {
538 global $rbacsystem, $lng;
539
540 switch ($this->ctrl->getCmd())
541 {
542 case "saveLogSettings":
543 case "showLogSettings":
544 case "logs":
545 case "showLog":
546 case "exportLog":
547 case "logAdmin":
548 case "deleteLog":
549 $this->getLogdataSubtabs();
550 break;
551 }
552
553 if ($rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
554 {
555 $tabs_gui->addTarget("settings",
556 $this->ctrl->getLinkTarget($this, "settings"), array("settings","","view"), "", "");
557
558 $tabs_gui->addTarget("logs",
559 $this->ctrl->getLinkTarget($this, "showLogSettings"),
560 array('saveLogSettings', 'showLogSettings', "logs","showLog", "exportLog", "logAdmin", "deleteLog"),
561 "", "");
562
563 $tabs_gui->addTab("templates",
564 $lng->txt("adm_settings_templates"),
565 $this->ctrl->getLinkTargetByClass("ilsettingstemplategui", ""));
566 }
567
568 if ($rbacsystem->checkAccess("write",$this->object->getRefId()))
569 {
570 $tabs_gui->addTarget('units', $this->ctrl->getLinkTargetByClass('ilGlobalUnitConfigurationGUI', ''), '', 'ilglobalunitconfigurationgui');
571 }
572
573 if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
574 {
575 $tabs_gui->addTarget("perm_settings",
576 $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"), array("perm","info","owner"), 'ilpermissiongui');
577 }
578 }

References ilObjectGUI\$lng, and getLogdataSubtabs().

Referenced by getAdminTabs().

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

◆ ilObjAssessmentFolderGUI()

ilObjAssessmentFolderGUI::ilObjAssessmentFolderGUI (   $a_data,
  $a_id,
  $a_call_by_reference 
)

Constructor.

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

27 {
28 global $rbacsystem;
29
30 $this->type = "assf";
31 $this->ilObjectGUI($a_data,$a_id,$a_call_by_reference,false);
32
33 if (!$rbacsystem->checkAccess('read',$this->object->getRefId()))
34 {
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 }
ilObjectGUI($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
Constructor @access public.
redirection script todo: (a better solution should control the processing via a xml file)

References ilObjectGUI\ilObjectGUI().

+ Here is the call graph for this function:

◆ logAdminObject()

ilObjAssessmentFolderGUI::logAdminObject ( )

Administration output for assessment log files.

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

481 {
482 global $ilAccess, $ilTabs;
483
484 $ilTabs->activateTab('logs');
485
486 $a_write_access = ($ilAccess->checkAccess("write", "", $this->object->getRefId())) ? true : false;
487
488 include_once "./Modules/Test/classes/tables/class.ilAssessmentFolderLogAdministrationTableGUI.php";
489 $table_gui = new ilAssessmentFolderLogAdministrationTableGUI($this, 'logAdmin', $a_write_access);
490 include_once "./Modules/Test/classes/class.ilObjTest.php";
491 $available_tests =& ilObjTest::_getAvailableTests(true);
492 $data = array();
493 foreach ($available_tests as $obj_id => $title)
494 {
495 $nr = $this->object->getNrOfLogEntries($obj_id);
496 array_push($data, array("title" => $title, "nr" => $nr, "id" => $obj_id));
497 }
498 $table_gui->setData($data);
499 $this->tpl->setVariable('ADM_CONTENT', $table_gui->getHTML());
500 }

References ilObjectGUI\$data, ilObjectGUI\$obj_id, and ilObjTest\_getAvailableTests().

Referenced by deleteLogObject().

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

◆ logsObject()

ilObjAssessmentFolderGUI::logsObject (   $p_from = null,
  $p_until = null,
  $p_test = null 
)

display assessment folder logs form

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

382 {
383 global $ilTabs;
384 $ilTabs->activateTab('logs');
385
386 $template = new ilTemplate("tpl.assessment_logs.html", TRUE, TRUE, "Modules/Test");
387
388 include_once "./Modules/Test/classes/class.ilObjTest.php";
389 include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
390 $available_tests =& ilObjTest::_getAvailableTests(1);
391 if (count($available_tests) == 0)
392 {
393 ilUtil::sendInfo($this->lng->txt('assessment_log_no_data'));
394 return;
395 }
396
397 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
398 $form = new ilPropertyFormGUI();
399 $form->setFormAction($this->ctrl->getFormAction($this));
400 $form->setTableWidth("100%");
401 $form->setId("logs");
402
403 $header = new ilFormSectionHeaderGUI();
404 $header->setTitle($this->lng->txt("assessment_log"));
405 $form->addItem($header);
406
407 // from
408 $from = new ilDateTimeInputGUI($this->lng->txt('cal_from'), "log_from");
409 $from->setShowTime(true);
410 $now = getdate();
411 $fromdate = ($p_from) ? $p_from : (($_GET['log_from']) ? $_GET['log_from'] : mktime(0, 0, 0, 1, 1, $now['year']));
412 $from->setDate(new ilDateTime($fromdate, IL_CAL_UNIX));
413 $form->addItem($from);
414
415 // until
416 $until = new ilDateTimeInputGUI($this->lng->txt('cal_until'), "log_until");
417 $until->setShowTime(true);
418 $untildate = ($p_until) ? $p_until : (($_GET['log_until']) ? $_GET['log_until'] : time());
419 $until->setDate(new ilDateTime($untildate, IL_CAL_UNIX));
420 $form->addItem($until);
421
422 // tests
423 $fortest = new ilSelectInputGUI($this->lng->txt('assessment_log_for_test'), "sel_test");
424 $sorted_options = array();
425 foreach($available_tests as $key => $value)
426 {
427 $sorted_options[] = array(
428 'title' => ilUtil::prepareFormOutput($value) . " [" . $this->object->getNrOfLogEntries($key) . " " . $this->lng->txt("assessment_log_log_entries") . "]",
429 'key' => $key
430 );
431 }
432 $sorted_options = ilUtil::sortArray($sorted_options, 'title','asc');
433 $options = array();
434 foreach($sorted_options as $option)
435 {
436 $options[$option['key']] = $option['title'];
437 }
438 $fortest->setOptions($options);
439 $p_test = ($p_test) ? $p_test : $_GET['sel_test'];
440 if ($p_test) $fortest->setValue($p_test);
441 $form->addItem($fortest);
442 $this->ctrl->setParameter($this, 'sel_test', $p_test);
443 $this->ctrl->setParameter($this, 'log_until', $untildate);
444 $this->ctrl->setParameter($this, 'log_from', $fromdate);
445 $form->addCommandButton("showLog", $this->lng->txt("show"));
446 $form->addCommandButton("exportLog", $this->lng->txt("export"));
447 $template->setVariable("FORM", $form->getHTML());
448
449 if ($p_test)
450 {
451 include_once "./Modules/Test/classes/tables/class.ilAssessmentFolderLogTableGUI.php";
452 $table_gui = new ilAssessmentFolderLogTableGUI($this, 'logs');
453 $log_output =& $this->object->getLog($fromdate, $untildate, $p_test);
454 $table_gui->setData($log_output);
455 $template->setVariable('LOG', $table_gui->getHTML());
456 }
457 $this->tpl->setVariable("ADM_CONTENT", $template->get());
458 }
$_GET["client_id"]
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.
special template class to simplify handling of ITX/PEAR
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
if(!is_array($argv)) $options

References $_GET, $options, ilObjTest\_getAvailableTests(), IL_CAL_UNIX, ilUtil\prepareFormOutput(), ilUtil\sendInfo(), and ilUtil\sortArray().

Referenced by showLogObject().

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

101 {
102 global $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 }

References ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ saveSettingsObject()

ilObjAssessmentFolderGUI::saveSettingsObject ( )

Save Assessment settings.

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

255 {
256 global $ilAccess;
257 if (!$ilAccess->checkAccess("write", "", $this->object->getRefId())) $this->ctrl->redirect($this,'settings');
258
259 $form = $this->buildSettingsForm();
260 if(!$form->checkInput())
261 {
262 $form->setValuesByPost();
263 return $this->settingsObject($form);
264 }
265
266 $this->object->_setManualScoring($_POST["chb_manual_scoring"]);
267 include_once "./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php";
268 $questiontypes =& ilObjQuestionPool::_getQuestionTypes(TRUE);
269 $forbidden_types = array();
270 foreach ($questiontypes as $name => $row)
271 {
272 if (!in_array($row["question_type_id"], $_POST["chb_allowed_questiontypes"]))
273 {
274 array_push($forbidden_types, $row["question_type_id"]);
275 }
276 }
277 $this->object->_setForbiddenQuestionTypes($forbidden_types);
278
279 $this->object->setScoringAdjustmentEnabled($_POST['chb_scoring_adjust']);
280 $scoring_types = array();
281 foreach ($questiontypes as $name => $row)
282 {
283 if (in_array($row["question_type_id"], (array)$_POST["chb_scoring_adjustment"]))
284 {
285 array_push($scoring_types, $row["question_type_id"]);
286 }
287 }
288 $this->object->setScoringAdjustableQuestions($scoring_types);
289
290 if( !$_POST['ass_process_lock'] )
291 {
292 $this->object->setAssessmentProcessLockMode(ilObjAssessmentFolder::ASS_PROC_LOCK_MODE_NONE);
293 }
294 elseif( in_array($_POST['ass_process_lock_mode'], ilObjAssessmentFolder::getValidAssessmentProcessLockModes()) )
295 {
296 $this->object->setAssessmentProcessLockMode($_POST['ass_process_lock_mode']);
297 }
298
299 $assessmentSetting = new ilSetting('assessment');
300 $assessmentSetting->set('use_javascript', '1');
301 if(strlen($_POST['imap_line_color']) == 6)
302 {
303 $assessmentSetting->set('imap_line_color', ilUtil::stripSlashes($_POST['imap_line_color']));
304 }
305 $assessmentSetting->set('user_criteria', ilUtil::stripSlashes($_POST['user_criteria']));
306
307 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"),true);
308
309 $this->ctrl->redirect($this,'settings');
310 }
settingsObject(ilPropertyFormGUI $form=null)
display assessment folder settings form
& _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

References $_POST, $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 119 of file class.ilObjAssessmentFolderGUI.php.

120 {
121 global $ilTabs;
122
123 $ilTabs->setTabActive('settings');
124
125 if($form === null)
126 {
127 $form = $this->buildSettingsForm();
128 }
129
130 $this->tpl->setVariable("ADM_CONTENT", $form->getHTML());
131 }

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

316 {
317 $from = mktime($_POST['log_from']['time']['h'], $_POST['log_from']['time']['m'], 0, $_POST['log_from']['date']['m'], $_POST['log_from']['date']['d'], $_POST['log_from']['date']['y']);
318 $until = mktime($_POST['log_until']['time']['h'], $_POST['log_until']['time']['m'], 0, $_POST['log_until']['date']['m'], $_POST['log_until']['date']['d'], $_POST['log_until']['date']['y']);
319 $test = $_POST['sel_test'];
320 $this->logsObject($from, $until, $test);
321 }
logsObject($p_from=null, $p_until=null, $p_test=null)
display assessment folder logs form

References $_POST, $test, and logsObject().

+ Here is the call graph for this function:

◆ showLogSettingsObject()

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

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

584 {
585 $this->tabs_gui->activateTab('logs');
586
587 if(!($form instanceof ilPropertyFormGUI))
588 {
589 $form = $this->getLogSettingsForm();
590 $form->setValuesByArray(array(
591 'chb_assessment_logging' => $this->object->_enabledAssessmentLogging(),
592 'reporting_language' => $this->object->_getLogLanguage()
593 ));
594 }
595
596 $this->tpl->setContent($form->getHTML());
597 }
setValuesByArray($a_values, $a_restrict_to_value_keys=false)
Set form values from an array.

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: