ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilObjAssessmentFolderGUI.php
Go to the documentation of this file.
1 <?php
2 /*
3  +-----------------------------------------------------------------------------+
4  | ILIAS open source |
5  +-----------------------------------------------------------------------------+
6  | Copyright (c) 1998-2006 ILIAS open source, University of Cologne |
7  | |
8  | This program is free software; you can redistribute it and/or |
9  | modify it under the terms of the GNU General Public License |
10  | as published by the Free Software Foundation; either version 2 |
11  | of the License, or (at your option) any later version. |
12  | |
13  | This program is distributed in the hope that it will be useful, |
14  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16  | GNU General Public License for more details. |
17  | |
18  | You should have received a copy of the GNU General Public License |
19  | along with this program; if not, write to the Free Software |
20  | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21  +-----------------------------------------------------------------------------+
22 */
23 
24 include_once "./classes/class.ilObjectGUI.php";
25 
37 {
43 
44  public function ilObjAssessmentFolderGUI($a_data,$a_id,$a_call_by_reference)
45  {
46  global $rbacsystem;
47 
48  $this->type = "assf";
49  $this->ilObjectGUI($a_data,$a_id,$a_call_by_reference,false);
50 
51  if (!$rbacsystem->checkAccess('read',$this->object->getRefId()))
52  {
53  $this->ilias->raiseError($this->lng->txt("msg_no_perm_read_assf"),$this->ilias->error_obj->WARNING);
54  }
55  }
56 
57  public function &executeCommand()
58  {
59  $next_class = $this->ctrl->getNextClass($this);
60  $cmd = $this->ctrl->getCmd();
61  $this->prepareOutput();
62 
63  global $ilTabs;
64 
65  switch($next_class)
66  {
67  case 'ilpermissiongui':
68  $ilTabs->activateTab('perm_settings');
69  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
70  $perm_gui =& new ilPermissionGUI($this);
71  $ret =& $this->ctrl->forwardCommand($perm_gui);
72  break;
73 
74  case 'ilsettingstemplategui':
75  $ilTabs->setTabActive("templates");
76  include_once("./Services/Administration/classes/class.ilSettingsTemplateGUI.php");
77  $set_tpl_gui = new ilSettingsTemplateGUI($this->getSettingsTemplateConfig());
78  $this->ctrl->forwardCommand($set_tpl_gui);
79  break;
80 
81  default:
82  if($cmd == "" || $cmd == "view")
83  {
84  $cmd = "settings";
85  }
86  $cmd .= "Object";
87  $this->$cmd();
88 
89  break;
90  }
91  return true;
92  }
93 
94 
99  public function saveObject()
100  {
101  global $rbacadmin;
102 
103  // create and insert forum in objecttree
104  $newObj = parent::saveObject();
105 
106  // put here object specific stuff
107 
108  // always send a message
109  ilUtil::sendSuccess($this->lng->txt("object_added"),true);
110 
111  $this->ctrl->redirect($this);
112  }
113 
114 
118  public function settingsObject()
119  {
120  global $ilAccess;
121 
122  global $ilTabs;
123  $ilTabs->setTabActive('settings');
124 
125  include_once "./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php";
126  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
127  $form = new ilPropertyFormGUI();
128  $form->setFormAction($this->ctrl->getFormAction($this));
129  $form->setTableWidth("100%");
130  $form->setId("settings");
131 
132  // general properties
133  $header = new ilFormSectionHeaderGUI();
134  $header->setTitle($this->lng->txt("assessment_log_logging"));
135  $form->addItem($header);
136 
137  // assessment logging
138  $logging = new ilCheckboxInputGUI('', "chb_assessment_logging");
139  $logging->setValue(1);
140  $logging->setChecked($this->object->_enabledAssessmentLogging());
141  $logging->setOptionTitle($this->lng->txt("activate_assessment_logging"));
142  $form->addItem($logging);
143 
144  // reporting language
145  $reporting = new ilSelectInputGUI($this->lng->txt('assessment_settings_reporting_language'), "reporting_language");
146  $languages = $this->lng->getInstalledLanguages();
147  $options = array();
148  foreach ($languages as $lang)
149  {
150  $options[$lang] = $this->lng->txt("lang_" . $lang);
151  }
152  $reporting->setOptions($options);
153  $reporting->setValue($this->object->_getLogLanguage());
154  $form->addItem($reporting);
155 
156  // question settings
157  $header = new ilFormSectionHeaderGUI();
158  $header->setTitle($this->lng->txt("assf_questiontypes"));
159  $form->addItem($header);
160 
161  // available question types
162  $allowed = new ilCheckboxGroupInputGUI($this->lng->txt('assf_allowed_questiontypes'), "chb_allowed_questiontypes");
163  $questiontypes =& ilObjQuestionPool::_getQuestionTypes(TRUE);
164  $forbidden_types = $this->object->_getForbiddenQuestionTypes();
165  $allowedtypes = array();
166  foreach ($questiontypes as $qt)
167  {
168  if (!in_array($qt['question_type_id'], $forbidden_types)) array_push($allowedtypes, $qt['question_type_id']);
169  }
170  $allowed->setValue($allowedtypes);
171  foreach ($questiontypes as $type_name => $qtype)
172  {
173  $allowed->addOption(new ilCheckboxOption($type_name, $qtype["question_type_id"]));
174  }
175  $allowed->setInfo($this->lng->txt('assf_allowed_questiontypes_desc'));
176  $form->addItem($allowed);
177 
178  // manual scoring
179  $manual = new ilCheckboxGroupInputGUI($this->lng->txt('assessment_log_manual_scoring_activate'), "chb_manual_scoring");
180  $manscoring = $this->object->_getManualScoring();
181  $manual->setValue($manscoring);
182  foreach ($questiontypes as $type_name => $qtype)
183  {
184  $manual->addOption(new ilCheckboxOption($type_name, $qtype["question_type_id"]));
185  }
186  $manual->setInfo($this->lng->txt('assessment_log_manual_scoring_desc'));
187  $form->addItem($manual);
188 
189  if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
190  {
191  $form->addCommandButton("saveSettings", $this->lng->txt("save"));
192  }
193  $this->tpl->setVariable("ADM_CONTENT", $form->getHTML());
194  }
195 
199  public function saveSettingsObject()
200  {
201  global $ilAccess;
202  if (!$ilAccess->checkAccess("write", "", $this->object->getRefId())) $this->ctrl->redirect($this,'settings');
203 
204  if ($_POST["chb_assessment_logging"] == 1)
205  {
206  $this->object->_enableAssessmentLogging(1);
207  }
208  else
209  {
210  $this->object->_enableAssessmentLogging(0);
211  }
212  $this->object->_setLogLanguage($_POST["reporting_language"]);
213  $this->object->_setManualScoring($_POST["chb_manual_scoring"]);
214  include_once "./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php";
215  $questiontypes =& ilObjQuestionPool::_getQuestionTypes(TRUE);
216  $forbidden_types = array();
217  foreach ($questiontypes as $name => $row)
218  {
219  if (!in_array($row["question_type_id"], $_POST["chb_allowed_questiontypes"]))
220  {
221  array_push($forbidden_types, $row["question_type_id"]);
222  }
223  }
224  $this->object->_setForbiddenQuestionTypes($forbidden_types);
225  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"),true);
226 
227  $this->ctrl->redirect($this,'settings');
228  }
229 
233  public function showLogObject()
234  {
235  $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']);
236  $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']);
237  $test = $_POST['sel_test'];
238  $this->logsObject($from, $until, $test);
239  }
240 
244  public function exportLogObject()
245  {
246  $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']);
247  $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']);
248  $test = $_POST['sel_test'];
249 
250  $csv = array();
251  $separator = ";";
252  $row = array(
253  $this->lng->txt("assessment_log_datetime"),
254  $this->lng->txt("user"),
255  $this->lng->txt("assessment_log_text"),
256  $this->lng->txt("question")
257  );
258  include_once "./Modules/Test/classes/class.ilObjTest.php";
259  include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
260  $available_tests =& ilObjTest::_getAvailableTests(1);
261  array_push($csv, ilUtil::processCSVRow($row, TRUE, $separator));
262  $log_output =& $this->object->getLog($from, $until, $test);
263  $users = array();
264  foreach ($log_output as $key => $log)
265  {
266  if (!array_key_exists($log["user_fi"], $users))
267  {
268  $users[$log["user_fi"]] = ilObjUser::_lookupName($log["user_fi"]);
269  }
270  $title = "";
271  if ($log["question_fi"] || $log["original_fi"])
272  {
273  $title = assQuestion::_getQuestionTitle($log["question_fi"]);
274  if (strlen($title) == 0)
275  {
276  $title = assQuestion::_getQuestionTitle($log["original_fi"]);
277  }
278  $title = $this->lng->txt("assessment_log_question") . ": " . $title;
279  }
280  $csvrow = array();
281  $date = new ilDateTime($log['tstamp'],IL_CAL_UNIX);
282  array_push($csvrow, $date->get(IL_CAL_FKT_DATE,'Y-m-d H:i'));
283  array_push($csvrow, trim($users[$log["user_fi"]]["title"] . " " . $users[$log["user_fi"]]["firstname"] . " " . $users[$log["user_fi"]]["lastname"]));
284  array_push($csvrow, trim($log["logtext"]));
285  array_push($csvrow, $title);
286  array_push($csv, ilUtil::processCSVRow($csvrow, TRUE, $separator));
287  }
288  $csvoutput = "";
289  foreach ($csv as $row)
290  {
291  $csvoutput .= join($row, $separator) . "\n";
292  }
293  ilUtil::deliverData($csvoutput, str_replace(" ", "_", "log_" . $from . "_" . $until . "_" . $available_tests[$test]).".csv");
294  }
295 
299  public function logsObject($p_from = null, $p_until = null, $p_test = null)
300  {
301  global $ilTabs;
302  $ilTabs->activateTab('logs');
303 
304  $template = new ilTemplate("tpl.assessment_logs.html", TRUE, TRUE, "Modules/Test");
305 
306  include_once "./Modules/Test/classes/class.ilObjTest.php";
307  include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
308  $available_tests =& ilObjTest::_getAvailableTests(1);
309  if (count($available_tests) == 0)
310  {
311  ilUtil::sendInfo($this->lng->txt('assessment_log_no_data'));
312  return;
313  }
314 
315  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
316  $form = new ilPropertyFormGUI();
317  $form->setFormAction($this->ctrl->getFormAction($this));
318  $form->setTableWidth("100%");
319  $form->setId("logs");
320 
321  $header = new ilFormSectionHeaderGUI();
322  $header->setTitle($this->lng->txt("assessment_log"));
323  $form->addItem($header);
324 
325  // from
326  $from = new ilDateTimeInputGUI($this->lng->txt('cal_from'), "log_from");
327  $from->setShowDate(true);
328  $from->setShowTime(true);
329  $now = getdate();
330  $fromdate = ($p_from) ? $p_from : (($_GET['log_from']) ? $_GET['log_from'] : mktime(0, 0, 0, 1, 1, $now['year']));
331  $from->setDate(new ilDateTime($fromdate, IL_CAL_UNIX));
332  $form->addItem($from);
333 
334  // until
335  $until = new ilDateTimeInputGUI($this->lng->txt('cal_until'), "log_until");
336  $until->setShowDate(true);
337  $until->setShowTime(true);
338  $untildate = ($p_until) ? $p_until : (($_GET['log_until']) ? $_GET['log_until'] : time());
339  $until->setDate(new ilDateTime($untildate, IL_CAL_UNIX));
340  $form->addItem($until);
341 
342  // tests
343  $fortest = new ilSelectInputGUI($this->lng->txt('assessment_log_for_test'), "sel_test");
344  $options = array();
345  foreach ($available_tests as $key => $value)
346  {
347  $options[$key] = ilUtil::prepareFormOutput($value) . " [" . $this->object->getNrOfLogEntries($key) . " " . $this->lng->txt("assessment_log_log_entries") . "]";
348  }
349  $fortest->setOptions($options);
350  $p_test = ($p_test) ? $p_test : $_GET['sel_test'];
351  if ($p_test) $fortest->setValue($p_test);
352  $form->addItem($fortest);
353  $this->ctrl->setParameter($this, 'sel_test', $p_test);
354  $this->ctrl->setParameter($this, 'log_until', $untildate);
355  $this->ctrl->setParameter($this, 'log_from', $fromdate);
356  $form->addCommandButton("showLog", $this->lng->txt("show"));
357  $form->addCommandButton("exportLog", $this->lng->txt("export"));
358  $template->setVariable("FORM", $form->getHTML());
359 
360  if ($p_test)
361  {
362  include_once "./Modules/Test/classes/tables/class.ilAssessmentFolderLogTableGUI.php";
363  $table_gui = new ilAssessmentFolderLogTableGUI($this, 'logs');
364  $log_output =& $this->object->getLog($fromdate, $untildate, $p_test);
365  $table_gui->setData($log_output);
366  $template->setVariable('LOG', $table_gui->getHTML());
367  }
368  $this->tpl->setVariable("ADM_CONTENT", $template->get());
369  }
370 
374  public function deleteLogObject()
375  {
376  if (is_array($_POST["chb_test"]) && (count($_POST["chb_test"])))
377  {
378  $this->object->deleteLogEntries($_POST["chb_test"]);
379  ilUtil::sendSuccess($this->lng->txt("ass_log_deleted"));
380  }
381  else
382  {
383  ilUtil::sendInfo($this->lng->txt("ass_log_delete_no_selection"));
384  }
385  $this->logAdminObject();
386  }
387 
391  public function logAdminObject()
392  {
393  global $ilAccess, $ilTabs;
394 
395  $ilTabs->activateTab('logs');
396 
397  $a_write_access = ($ilAccess->checkAccess("write", "", $this->object->getRefId())) ? true : false;
398 
399  include_once "./Modules/Test/classes/tables/class.ilAssessmentFolderLogAdministrationTableGUI.php";
400  $table_gui = new ilAssessmentFolderLogAdministrationTableGUI($this, 'logAdmin', $a_write_access);
401  include_once "./Modules/Test/classes/class.ilObjTest.php";
402  $available_tests =& ilObjTest::_getAvailableTests(true);
403  $data = array();
404  foreach ($available_tests as $obj_id => $title)
405  {
406  $nr = $this->object->getNrOfLogEntries($obj_id);
407  array_push($data, array("title" => $title, "nr" => $nr, "id" => $obj_id));
408  }
409  $table_gui->setData($data);
410  $this->tpl->setVariable('ADM_CONTENT', $table_gui->getHTML());
411  }
412 
413  public function getAdminTabs(&$tabs_gui)
414  {
415  $this->getTabs($tabs_gui);
416  }
417 
418  public function getLogdataSubtabs()
419  {
420  global $ilTabs;
421 
422  // log output
423  $ilTabs->addSubTabTarget("ass_log_output",
424  $this->ctrl->getLinkTarget($this, "logs"),
425  array("logs", "showLog", "exportLog")
426  , "");
427 
428  // log administration
429  $ilTabs->addSubTabTarget("ass_log_admin",
430  $this->ctrl->getLinkTarget($this, "logAdmin"),
431  array("logAdmin", "deleteLog"),
432  "", "");
433 
434  }
435 
439  public function defaultsObject()
440  {
441  global $ilAccess, $rbacreview, $lng, $ilCtrl, $tpl, $ilTabs;
442 
443  $ilTabs->activateTab('defaults');
444 
445  $assessmentSetting = new ilSetting("assessment");
446  $use_javascript = array_key_exists("use_javascript", $_GET) ? $_GET["use_javascript"] : $assessmentSetting->get("use_javascript");
447  $imap_line_color = array_key_exists("imap_line_color", $_GET) ? $_GET["imap_line_color"] : $assessmentSetting->get("imap_line_color");
448  if (strlen($imap_line_color) == 0) $imap_line_color = "FF0000";
449 
450  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
451  $form = new ilPropertyFormGUI();
452  $form->setFormAction($ilCtrl->getFormAction($this));
453  $form->setTitle($lng->txt("assessment_defaults"));
454 
455  // Enable javascript
456  $enable = new ilCheckboxInputGUI($lng->txt("assessment_use_javascript"), "use_javascript");
457  $enable->setChecked($use_javascript);
458  $enable->setInfo($lng->txt("assessment_use_javascript_desc"));
459  $form->addItem($enable);
460 
461  $linepicker = new ilColorPickerInputGUI($lng->txt("assessment_imap_line_color"), "imap_line_color");
462  $linepicker->setValue($imap_line_color);
463  $form->addItem($linepicker);
464 
465  if (@file_exists("./Modules/Test/classes/class.ilTestResultsToXML.php"))
466  {
467  global $ilDB;
468  $user_criteria = array_key_exists("user_criteria", $_GET) ? $_GET["user_criteria"] : $assessmentSetting->get("user_criteria");
469  $userCriteria = new ilSelectInputGUI($this->lng->txt("user_criteria"), "user_criteria");
470  $userCriteria->setInfo($this->lng->txt("user_criteria_desc"));
471  $userCriteria->setRequired(true);
472  $userCriteria->setValue(($isSingleline) ? 0 : 1);
473 
474  $manager = $ilDB->db->loadModule('Manager');
475  $fields = $manager->listTableFields('usr_data');
476  $usr_fields = array();
477  foreach ($fields as $field)
478  {
479  $usr_fields[$field] = $field;
480  }
481  $userCriteria->setOptions($usr_fields);
482  $userCriteria->setValue($user_criteria);
483  $form->addItem($userCriteria);
484  }
485 
486  if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
487  {
488  $form->addCommandButton("saveDefaults", $lng->txt("save"));
489  }
490 
491 
492  $tpl->setVariable("ADM_CONTENT", $form->getHTML());
493  }
494 
498  public function saveDefaultsObject()
499  {
500  global $ilCtrl;
501 
502  $assessmentSetting = new ilSetting("assessment");
503  if ($_POST["use_javascript"])
504  {
505  $assessmentSetting->set("use_javascript", "1");
506  }
507  else
508  {
509  $assessmentSetting->set("use_javascript", "0");
510  }
511  if (strlen($_POST["imap_line_color"]) == 6)
512  {
513  $assessmentSetting->set("imap_line_color", $_POST["imap_line_color"]);
514  }
515  if (@file_exists("./Modules/Test/classes/class.ilTestResultsToXML.php"))
516  {
517  $assessmentSetting->set("user_criteria", $_POST["user_criteria"]);
518  }
519  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
520  $ilCtrl->redirect($this, "defaults");
521  }
522 
523 
529  public function getTabs(&$tabs_gui)
530  {
531  global $rbacsystem, $lng;
532 
533  switch ($this->ctrl->getCmd())
534  {
535  case "logs":
536  case "showLog":
537  case "exportLog":
538  case "logAdmin":
539  case "deleteLog":
540  $this->getLogdataSubtabs();
541  break;
542  }
543 
544  if ($rbacsystem->checkAccess("visible,read",$this->object->getRefId()))
545  {
546  $tabs_gui->addTarget("settings",
547  $this->ctrl->getLinkTarget($this, "settings"), array("settings","","view"), "", "");
548 
549  $tabs_gui->addTarget("logs",
550  $this->ctrl->getLinkTarget($this, "logs"),
551  array("logs","showLog", "exportLog", "logAdmin", "deleteLog"),
552  "", "");
553 
554  $tabs_gui->addTarget("defaults",
555  $this->ctrl->getLinkTarget($this, "defaults"), array("defaults","saveDefaults"), "", "");
556 
557  $tabs_gui->addTab("templates",
558  $lng->txt("adm_settings_templates"),
559  $this->ctrl->getLinkTargetByClass("ilsettingstemplategui", ""));
560  }
561 
562  if ($rbacsystem->checkAccess('edit_permission',$this->object->getRefId()))
563  {
564  $tabs_gui->addTarget("perm_settings",
565  $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"), array("perm","info","owner"), 'ilpermissiongui');
566  }
567  }
568 
569 
575  public static function getSettingsTemplateConfig()
576  {
577  global $lng;
578 
579  $lng->loadLanguageModule("tst");
580  $lng->loadLanguageModule("assessment");
581 
582  include_once("./Services/Administration/classes/class.ilSettingsTemplateConfig.php");
583  $config = new ilSettingsTemplateConfig("tst");
584 
585  $config->addHidableTab("questions", $lng->txt('edit_test_questions'));
586  $config->addHidableTab("mark_schema", $lng->txt('settings') . ' - ' . $lng->txt("mark_schema"));
587  $config->addHidableTab("certificate", $lng->txt('settings') . ' - ' . $lng->txt("certificate"));
588  $config->addHidableTab("defaults", $lng->txt('settings') . ' - ' . $lng->txt("defaults"));
589 
590  $config->addHidableTab("learning_progress", $lng->txt("learning_progress"));
591  $config->addHidableTab("manscoring", $lng->txt("manscoring"));
592  $config->addHidableTab("history", $lng->txt("history"));
593  $config->addHidableTab("meta_data", $lng->txt("meta_data"));
594  $config->addHidableTab("export", $lng->txt("export"));
595  $config->addHidableTab("permissions", $lng->txt("permission"));
596 
598  // Settings
600 
601  //general properties
602  $config->addSetting(
603  "anonymity",
605  $lng->txt("tst_anonymity"),
606  false,
607  0,
608  array(
609  '0' => $lng->txt("tst_anonymity_no_anonymization"),
610  '1' => $lng->txt("tst_anonymity_anonymous_test"),
611  )
612  );
613 
614  $config->addSetting(
615  "title_output",
617  $lng->txt("tst_title_output"),
618  true,
619  0,
620  array(
621  '0' => $lng->txt("test_enable_view_table"),
622  '1' => $lng->txt("test_enable_view_express"),
623  '2' => $lng->txt("test_enable_view_both"),
624  )
625  );
626  $config->addSetting(
627  "random_test",
629  $lng->txt("tst_random_selection"),
630  true
631  );
632 
633  $config->addSetting(
634  "use_pool",
636  $lng->txt("test_question_pool_usage"),
637  true
638  );
639 
640  // Information at beginning and end of test
641  $config->addSetting(
642  "showinfo",
644  $lng->txt("showinfo"),
645  true
646  );
647 
648  $config->addSetting(
649  "showfinalstatement",
651  $lng->txt("final_statement_show"),
652  false
653  );
654 
655  // Session Settings
656  $config->addSetting(
657  "nr_of_tries",
659  $lng->txt("tst_nr_of_tries"),
660  false,
661  3
662  );
663 
664 
665  $config->addSetting(
666  "chb_processing_time",
668  $lng->txt("tst_processing_time"),
669  false
670  );
671 
672  $config->addSetting(
673  "chb_starting_time",
675  $lng->txt("tst_starting_time"),
676  false
677  );
678 
679  $config->addSetting(
680  "chb_ending_time",
682  $lng->txt("tst_ending_time"),
683  false
684  );
685 
686  $config->addSetting(
687  "password",
689  $lng->txt("tst_password"),
690  true,
691  20
692  );
693 
694  // Presentation Properties
695 
696  $config->addSetting(
697  "chb_use_previous_answers",
699  $lng->txt("tst_use_previous_answers"),
700  false
701  );
702  $config->addSetting(
703  "forcejs",
705  $lng->txt("forcejs_short"),
706  true
707  );
708 
709  $config->addSetting(
710  "title_output",
712  $lng->txt("tst_title_output"),
713  true,
714  0,
715  array(
716  '0' => $lng->txt("test_enable_view_table"),
717  '1' => $lng->txt("test_enable_view_express"),
718  '2' => $lng->txt("test_enable_view_both"),
719  )
720  );
721 
722  // Sequence Properties
723 
724  $config->addSetting(
725  "chb_postpone",
727  $lng->txt("tst_postpone"),
728  true
729  );
730  $config->addSetting(
731  "chb_shuffle_questions",
733  $lng->txt("tst_shuffle_questions"),
734  false
735  );
736  $config->addSetting(
737  "list_of_questions",
739  $lng->txt("tst_show_summary"),
740  false
741  );
742 
743  $config->addSetting(
744  "chb_show_marker",
746  $lng->txt("question_marking"),
747  true
748  );
749  $config->addSetting(
750  "chb_show_cancel",
752  $lng->txt("tst_show_cancel"),
753  true
754  );
755 
756  // Notifications
757 
758  $config->addSetting(
759  "mailnotification",
761  $lng->txt("tst_finish_notification"),
762  true,
763  0,
764  array(
765  '0' => $lng->txt("tst_finish_notification_no"),
766  '1' => $lng->txt("tst_finish_notification_simple"),
767  '2' => $lng->txt("tst_finish_notification_advanced"),
768  )
769  );
770 
771  $config->addSetting(
772  "mailnottype",
774  $lng->txt("mailnottype"),
775  true
776  );
777 
778  // Kiosk Mode
779 
780  $config->addSetting(
781  "kiosk",
783  $lng->txt("kiosk"),
784  true
785  );
786 
787 
788  // Participants Restriction
789 
790  $config->addSetting(
791  "fixedparticipants",
793  $lng->txt("participants_invitation"),
794  true
795  );
796 
797  $config->addSetting(
798  "allowedUsers",
800  $lng->txt("tst_allowed_users"),
801  true,
802  3
803  );
804 
805  $config->addSetting(
806  "allowedUsersTimeGap",
808  $lng->txt("tst_allowed_users_time_gap"),
809  true,
810  4
811  );
812 
814  // Scoring and Results
816 
817  $config->addSetting(
818  "count_system",
820  $lng->txt("tst_text_count_system"),
821  true,
822  0,
823  array(
824  '0' => $lng->txt("tst_count_partial_solutions"),
825  '1' => $lng->txt("tst_count_correct_solutions"),
826  )
827  );
828 
829  $config->addSetting(
830  "mc_scoring",
832  $lng->txt("tst_score_mcmr_questions"),
833  true,
834  0,
835  array(
836  '0' => $lng->txt("tst_score_mcmr_zero_points_when_unanswered"),
837  '1' => $lng->txt("tst_score_mcmr_use_scoring_system"),
838  )
839  );
840 
841  $config->addSetting(
842  "score_cutting",
844  $lng->txt("tst_score_cutting"),
845  true,
846  0,
847  array(
848  '0' => $lng->txt("tst_score_cut_question"),
849  '1' => $lng->txt("tst_score_cut_test"),
850  )
851  );
852 
853  $config->addSetting(
854  "pass_scoring",
856  $lng->txt("tst_score_cutting"),
857  false,
858  0,
859  array(
860  '0' => $lng->txt("tst_pass_last_pass"),
861  '1' => $lng->txt("tst_pass_best_pass"),
862  )
863  );
864 
865  $config->addSetting(
866  "instant_feedback",
868  $lng->txt("tst_instant_feedback"),
869  false,
870  0,
871  array(
872  'instant_feedback_answer' => $lng->txt("tst_instant_feedback_answer_specific"),
873  'instant_feedback_points' => $lng->txt("tst_instant_feedback_results"),
874  'instant_feedback_solution' => $lng->txt("tst_instant_feedback_solution"),
875  )
876  );
877 
878  $config->addSetting(
879  "results_access",
881  $lng->txt("tst_results_access"),
882  false,
883  0,
884  array(
885  '1' => $lng->txt("tst_results_access_finished"),
886  '2' => $lng->txt("tst_results_access_always"),
887  '3' => $lng->txt("tst_results_access_never"),
888  '4' => $lng->txt("tst_results_access_date"),
889  )
890  );
891 
892  $config->addSetting(
893  "results_presentation",
895  $lng->txt("tst_results_presentation"),
896  false,
897  0,
898  array(
899  'pass_details' => $lng->txt("tst_show_pass_details"),
900  'solution_details' => $lng->txt("tst_show_solution_details"),
901  'solution_printview' => $lng->txt("tst_show_solution_printview"),
902  'solution_feedback' => $lng->txt("tst_show_solution_feedback"),
903  'solution_answers_only' => $lng->txt("tst_show_solution_answers_only"),
904  'solution_signature' => $lng->txt("tst_show_solution_signature"),
905  'solution_suggested' => $lng->txt("tst_show_solution_suggested"),
906  )
907  );
908 
909  $config->addSetting(
910  "export_settings",
912  $lng->txt("tst_export_settings"),
913  true
914  );
915  return $config;
916  }
917 
918 } // END class.ilObjAssessmentFolderGUI
919 ?>