24 include_once
"./classes/class.ilObjectGUI.php";
49 $this->
ilObjectGUI($a_data,$a_id,$a_call_by_reference,
false);
51 if (!$rbacsystem->checkAccess(
'read',$this->object->getRefId()))
53 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read_assf"),$this->ilias->error_obj->WARNING);
59 $next_class = $this->ctrl->getNextClass($this);
60 $cmd = $this->ctrl->getCmd();
65 case 'ilpermissiongui':
66 include_once(
"./classes/class.ilPermissionGUI.php");
68 $ret =& $this->ctrl->forwardCommand($perm_gui);
107 $this->ctrl->redirect($this);
116 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.assessment_settings.html");
118 include_once
"./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php";
120 $manscoring = $this->
object->_getManualScoring();
121 foreach ($questiontypes as $type_name => $qtype)
123 $type_id = $qtype[
"question_type_id"];
124 $this->tpl->setCurrentBlock(
"manual_scoring");
125 $this->tpl->setVariable(
"VALUE_MANUAL_SCORING", $type_id);
126 $this->tpl->setVariable(
"TXT_MANUAL_SCORING", $type_name);
127 if (in_array($type_id, $manscoring))
129 $this->tpl->setVariable(
"CHECKED_MANUAL_SCORING",
" checked=\"checked\"");
131 $this->tpl->parseCurrentBlock();
133 $this->tpl->setCurrentBlock(
"allowed_questiontypes");
134 $this->tpl->setVariable(
"VALUE_ALLOWED_QUESTIONTYPES", $type_id);
135 $this->tpl->setVariable(
"TEXT_ALLOWED_QUESTIONTYPES", $type_name);
136 $forbidden_types = $this->
object->_getForbiddenQuestionTypes();
137 if (!in_array($type_id, $forbidden_types))
139 $this->tpl->setVariable(
"CHECKED_ALLOWED_QUESTIONTYPES",
" checked=\"checked\"");
141 $this->tpl->parseCurrentBlock();
144 $this->tpl->setCurrentBlock(
"adm_content");
145 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
146 $this->tpl->setVariable(
"TXT_LOGGING", $this->lng->txt(
"assessment_log_logging"));
147 $this->tpl->setVariable(
"TXT_ACTIVATE_ASSESSMENT_LOGGING", $this->lng->txt(
"activate_assessment_logging"));
148 $this->tpl->setVariable(
"TXT_ASSESSMENT_SETTINGS", $this->lng->txt(
"assessment_settings"));
149 $this->tpl->setVariable(
"TXT_REPORTING_LANGUAGE", $this->lng->txt(
"assessment_settings_reporting_language"));
150 $languages = $this->lng->getInstalledLanguages();
151 $default_language = $this->
object->_getLogLanguage();
152 if (!in_array($default_language, $languages))
154 $default_language =
"en";
156 foreach ($languages as $key)
158 $this->tpl->setCurrentBlock(
"reporting_lang_row");
159 $this->tpl->setVariable(
"LANG_VALUE", $key);
160 $this->tpl->setVariable(
"LANG_NAME", $this->lng->txt(
"lang_" . $key));
161 if (strcmp($default_language, $key) == 0)
163 $this->tpl->setVariable(
"LANG_SELECTED",
" selected=\"selected\"");
165 $this->tpl->parseCurrentBlock();
168 $this->tpl->setVariable(
"TXT_QUESTIONTYPES_HEADER", $this->lng->txt(
"assf_questiontypes"));
169 $this->tpl->setVariable(
"TXT_ALLOWED_QUESTIONTYPES", $this->lng->txt(
"assf_allowed_questiontypes"));
170 $this->tpl->setVariable(
"TXT_ALLOWED_QUESTIONTYPES_DESCRIPTION", $this->lng->txt(
"assf_allowed_questiontypes_desc"));
171 $this->tpl->setVariable(
"TXT_MANUAL_SCORING_DESCRIPTION", $this->lng->txt(
"assessment_log_manual_scoring_desc"));
172 $this->tpl->setVariable(
"TXT_MANUAL_SCORING_ACTIVATE", $this->lng->txt(
"assessment_log_manual_scoring_activate"));
173 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
175 if($this->object->_enabledAssessmentLogging())
177 $this->tpl->setVariable(
"ASSESSMENT_LOGGING_CHECKED",
" checked=\"checked\"");
180 $this->tpl->parseCurrentBlock();
188 if ($_POST[
"chb_assessment_logging"] == 1)
190 $this->
object->_enableAssessmentLogging(1);
194 $this->
object->_enableAssessmentLogging(0);
196 $this->
object->_setLogLanguage($_POST[
"reporting_language"]);
197 $this->
object->_setManualScoring($_POST[
"chb_manual_scoring"]);
198 include_once
"./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php";
200 $forbidden_types = array();
201 foreach ($questiontypes as $name => $row)
203 if (!in_array($row[
"question_type_id"], $_POST[
"chb_allowed_questiontypes"]))
205 array_push($forbidden_types, $row[
"question_type_id"]);
208 $this->
object->_setForbiddenQuestionTypes($forbidden_types);
211 $this->ctrl->redirect($this,
'settings');
235 $this->lng->loadLanguageModule(
"jscalendar");
236 $this->tpl->addBlockFile(
"CALENDAR_LANG_JAVASCRIPT",
"calendar_javascript",
"tpl.calendar.html");
237 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.assessment_logs.html");
238 $this->tpl->setCurrentBlock(
"calendar_javascript");
239 $this->tpl->setVariable(
"FULL_SUNDAY", $this->lng->txt(
"l_su"));
240 $this->tpl->setVariable(
"FULL_MONDAY", $this->lng->txt(
"l_mo"));
241 $this->tpl->setVariable(
"FULL_TUESDAY", $this->lng->txt(
"l_tu"));
242 $this->tpl->setVariable(
"FULL_WEDNESDAY", $this->lng->txt(
"l_we"));
243 $this->tpl->setVariable(
"FULL_THURSDAY", $this->lng->txt(
"l_th"));
244 $this->tpl->setVariable(
"FULL_FRIDAY", $this->lng->txt(
"l_fr"));
245 $this->tpl->setVariable(
"FULL_SATURDAY", $this->lng->txt(
"l_sa"));
246 $this->tpl->setVariable(
"SHORT_SUNDAY", $this->lng->txt(
"s_su"));
247 $this->tpl->setVariable(
"SHORT_MONDAY", $this->lng->txt(
"s_mo"));
248 $this->tpl->setVariable(
"SHORT_TUESDAY", $this->lng->txt(
"s_tu"));
249 $this->tpl->setVariable(
"SHORT_WEDNESDAY", $this->lng->txt(
"s_we"));
250 $this->tpl->setVariable(
"SHORT_THURSDAY", $this->lng->txt(
"s_th"));
251 $this->tpl->setVariable(
"SHORT_FRIDAY", $this->lng->txt(
"s_fr"));
252 $this->tpl->setVariable(
"SHORT_SATURDAY", $this->lng->txt(
"s_sa"));
253 $this->tpl->setVariable(
"FULL_JANUARY", $this->lng->txt(
"l_01"));
254 $this->tpl->setVariable(
"FULL_FEBRUARY", $this->lng->txt(
"l_02"));
255 $this->tpl->setVariable(
"FULL_MARCH", $this->lng->txt(
"l_03"));
256 $this->tpl->setVariable(
"FULL_APRIL", $this->lng->txt(
"l_04"));
257 $this->tpl->setVariable(
"FULL_MAY", $this->lng->txt(
"l_05"));
258 $this->tpl->setVariable(
"FULL_JUNE", $this->lng->txt(
"l_06"));
259 $this->tpl->setVariable(
"FULL_JULY", $this->lng->txt(
"l_07"));
260 $this->tpl->setVariable(
"FULL_AUGUST", $this->lng->txt(
"l_08"));
261 $this->tpl->setVariable(
"FULL_SEPTEMBER", $this->lng->txt(
"l_09"));
262 $this->tpl->setVariable(
"FULL_OCTOBER", $this->lng->txt(
"l_10"));
263 $this->tpl->setVariable(
"FULL_NOVEMBER", $this->lng->txt(
"l_11"));
264 $this->tpl->setVariable(
"FULL_DECEMBER", $this->lng->txt(
"l_12"));
265 $this->tpl->setVariable(
"SHORT_JANUARY", $this->lng->txt(
"s_01"));
266 $this->tpl->setVariable(
"SHORT_FEBRUARY", $this->lng->txt(
"s_02"));
267 $this->tpl->setVariable(
"SHORT_MARCH", $this->lng->txt(
"s_03"));
268 $this->tpl->setVariable(
"SHORT_APRIL", $this->lng->txt(
"s_04"));
269 $this->tpl->setVariable(
"SHORT_MAY", $this->lng->txt(
"s_05"));
270 $this->tpl->setVariable(
"SHORT_JUNE", $this->lng->txt(
"s_06"));
271 $this->tpl->setVariable(
"SHORT_JULY", $this->lng->txt(
"s_07"));
272 $this->tpl->setVariable(
"SHORT_AUGUST", $this->lng->txt(
"s_08"));
273 $this->tpl->setVariable(
"SHORT_SEPTEMBER", $this->lng->txt(
"s_09"));
274 $this->tpl->setVariable(
"SHORT_OCTOBER", $this->lng->txt(
"s_10"));
275 $this->tpl->setVariable(
"SHORT_NOVEMBER", $this->lng->txt(
"s_11"));
276 $this->tpl->setVariable(
"SHORT_DECEMBER", $this->lng->txt(
"s_12"));
277 $this->tpl->setVariable(
"ABOUT_CALENDAR", $this->lng->txt(
"about_calendar"));
278 $this->tpl->setVariable(
"ABOUT_CALENDAR_LONG", $this->lng->txt(
"about_calendar_long"));
279 $this->tpl->setVariable(
"ABOUT_TIME_LONG", $this->lng->txt(
"about_time"));
280 $this->tpl->setVariable(
"PREV_YEAR", $this->lng->txt(
"prev_year"));
281 $this->tpl->setVariable(
"PREV_MONTH", $this->lng->txt(
"prev_month"));
282 $this->tpl->setVariable(
"GO_TODAY", $this->lng->txt(
"go_today"));
283 $this->tpl->setVariable(
"NEXT_MONTH", $this->lng->txt(
"next_month"));
284 $this->tpl->setVariable(
"NEXT_YEAR", $this->lng->txt(
"next_year"));
285 $this->tpl->setVariable(
"SEL_DATE", $this->lng->txt(
"select_date"));
286 $this->tpl->setVariable(
"DRAG_TO_MOVE", $this->lng->txt(
"drag_to_move"));
287 $this->tpl->setVariable(
"PART_TODAY", $this->lng->txt(
"part_today"));
288 $this->tpl->setVariable(
"DAY_FIRST", $this->lng->txt(
"day_first"));
289 $this->tpl->setVariable(
"CLOSE", $this->lng->txt(
"close"));
290 $this->tpl->setVariable(
"TODAY", $this->lng->txt(
"today"));
291 $this->tpl->setVariable(
"TIME_PART", $this->lng->txt(
"time_part"));
292 $this->tpl->setVariable(
"DEF_DATE_FORMAT", $this->lng->txt(
"def_date_format"));
293 $this->tpl->setVariable(
"TT_DATE_FORMAT", $this->lng->txt(
"tt_date_format"));
294 $this->tpl->setVariable(
"WK", $this->lng->txt(
"wk"));
295 $this->tpl->setVariable(
"TIME", $this->lng->txt(
"time"));
296 $this->tpl->parseCurrentBlock();
297 $this->tpl->setCurrentBlock(
"CalendarJS");
298 $this->tpl->setVariable(
"LOCATION_JAVASCRIPT_CALENDAR",
"./Modules/Test/js/calendar/calendar.js");
299 $this->tpl->setVariable(
"LOCATION_JAVASCRIPT_CALENDAR_SETUP",
"./Modules/Test/js/calendar/calendar-setup.js");
300 $this->tpl->setVariable(
"LOCATION_JAVASCRIPT_CALENDAR_STYLESHEET",
"./Modules/Test/js/calendar/calendar.css");
301 $this->tpl->parseCurrentBlock();
302 $this->tpl->setCurrentBlock(
"javascript_call_calendar");
303 $this->tpl->setVariable(
"INPUT_FIELDS_STARTING_DATE",
"starting_date");
304 $this->tpl->setVariable(
"INPUT_FIELDS_ENDING_DATE",
"ending_date");
305 $this->tpl->setVariable(
"INPUT_FIELDS_REPORTING_DATE",
"reporting_date");
306 $this->tpl->parseCurrentBlock();
307 include_once
"./Modules/Test/classes/class.ilObjTest.php";
308 include_once
"./Modules/TestQuestionPool/classes/class.assQuestion.php";
310 foreach ($available_tests as $key => $value)
312 $this->tpl->setCurrentBlock(
"sel_test_row");
313 $this->tpl->setVariable(
"TXT_OPTION",
ilUtil::prepareFormOutput($value) .
" [" . $this->object->getNrOfLogEntries($key) .
" " . $this->lng->txt(
"assessment_log_log_entries") .
"]");
314 $this->tpl->setVariable(
"VALUE_OPTION", $key);
315 if (($_POST[
"sel_test"] > -1) && ($_POST[
"sel_test"] == $key))
317 $this->tpl->setVariable(
"SELECTED_OPTION",
" selected=\"selected\"");
319 $this->tpl->parseCurrentBlock();
322 if ((strcmp($this->ctrl->getCmd(),
"showLog") == 0) ||
323 (strcmp($this->ctrl->getCmd(),
"exportLog") == 0))
325 include_once
"./Services/Utilities/classes/class.ilUtil.php";
328 if (strcmp($this->ctrl->getCmd(),
"exportLog") == 0)
331 $this->lng->txt(
"assessment_log_datetime"),
332 $this->lng->txt(
"user"),
333 $this->lng->txt(
"assessment_log_text"),
334 $this->lng->txt(
"question")
338 $ts_from = sprintf(
"%04d%02d%02d%02d%02d%02d", $_POST[
"log_from_date"][
"y"], $_POST[
"log_from_date"][
"m"], $_POST[
"log_from_date"][
"d"], $_POST[
"log_from_time"][
"h"], $_POST[
"log_from_time"][
"m"], 0);
339 $ts_to = sprintf(
"%04d%02d%02d%02d%02d%02d", $_POST[
"log_to_date"][
"y"], $_POST[
"log_to_date"][
"m"], $_POST[
"log_to_date"][
"d"], $_POST[
"log_to_time"][
"h"], $_POST[
"log_to_time"][
"m"], 0);
340 $log_output =& $this->
object->getLog($ts_from, $ts_to, $_POST[
"sel_test"]);
342 foreach ($log_output as $key =>
$log)
344 if (array_key_exists(
"value1",
$log))
346 $tblrow = array(
"tblrow1light",
"tblrow2light");
350 $tblrow = array(
"tblrow1",
"tblrow2");
353 if (!array_key_exists(
$log[
"user_fi"], $users))
357 $this->tpl->setCurrentBlock(
"output_row");
358 $this->tpl->setVariable(
"ROW_CLASS", $tblrow[$key % 2]);
360 $this->tpl->setVariable(
"TXT_DATETIME",$date->get(
IL_CAL_FKT_DATE,
'Y-m-d H:i'));
362 if (strcmp($this->ctrl->getCmd(),
"exportLog") == 0)
368 if (
$log[
"question_fi"] ||
$log[
"original_fi"])
375 $title = $this->lng->txt(
"assessment_log_question") .
": " .
$title;
377 $this->tpl->setVariable(
"TXT_USER", trim($users[
$log[
"user_fi"]][
"title"] .
" " . $users[
$log[
"user_fi"]][
"firstname"] .
" " . $users[
$log[
"user_fi"]][
"lastname"]));
378 if (strcmp($this->ctrl->getCmd(),
"exportLog") == 0)
380 array_push($csvrow, trim($users[$log[
"user_fi"]][
"title"] .
" " . $users[$log[
"user_fi"]][
"firstname"] .
" " . $users[$log[
"user_fi"]][
"lastname"]));
382 if (array_key_exists(
"value1", $log))
392 if (strcmp($this->ctrl->getCmd(),
"exportLog") == 0)
394 array_push($csvrow, $this->lng->txt(
"assessment_log_user_answer"));
395 array_push($csvrow,
$title);
408 if (strcmp($this->ctrl->getCmd(),
"exportLog") == 0)
410 array_push($csvrow, trim($log[
"logtext"]));
411 array_push($csvrow,
$title);
414 $this->tpl->parseCurrentBlock();
415 if (strcmp($this->ctrl->getCmd(),
"exportLog") == 0)
420 if (count($log_output) == 0)
422 $this->tpl->setCurrentBlock(
"empty_row");
423 $this->tpl->setVariable(
"TXT_NOLOG", $this->lng->txt(
"assessment_log_no_log"));
424 $this->tpl->parseCurrentBlock();
428 if (strcmp($this->ctrl->getCmd(),
"exportLog") == 0)
431 foreach ($csv as $row)
435 ilUtil::deliverData($csvoutput, str_replace(
" ",
"_",
"log_" . $ts_from .
"_" . $ts_to .
"_" . $available_tests[$_POST[
"sel_test"]]).
".csv");
439 $this->tpl->setCurrentBlock(
"log_output");
440 $this->tpl->setVariable(
"HEADER_DATETIME", $this->lng->txt(
"assessment_log_datetime"));
441 $this->tpl->setVariable(
"HEADER_USER", $this->lng->txt(
"user"));
442 $this->tpl->setVariable(
"HEADER_LOGTEXT", $this->lng->txt(
"assessment_log_text"));
443 $this->tpl->parseCurrentBlock();
446 $this->tpl->setCurrentBlock(
"adm_content");
447 $this->tpl->setVariable(
"FORMACTION",
448 $this->ctrl->getFormAction($this));
449 $this->tpl->setVariable(
"TXT_ASSESSMENT_LOG", $this->lng->txt(
"assessment_log"));
450 $this->tpl->setVariable(
"TXT_LOG_FROM", $this->lng->txt(
"from"));
451 if (!is_array($_POST[
"log_from_date"]))
458 $date_input =
ilUtil::makeDateSelect(
"log_from_date", $_POST[
"log_from_date"][
"y"], $_POST[
"log_from_date"][
"m"], $_POST[
"log_from_date"][
"d"], 2004);
459 $time_input =
ilUtil::makeTimeSelect(
"log_from_time", TRUE, $_POST[
"log_from_time"][
"h"], $_POST[
"log_from_time"][
"m"]);
461 $this->tpl->setVariable(
"INPUT_LOG_FROM", $date_input.
" / ".$time_input);
463 $this->tpl->setVariable(
"TXT_LOG_FROM_CALENDAR", $this->lng->txt(
"assessment_log_open_calendar"));
464 $this->tpl->setVariable(
"INPUT_FIELDS_LOG_FROM",
"log_from_date");
465 $this->tpl->setVariable(
"TXT_LOG_TO", $this->lng->txt(
"to"));
466 if (!is_array($_POST[
"log_to_date"]))
473 $date_input =
ilUtil::makeDateSelect(
"log_to_date", $_POST[
"log_to_date"][
"y"], $_POST[
"log_to_date"][
"m"], $_POST[
"log_to_date"][
"d"], 2004);
474 $time_input =
ilUtil::makeTimeSelect(
"log_to_time", TRUE, $_POST[
"log_to_time"][
"h"], $_POST[
"log_to_time"][
"m"]);
476 $this->tpl->setVariable(
"INPUT_LOG_TO", $date_input.
" / ".$time_input);
477 $this->tpl->setVariable(
"TXT_LOG_TO_CALENDAR", $this->lng->txt(
"assessment_log_open_calendar"));
478 $this->tpl->setVariable(
"INPUT_FIELDS_LOG_TO",
"log_to_date");
479 $this->tpl->setVariable(
"TXT_CREATE", $this->lng->txt(
"show"));
480 $this->tpl->setVariable(
"TXT_EXPORT", $this->lng->txt(
"export"));
481 $this->tpl->setVariable(
"TXT_TEST", $this->lng->txt(
"assessment_log_for_test"));
482 $this->tpl->setVariable(
"TXT_SELECT_TEST", $this->lng->txt(
"assessment_log_select_test"));
483 $this->tpl->parseCurrentBlock();
493 if (is_array($_POST[
"chb_test"]) && (count($_POST[
"chb_test"])))
495 $this->
object->deleteLogEntries($_POST[
"chb_test"]);
514 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.assessment_log_admin.html");
517 include_once
"./Modules/Test/classes/class.ilObjTest.php";
519 $count = count($available_tests);
526 $path = $this->
object->getFullPath(
$ref_id);
528 $nr = $this->
object->getNrOfLogEntries(
$obj_id);
529 array_push(
$data, array(
"<input type=\"checkbox\" name=\"chb_test[]\" value=\"$obj_id\" />",
$title, $nr, $path));
532 $offset = (
$_GET[
"offset"]) ?
$_GET[
"offset"] : 0;
533 $orderdirection = (
$_GET[
"sort_order"]) ?
$_GET[
"sort_order"] :
"asc";
534 $ordercolumn = (
$_GET[
"sort_by"]) ?
$_GET[
"sort_by"] :
"title";
536 $maxentries = $ilUser->getPref(
"hits_per_page");
542 include_once(
"./Services/Table/classes/class.ilTableGUI.php");
544 $table->setTitle($this->lng->txt(
"ass_log_available_tests"));
546 $header_names = array(
548 $this->lng->txt(
"title"),
549 $this->lng->txt(
"ass_log_count_datasets"),
550 $this->lng->txt(
"ass_log_path")
552 $table->setHeaderNames($header_names);
554 $table->enable(
"auto_sort");
555 $table->enable(
"sort");
556 $table->enable(
"select_all");
557 $table->enable(
"action");
558 $table->setLimit($maxentries);
560 $table->addActionButton(
"deleteLog", $this->lng->txt(
"ass_log_delete_entries"));
562 $table->setFormName(
"formLogAdmin");
563 $table->setSelectAllCheckbox(
"chb_test");
564 $header_params = $this->ctrl->getParameterArray($this,
"logAdmin");
565 $header_vars = array(
"",
"title",
"count",
"path");
566 $table->setHeaderVars($header_vars, $header_params);
567 $table->setFooter(
"tblfooter", $this->lng->txt(
"previous"), $this->lng->txt(
"next"));
569 $table->setOffset($offset);
570 $table->setMaxCount(count($available_tests));
571 $table->setOrderColumn($ordercolumn);
572 $table->setOrderDirection($orderdirection);
573 $table->setData(
$data);
576 $table->setFooter(
"tblfooter", $this->lng->txt(
"previous"), $this->lng->txt(
"next"));
579 $tableoutput = $table->render();
580 $this->tpl->setVariable(
"TABLE_DATA", $tableoutput);
581 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this,
"deleteLog"));
595 $ilTabs->addSubTabTarget(
"ass_log_output",
596 $this->ctrl->getLinkTarget($this,
"logs"),
597 array(
"logs",
"showLog",
"exportLog")
601 $ilTabs->addSubTabTarget(
"ass_log_admin",
602 $this->ctrl->getLinkTarget($this,
"logAdmin"),
603 array(
"logAdmin",
"deleteLog"),
617 $assessmentSetting =
new ilSetting(
"assessment");
618 $use_javascript = array_key_exists(
"use_javascript",
$_GET) ?
$_GET[
"use_javascript"] : $assessmentSetting->get(
"use_javascript");
619 $imap_line_color = array_key_exists(
"imap_line_color",
$_GET) ?
$_GET[
"imap_line_color"] : $assessmentSetting->get(
"imap_line_color");
620 if (strlen($imap_line_color) == 0) $imap_line_color =
"FF0000";
622 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
624 $this->ilias->raiseError($this->lng->txt(
"permission_denied"),$this->ilias->error_obj->MESSAGE);
627 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
629 $form->setFormAction($ilCtrl->getFormAction($this));
630 $form->setTitle($lng->txt(
"assessment_defaults"));
633 $enable =
new ilCheckboxInputGUI($lng->txt(
"assessment_use_javascript"),
"use_javascript");
635 $enable->setInfo($lng->txt(
"assessment_use_javascript_desc"));
636 $form->addItem($enable);
639 $linepicker->
setValue($imap_line_color);
640 $form->addItem($linepicker);
642 $form->addCommandButton(
"saveDefaults", $lng->txt(
"save"));
643 $form->addCommandButton(
"defaults", $lng->txt(
"cancel"));
645 $tpl->setVariable(
"ADM_CONTENT", $form->getHTML());
657 $assessmentSetting =
new ilSetting(
"assessment");
658 if ($_POST[
"use_javascript"])
660 $assessmentSetting->set(
"use_javascript",
"1");
664 $assessmentSetting->set(
"use_javascript",
"0");
666 if (strlen($_POST[
"imap_line_color"]) == 6)
668 $assessmentSetting->set(
"imap_line_color", $_POST[
"imap_line_color"]);
670 $ilCtrl->redirect($this,
"defaults");
683 switch ($this->ctrl->getCmd())
694 if ($rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
696 $tabs_gui->addTarget(
"settings",
697 $this->ctrl->getLinkTarget($this,
"settings"), array(
"settings",
"",
"view"),
"",
"");
699 $tabs_gui->addTarget(
"logs",
700 $this->ctrl->getLinkTarget($this,
"logs"),
701 array(
"logs",
"showLog",
"exportLog",
"logAdmin",
"deleteLog"),
704 $tabs_gui->addTarget(
"defaults",
705 $this->ctrl->getLinkTarget($this,
"defaults"), array(
"defaults",
"saveDefaults"),
"",
"");
708 if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
710 $tabs_gui->addTarget(
"perm_settings",
711 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"), array(
"perm",
"info",
"owner"),
'ilpermissiongui');