ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f87
class.ilObjAssessmentFolderGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 require_once "./Services/Object/classes/class.ilObjectGUI.php";
5 
6 require_once 'Modules/Test/classes/class.ilObjTest.php';
7 require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionProcessLocker.php';
8 
20 {
22 
26  public function ilObjAssessmentFolderGUI($a_data,$a_id,$a_call_by_reference)
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  }
40 
41  public function &executeCommand()
42  {
47  global $rbacsystem, $ilTabs;
48 
49  $next_class = $this->ctrl->getNextClass($this);
50  $cmd = $this->ctrl->getCmd();
51  $this->prepareOutput();
52 
53  switch($next_class)
54  {
55  case 'ilpermissiongui':
56  $ilTabs->activateTab('perm_settings');
57  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
58  $perm_gui =& new ilPermissionGUI($this);
59  $ret =& $this->ctrl->forwardCommand($perm_gui);
60  break;
61 
62  case 'ilsettingstemplategui':
64  break;
65 
66  case 'ilglobalunitconfigurationgui':
67  if(!$rbacsystem->checkAccess('write', $this->object->getRefId()))
68  {
69  $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->WARNING);
70  }
71 
72  $ilTabs->setTabActive('units');
73 
74  require_once 'Modules/TestQuestionPool/classes/class.ilGlobalUnitConfigurationGUI.php';
75  require_once 'Modules/TestQuestionPool/classes/class.ilUnitConfigurationRepository.php';
78  );
79  $this->ctrl->forwardCommand($gui);
80  break;
81 
82  default:
83  if($cmd == "" || $cmd == "view")
84  {
85  $cmd = "settings";
86  }
87  $cmd .= "Object";
88  $this->$cmd();
89 
90  break;
91  }
92  return true;
93  }
94 
95 
100  public function saveObject()
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  }
114 
115 
119  public function settingsObject(ilPropertyFormGUI $form = null)
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  }
132 
133  private function buildSettingsForm()
134  {
138  global $ilAccess;
139 
140  include_once "./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php";
141  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
142  $form = new ilPropertyFormGUI();
143  $form->setFormAction($this->ctrl->getFormAction($this));
144  $form->setTableWidth("100%");
145  $form->setId("settings");
146 
147  $header = new ilFormSectionHeaderGUI();
148  $header->setTitle($this->lng->txt('settings'));
149  $form->addItem($header);
150 
151  // question process locking behaviour (e.g. on saving users working data)
152  $chb = new ilCheckboxInputGUI($this->lng->txt('ass_process_lock'), 'ass_process_lock');
153  $chb->setChecked($this->object->getAssessmentProcessLockMode() != ilObjAssessmentFolder::ASS_PROC_LOCK_MODE_NONE);
154  $chb->setInfo($this->lng->txt('ass_process_lock_desc'));
155  $form->addItem($chb);
156  $rg = new ilRadioGroupInputGUI($this->lng->txt('ass_process_lock_mode'), 'ass_process_lock_mode');
157  $rg->setRequired(true);
158  $opt = new ilRadioOption($this->lng->txt('ass_process_lock_mode_file'), ilObjAssessmentFolder::ASS_PROC_LOCK_MODE_FILE);
159  $opt->setInfo($this->lng->txt('ass_process_lock_mode_file_desc'));
160  $rg->addOption($opt);
161  $opt = new ilRadioOption($this->lng->txt('ass_process_lock_mode_db'), ilObjAssessmentFolder::ASS_PROC_LOCK_MODE_DB);
162  $opt->setInfo($this->lng->txt('ass_process_lock_mode_db_desc'));
163  $rg->addOption($opt);
164  if($this->object->getAssessmentProcessLockMode() != ilObjAssessmentFolder::ASS_PROC_LOCK_MODE_NONE)
165  {
166  $rg->setValue($this->object->getAssessmentProcessLockMode());
167  }
168  $chb->addSubItem($rg);
169 
170  $assessmentSetting = new ilSetting('assessment');
171  $imap_line_color = array_key_exists('imap_line_color', $_GET) ? $_GET['imap_line_color'] : $assessmentSetting->get('imap_line_color');
172  if(strlen($imap_line_color) == 0) $imap_line_color = 'FF0000';
173 
174  $linepicker = new ilColorPickerInputGUI($this->lng->txt('assessment_imap_line_color'), 'imap_line_color');
175  $linepicker->setValue($imap_line_color);
176  $form->addItem($linepicker);
177 
178  $user_criteria = array_key_exists('user_criteria', $_GET) ? $_GET['user_criteria'] : $assessmentSetting->get('user_criteria');
179  $userCriteria = new ilSelectInputGUI($this->lng->txt('user_criteria'), 'user_criteria');
180  $userCriteria->setInfo($this->lng->txt('user_criteria_desc'));
181  $userCriteria->setRequired(true);
182 
183  $fields = array('usr_id', 'login', 'email', 'matriculation', 'ext_account');
184  $usr_fields = array();
185  foreach($fields as $field)
186  {
187  $usr_fields[$field] = $field;
188  }
189  $userCriteria->setOptions($usr_fields);
190  $userCriteria->setValue($user_criteria);
191  $form->addItem($userCriteria);
192 
193  // question settings
194  $header = new ilFormSectionHeaderGUI();
195  $header->setTitle($this->lng->txt("assf_questiontypes"));
196  $form->addItem($header);
197 
198  // available question types
199  $allowed = new ilCheckboxGroupInputGUI($this->lng->txt('assf_allowed_questiontypes'), "chb_allowed_questiontypes");
200  $questiontypes =& ilObjQuestionPool::_getQuestionTypes(TRUE);
201  $forbidden_types = $this->object->_getForbiddenQuestionTypes();
202  $allowedtypes = array();
203  foreach ($questiontypes as $qt)
204  {
205  if (!in_array($qt['question_type_id'], $forbidden_types)) array_push($allowedtypes, $qt['question_type_id']);
206  }
207  $allowed->setValue($allowedtypes);
208  foreach ($questiontypes as $type_name => $qtype)
209  {
210  $allowed->addOption(new ilCheckboxOption($type_name, $qtype["question_type_id"]));
211  }
212  $allowed->setInfo($this->lng->txt('assf_allowed_questiontypes_desc'));
213  $form->addItem($allowed);
214 
215  // manual scoring
216  $manual = new ilCheckboxGroupInputGUI($this->lng->txt('assessment_log_manual_scoring_activate'), "chb_manual_scoring");
217  $manscoring = $this->object->_getManualScoring();
218  $manual->setValue($manscoring);
219  foreach ($questiontypes as $type_name => $qtype)
220  {
221  $manual->addOption(new ilCheckboxOption($type_name, $qtype["question_type_id"]));
222  }
223  $manual->setInfo($this->lng->txt('assessment_log_manual_scoring_desc'));
224  $form->addItem($manual);
225 
226  // scoring adjustment active
227  $scoring_activation = new ilCheckboxInputGUI($this->lng->txt('assessment_scoring_adjust'),'chb_scoring_adjust');
228  $scoring_activation->setChecked($this->object->getScoringAdjustmentEnabled());
229  $scoring_activation->setInfo($this->lng->txt('assessment_scoring_adjust_desc'));
230  $form->addItem($scoring_activation);
231 
232  // scoring adjustment
233  $scoring = new ilCheckboxGroupInputGUI($this->lng->txt('assessment_log_scoring_adjustment_activate'), "chb_scoring_adjustment");
234  $scoring_active = $this->object->getScoringAdjustableQuestions();
235  $scoring->setValue($scoring_active);
236  foreach ($questiontypes as $type_name => $qtype)
237  {
238  $scoring->addOption(new ilCheckboxOption($type_name, $qtype["question_type_id"]));
239  }
240  $scoring->setInfo($this->lng->txt('assessment_log_scoring_adjustment_desc'));
241  $form->addItem($scoring);
242 
243  if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
244  {
245  $form->addCommandButton("saveSettings", $this->lng->txt("save"));
246  }
247 
248  return $form;
249  }
250 
254  public function saveSettingsObject()
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  }
311 
315  public function showLogObject()
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  }
322 
326  public function exportLogObject()
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  }
377 
381  public function logsObject($p_from = null, $p_until = null, $p_test = null)
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  }
459 
463  public function deleteLogObject()
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  }
476 
480  public function logAdminObject()
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  }
501 
502  public function getAdminTabs(&$tabs_gui)
503  {
504  $this->getTabs($tabs_gui);
505  }
506 
507  public function getLogdataSubtabs()
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  }
530 
536  public function getTabs(&$tabs_gui)
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  }
579 
583  protected function showLogSettingsObject(ilPropertyFormGUI $form = null)
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  }
598 
602  protected function saveLogSettingsObject()
603  {
607  global $ilAccess;
608 
609  if(!$ilAccess->checkAccess('write', '', $this->object->getRefId()))
610  {
611  $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->WARNING);
612  }
613 
614  $form = $this->getLogSettingsForm();
615  if($form->checkInput())
616  {
617  $this->object->_enableAssessmentLogging((int)$form->getInput('chb_assessment_logging'));
618  $this->object->_setLogLanguage($form->getInput('reporting_language'));
619  $this->object->update();
620  ilUtil::sendSuccess($this->lng->txt('saved_successfully'));
621  }
622 
623  $form->setValuesByPost();
624  $this->showLogSettingsObject($form);
625  }
626 
630  protected function getLogSettingsForm()
631  {
635  global $ilAccess;
636 
637  require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
638  $form = new ilPropertyFormGUI();
639  $form->setFormAction($this->ctrl->getFormAction($this, 'saveLogSettings'));
640  $form->setTitle($this->lng->txt('assessment_log_logging'));
641 
642  $logging = new ilCheckboxInputGUI('', 'chb_assessment_logging');
643  $logging->setValue(1);
644  $logging->setOptionTitle($this->lng->txt('activate_assessment_logging'));
645  $form->addItem($logging);
646 
647  $reporting = new ilSelectInputGUI($this->lng->txt('assessment_settings_reporting_language'), 'reporting_language');
648  $languages = $this->lng->getInstalledLanguages();
649  $this->lng->loadLanguageModule('meta');
650  $options = array();
651  foreach($languages as $lang)
652  {
653  $options[$lang] = $this->lng->txt('meta_l_' . $lang);
654  }
655  $reporting->setOptions($options);
656  $form->addItem($reporting);
657 
658  if($ilAccess->checkAccess('write', '', $this->object->getRefId()))
659  {
660  $form->addCommandButton('saveLogSettings', $this->lng->txt('save'));
661  }
662 
663  return $form;
664  }
665 
666  private function forwardToSettingsTemplateGUI()
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  }
677 
681  public static function getSettingsTemplateConfig()
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  }
691 }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static _lookupName($a_user_id)
lookup user name
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
This class represents an option in a radio group.
ILIAS Setting Class.
static deliverData($a_data, $a_filename, $mime="application/octet-stream", $charset="")
deliver data for download via browser.
$separator
$_POST['username']
Definition: cron.php:12
This class represents an option in a checkbox group.
This class represents a selection list property in a property form.
This class represents a property form user interface.
settingsObject(ilPropertyFormGUI $form=null)
display assessment folder settings form
$_GET["client_id"]
This class represents a section header in a property form.
Class ilObjAssessmentFolderGUI.
Color picker form for selecting color hexcodes using yui library.
$cmd
Definition: sahs_server.php:35
Class ilGlobalUnitConfigurationGUI.
Class ilUnitConfigurationRepository.
This class represents a checkbox property in a property form.
ilObjectGUI($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
Constructor public.
ilObjAssessmentFolderGUI($a_data, $a_id, $a_call_by_reference)
Constructor.
_getQuestionTitle($question_id)
Returns the question title of a question with a given id.
const IL_CAL_UNIX
setInfo($a_info)
Set Info.
static sortArray($array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
& _getQuestionTypes($all_tags=FALSE, $fixOrder=false)
This class represents a date/time property in a property form.
setInfo($a_info)
Set Information Text.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
logAdminObject()
Administration output for assessment log files.
setChecked($a_checked)
Set Checked.
This class represents a property in a property form.
if(!is_array($argv)) $options
& executeCommand()
execute command
saveSettingsObject()
Save Assessment settings.
Class ilObjectGUI Basic methods of all Output classes.
special template class to simplify handling of ITX/PEAR
& _getAvailableTests($use_object_id=FALSE)
Returns the available tests for the active user.
const IL_CAL_FKT_DATE
Date and time handling
redirection script todo: (a better solution should control the processing via a xml file) ...
This class represents a property in a property form.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static & processCSVRow(&$row, $quoteAll=FALSE, $separator=";", $outUTF8=FALSE, $compatibleWithMSExcel=TRUE)
Convertes an array for CSV usage.
showLogSettingsObject(ilPropertyFormGUI $form=null)
prepareOutput()
prepare output
logsObject($p_from=null, $p_until=null, $p_test=null)
display assessment folder logs form
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
showLogObject()
Called when the a log should be shown.
exportLogObject()
Called when the a log should be exported.
setRequired($a_required)
Set Required.
deleteLogObject()
Deletes the log entries for one or more tests.
setShowTime($a_showtime)
Set Show Time Information.
$test
Definition: Utf8Test.php:85