ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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 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)
 
 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 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 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...
 
 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
 
 $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 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...
 
 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, $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...
 
 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 ()
 

Additional Inherited Members

- Protected Attributes inherited from ilObjectGUI
 $tmp_import_dir
 

Detailed Description

Member Function Documentation

◆ deleteLogObject()

ilObjAssessmentFolderGUI::deleteLogObject ( )

Deletes the log entries for one or more tests.

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

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

488  {
489  if (is_array($_POST["chb_test"]) && (count($_POST["chb_test"])))
490  {
491  $this->object->deleteLogEntries($_POST["chb_test"]);
492  ilUtil::sendSuccess($this->lng->txt("ass_log_deleted"));
493  }
494  else
495  {
496  ilUtil::sendInfo($this->lng->txt("ass_log_delete_no_selection"));
497  }
498  $this->logAdminObject();
499  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
logAdminObject()
Administration output for assessment log files.
+ Here is the call graph for this function:

◆ exportLogObject()

ilObjAssessmentFolderGUI::exportLogObject ( )

Called when the a log should be exported.

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

References $_POST, $log, $row, $separator, $test, ilObjTest\_getAvailableTests(), assQuestion\_getQuestionTitle(), ilObjUser\_lookupName(), ilUtil\deliverData(), IL_CAL_FKT_DATE, IL_CAL_UNIX, and ilUtil\processCSVRow().

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

◆ forwardToSettingsTemplateGUI()

ilObjAssessmentFolderGUI::forwardToSettingsTemplateGUI ( )
private

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

Referenced by ilObjAssessmentFolderGUI().

698  {
699  global $ilTabs;
700 
701  $ilTabs->setTabActive('templates');
702 
703  require_once 'Services/Administration/classes/class.ilSettingsTemplateGUI.php';
704  $gui = new ilSettingsTemplateGUI(self::getSettingsTemplateConfig());
705 
706  $this->ctrl->forwardCommand($gui);
707  }
+ Here is the caller graph for this function:

◆ getAdminTabs()

ilObjAssessmentFolderGUI::getAdminTabs ( $tabs_gui)

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

References getTabs().

534  {
535  $this->getTabs($tabs_gui);
536  }
+ Here is the call graph for this function:

◆ getLogdataSubtabs()

ilObjAssessmentFolderGUI::getLogdataSubtabs ( )

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

Referenced by getTabs().

539  {
540  global $ilTabs;
541 
542  // log settings
543  $ilTabs->addSubTabTarget("settings",
544  $this->ctrl->getLinkTarget($this, "showLogSettings"),
545  array("saveLogSettings", "showLogSettings")
546  , "");
547 
548  // log output
549  $ilTabs->addSubTabTarget("ass_log_output",
550  $this->ctrl->getLinkTarget($this, "logs"),
551  array("logs", "showLog", "exportLog")
552  , "");
553 
554  // log administration
555  $ilTabs->addSubTabTarget("ass_log_admin",
556  $this->ctrl->getLinkTarget($this, "logAdmin"),
557  array("logAdmin", "deleteLog"),
558  "", "");
559 
560  }
+ Here is the caller graph for this function:

◆ getSettingsTemplateConfig()

static ilObjAssessmentFolderGUI::getSettingsTemplateConfig ( )
static
Returns
ilTestSettingsTemplateConfig

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

References ilObjectGUI\$lng.

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

713  {
714  global $lng;
715 
716  require_once 'Modules/Test/classes/class.ilTestSettingsTemplateConfig.php';
717  $config = new ilTestSettingsTemplateConfig($lng);
718  $config->init();
719 
720  return $config;
721  }
+ Here is the caller graph for this function:

◆ getTabs()

ilObjAssessmentFolderGUI::getTabs ( $tabs_gui)

get tabs

Parameters
objecttabs gui object

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

References ilObjectGUI\$lng, and getLogdataSubtabs().

Referenced by getAdminTabs().

568  {
569  global $rbacsystem, $lng;
570 
571  switch ($this->ctrl->getCmd())
572  {
573  case "saveLogSettings":
574  case "showLogSettings":
575  case "logs":
576  case "showLog":
577  case "exportLog":
578  case "logAdmin":
579  case "deleteLog":
580  $this->getLogdataSubtabs();
581  break;
582  }
583 
584  if ($rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
585  {
586  $tabs_gui->addTarget("settings",
587  $this->ctrl->getLinkTarget($this, "settings"), array("settings","","view"), "", "");
588 
589  $tabs_gui->addTarget("logs",
590  $this->ctrl->getLinkTarget($this, "showLogSettings"),
591  array('saveLogSettings', 'showLogSettings', "logs","showLog", "exportLog", "logAdmin", "deleteLog"),
592  "", "");
593 
594  $tabs_gui->addTab("templates",
595  $lng->txt("adm_settings_templates"),
596  $this->ctrl->getLinkTargetByClass("ilsettingstemplategui", ""));
597  }
598 
599  if ($rbacsystem->checkAccess("write",$this->object->getRefId()))
600  {
601  $tabs_gui->addTarget('units', $this->ctrl->getLinkTargetByClass('ilGlobalUnitConfigurationGUI', ''), '', 'ilglobalunitconfigurationgui');
602  }
603 
604  if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
605  {
606  $tabs_gui->addTarget("perm_settings",
607  $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"), array("perm","info","owner"), 'ilpermissiongui');
608  }
609  }
+ 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.

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

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 public.
redirection script todo: (a better solution should control the processing via a xml file) ...
+ Here is the call graph for this function:

◆ logAdminObject()

ilObjAssessmentFolderGUI::logAdminObject ( )

Administration output for assessment log files.

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

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

Referenced by deleteLogObject().

505  {
506  global $ilAccess, $ilTabs;
507 
508  $ilTabs->activateTab('logs');
509 
510  $a_write_access = ($ilAccess->checkAccess("write", "", $this->object->getRefId())) ? true : false;
511 
512  include_once "./Modules/Test/classes/tables/class.ilAssessmentFolderLogAdministrationTableGUI.php";
513  $table_gui = new ilAssessmentFolderLogAdministrationTableGUI($this, 'logAdmin', $a_write_access);
514  include_once "./Modules/Test/classes/class.ilObjTest.php";
515  require_once "./Services/Link/classes/class.ilLink.php";
516  $available_tests =& ilObjTest::_getAvailableTests(false);
517  $data = array();
518  foreach ($available_tests as $ref_id => $title)
519  {
521  array_push($data, array(
522  "title" => $title,
523  "nr" => $this->object->getNrOfLogEntries($obj_id),
524  "id" => $obj_id,
525  "location_href" => ilLink::_getLink($ref_id, 'tst'),
526  "location_txt" => $this->lng->txt("perma_link")
527  ));
528  }
529  $table_gui->setData($data);
530  $this->tpl->setVariable('ADM_CONTENT', $table_gui->getHTML());
531  }
static _lookupObjectId($a_ref_id)
lookup object id
& _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:

◆ logsObject()

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

display assessment folder logs form

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

References $_GET, $header, $options, $row, ilObjTest\_getAvailableTests(), ilLink\_getLink(), IL_CAL_UNIX, ilUtil\prepareFormOutput(), ilUtil\sendInfo(), ilDateTimeInputGUI\setShowTime(), and ilUtil\sortArray().

Referenced by showLogObject().

395  {
396  global $ilTabs;
397  $ilTabs->activateTab('logs');
398 
399  $template = new ilTemplate("tpl.assessment_logs.html", TRUE, TRUE, "Modules/Test");
400 
401  require_once "./Services/Link/classes/class.ilLink.php";
402  include_once "./Modules/Test/classes/class.ilObjTest.php";
403  include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
404 
405  $available_tests =& ilObjTest::_getAvailableTests(1);
406  if (count($available_tests) == 0)
407  {
408  ilUtil::sendInfo($this->lng->txt('assessment_log_no_data'));
409  return;
410  }
411 
412  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
413  $form = new ilPropertyFormGUI();
414  $form->setFormAction($this->ctrl->getFormAction($this));
415  $form->setTableWidth("100%");
416  $form->setId("logs");
417 
419  $header->setTitle($this->lng->txt("assessment_log"));
420  $form->addItem($header);
421 
422  // from
423  $from = new ilDateTimeInputGUI($this->lng->txt('cal_from'), "log_from");
424  $from->setShowTime(true);
425  $now = getdate();
426  $fromdate = ($p_from) ? $p_from : (($_GET['log_from']) ? $_GET['log_from'] : mktime(0, 0, 0, 1, 1, $now['year']));
427  $from->setDate(new ilDateTime($fromdate, IL_CAL_UNIX));
428  $form->addItem($from);
429 
430  // until
431  $until = new ilDateTimeInputGUI($this->lng->txt('cal_until'), "log_until");
432  $until->setShowTime(true);
433  $untildate = ($p_until) ? $p_until : (($_GET['log_until']) ? $_GET['log_until'] : time());
434  $until->setDate(new ilDateTime($untildate, IL_CAL_UNIX));
435  $form->addItem($until);
436 
437  // tests
438  $fortest = new ilSelectInputGUI($this->lng->txt('assessment_log_for_test'), "sel_test");
439  $sorted_options = array();
440  foreach($available_tests as $key => $value)
441  {
442  $sorted_options[] = array(
443  'title' => ilUtil::prepareFormOutput($value) . " [" . $this->object->getNrOfLogEntries($key) . " " . $this->lng->txt("assessment_log_log_entries") . "]",
444  'key' => $key
445  );
446  }
447  $sorted_options = ilUtil::sortArray($sorted_options, 'title','asc');
448  $options = array();
449  foreach($sorted_options as $option)
450  {
451  $options[$option['key']] = $option['title'];
452  }
453  $fortest->setOptions($options);
454  $p_test = ($p_test) ? $p_test : $_GET['sel_test'];
455  if ($p_test) $fortest->setValue($p_test);
456  $form->addItem($fortest);
457  $this->ctrl->setParameter($this, 'sel_test', $p_test);
458  $this->ctrl->setParameter($this, 'log_until', $untildate);
459  $this->ctrl->setParameter($this, 'log_from', $fromdate);
460  $form->addCommandButton("showLog", $this->lng->txt("show"));
461  $form->addCommandButton("exportLog", $this->lng->txt("export"));
462  $template->setVariable("FORM", $form->getHTML());
463 
464  if ($p_test)
465  {
466  include_once "./Modules/Test/classes/tables/class.ilAssessmentFolderLogTableGUI.php";
467  $table_gui = new ilAssessmentFolderLogTableGUI($this, 'logs');
468  $log_output =& $this->object->getLog($fromdate, $untildate, $p_test);
469 
470  $self = $this;
471  array_walk($log_output, function(&$row) use ($self) {
472  if(is_numeric($row['ref_id']) && $row['ref_id'] > 0)
473  {
474  $row['location_href'] = ilLink::_getLink($row['ref_id'], 'tst');
475  $row['location_txt'] = $self->lng->txt("perma_link");
476  }
477  });
478  $table_gui->setData($log_output);
479  $template->setVariable('LOG', $table_gui->getHTML());
480  }
481  $this->tpl->setVariable("ADM_CONTENT", $template->get());
482  }
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.
$_GET["client_id"]
This class represents a section header in a property form.
const IL_CAL_UNIX
static sortArray($array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
This class represents a date/time property in a property form.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
if(!is_array($argv)) $options
$header
special template class to simplify handling of ITX/PEAR
& _getAvailableTests($use_object_id=FALSE)
Returns the available tests for the active user.
Date and time handling
setShowTime($a_showtime)
Set Show Time Information.
+ 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 100 of file class.ilObjAssessmentFolderGUI.php.

References ilUtil\sendSuccess().

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  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
+ Here is the call graph for this function:

◆ saveSettingsObject()

ilObjAssessmentFolderGUI::saveSettingsObject ( )

Save Assessment settings.

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

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

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

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

329  {
330  $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']);
331  $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']);
332  $test = $_POST['sel_test'];
333  $this->logsObject($from, $until, $test);
334  }
$_POST['username']
Definition: cron.php:12
logsObject($p_from=null, $p_until=null, $p_test=null)
display assessment folder logs form
$test
Definition: Utf8Test.php:85
+ Here is the call graph for this function:

◆ showLogSettingsObject()

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

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

References $lang, $options, and ilUtil\sendSuccess().

615  {
616  $this->tabs_gui->activateTab('logs');
617 
618  if(!($form instanceof ilPropertyFormGUI))
619  {
620  $form = $this->getLogSettingsForm();
621  $form->setValuesByArray(array(
622  'chb_assessment_logging' => $this->object->_enabledAssessmentLogging(),
623  'reporting_language' => $this->object->_getLogLanguage()
624  ));
625  }
626 
627  $this->tpl->setContent($form->getHTML());
628  }
This class represents a property form user interface.
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: