本文整理汇总了PHP中ilObjTest::getShowSolutionSignature方法的典型用法代码示例。如果您正苦于以下问题:PHP ilObjTest::getShowSolutionSignature方法的具体用法?PHP ilObjTest::getShowSolutionSignature怎么用?PHP ilObjTest::getShowSolutionSignature使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilObjTest
的用法示例。
在下文中一共展示了ilObjTest::getShowSolutionSignature方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getResultsSignature
/**
* Returns HTML code for a signature field
*
* @return string HTML code of the date and signature field for the test results
* @access public
*/
function getResultsSignature()
{
if ($this->object->getShowSolutionSignature() && !$this->object->getAnonymity()) {
// output of time/date and signature
$template = new ilTemplate("tpl.il_as_tst_results_userdata_signature.html", TRUE, TRUE, "Modules/Test");
$template->setVariable("TXT_DATE", $this->lng->txt("date"));
$template->setVariable("VALUE_DATE", strftime("%Y-%m-%d %H:%M:%S", time()));
$template->setVariable("TXT_SIGNATURE", $this->lng->txt("tst_signature"));
$template->setVariable("IMG_SPACER", ilUtil::getImagePath("spacer.png"));
return $template->get();
} else {
return "";
}
}
示例2: getResultsSignature
/**
* Returns HTML code for a signature field
*
* @return string HTML code of the date and signature field for the test results
* @access public
*/
function getResultsSignature()
{
if ($this->object->getShowSolutionSignature() && !$this->object->getAnonymity()) {
$template = new ilTemplate("tpl.il_as_tst_results_userdata_signature.html", TRUE, TRUE, "Modules/Test");
$template->setVariable("TXT_DATE", $this->lng->txt("date"));
$old_value = ilDatePresentation::useRelativeDates();
ilDatePresentation::setUseRelativeDates(false);
$template->setVariable("VALUE_DATE", ilDatePresentation::formatDate(new ilDate(time(), IL_CAL_UNIX)));
ilDatePresentation::setUseRelativeDates($old_value);
$template->setVariable("TXT_SIGNATURE", $this->lng->txt("tst_signature"));
$template->setVariable("IMG_SPACER", ilUtil::getImagePath("spacer.png"));
return $template->get();
} else {
return "";
}
}
示例3: addResultDetailsSettingsFormSection
//.........这里部分代码省略.........
// show solution feedback ==> solution feedback in test results
$showSolutionFeedbackOption = new ilCheckboxInputGUI($this->lng->txt('tst_show_solution_feedback'), 'solution_feedback');
$showSolutionFeedbackOption->setInfo($this->lng->txt('tst_show_solution_feedback_desc'));
$showSolutionFeedbackOption->setChecked($this->testOBJ->getShowSolutionFeedback());
$form->addItem($showSolutionFeedbackOption);
// show suggested solution
$showSuggestedSolutionOption = new ilCheckboxInputGUI($this->lng->txt('tst_show_solution_suggested'), 'solution_suggested');
$showSuggestedSolutionOption->setInfo($this->lng->txt('tst_show_solution_suggested_desc'));
$showSuggestedSolutionOption->setChecked($this->testOBJ->getShowSolutionSuggested());
$form->addItem($showSuggestedSolutionOption);
// show solution printview ==> list of answers
$showSolutionPrintview = new ilCheckboxInputGUI($this->lng->txt('tst_show_solution_printview'), 'solution_printview');
$showSolutionPrintview->setInfo($this->lng->txt('tst_show_solution_printview_desc'));
$showSolutionPrintview->setChecked($this->testOBJ->getShowSolutionPrintview());
$form->addItem($showSolutionPrintview);
// show best solution in list of answers
$solutionCompareInput = new ilCheckboxInputGUI($this->lng->txt('tst_show_solution_compare'), 'solution_compare');
$solutionCompareInput->setChecked($this->testOBJ->getShowSolutionListComparison());
$showSolutionPrintview->addSubItem($solutionCompareInput);
// solution answers only ==> printview of results (answers only)
$solutionAnswersOnly = new ilCheckboxInputGUI($this->lng->txt('tst_show_solution_answers_only'), 'solution_answers_only');
$solutionAnswersOnly->setInfo($this->lng->txt('tst_show_solution_answers_only_desc'));
$solutionAnswersOnly->setChecked($this->testOBJ->getShowSolutionAnswersOnly());
$showSolutionPrintview->addSubItem($solutionAnswersOnly);
// high score
$highscore = new ilCheckboxInputGUI($this->lng->txt("tst_highscore_enabled"), "highscore_enabled");
$highscore->setValue(1);
$highscore->setChecked($this->testOBJ->getHighscoreEnabled());
$highscore->setInfo($this->lng->txt("tst_highscore_description"));
$form->addItem($highscore);
$highscore_tables = new ilRadioGroupInputGUI($this->lng->txt('tst_highscore_mode'), 'highscore_mode');
$highscore_tables->setRequired(true);
$highscore_tables->setValue($this->testOBJ->getHighscoreMode());
$highscore_table_own = new ilRadioOption($this->lng->txt('tst_highscore_own_table'), ilObjTest::HIGHSCORE_SHOW_OWN_TABLE);
$highscore_table_own->setInfo($this->lng->txt('tst_highscore_own_table_description'));
$highscore_tables->addOption($highscore_table_own);
$highscore_table_other = new ilRadioOption($this->lng->txt('tst_highscore_top_table'), ilObjTest::HIGHSCORE_SHOW_TOP_TABLE);
$highscore_table_other->setInfo($this->lng->txt('tst_highscore_top_table_description'));
$highscore_tables->addOption($highscore_table_other);
$highscore_table_other = new ilRadioOption($this->lng->txt('tst_highscore_all_tables'), ilObjTest::HIGHSCORE_SHOW_ALL_TABLES);
$highscore_table_other->setInfo($this->lng->txt('tst_highscore_all_tables_description'));
$highscore_tables->addOption($highscore_table_other);
$highscore->addSubItem($highscore_tables);
$highscore_top_num = new ilNumberInputGUI($this->lng->txt("tst_highscore_top_num"), "highscore_top_num");
$highscore_top_num->setSize(4);
$highscore_top_num->setRequired(true);
$highscore_top_num->setMinValue(1);
$highscore_top_num->setSuffix($this->lng->txt("tst_highscore_top_num_unit"));
$highscore_top_num->setValue($this->testOBJ->getHighscoreTopNum(null));
$highscore_top_num->setInfo($this->lng->txt("tst_highscore_top_num_description"));
$highscore->addSubItem($highscore_top_num);
$highscore_anon = new ilCheckboxInputGUI($this->lng->txt("tst_highscore_anon"), "highscore_anon");
$highscore_anon->setValue(1);
$highscore_anon->setChecked($this->testOBJ->getHighscoreAnon());
$highscore_anon->setInfo($this->lng->txt("tst_highscore_anon_description"));
$highscore->addSubItem($highscore_anon);
$highscore_achieved_ts = new ilCheckboxInputGUI($this->lng->txt("tst_highscore_achieved_ts"), "highscore_achieved_ts");
$highscore_achieved_ts->setValue(1);
$highscore_achieved_ts->setChecked($this->testOBJ->getHighscoreAchievedTS());
$highscore_achieved_ts->setInfo($this->lng->txt("tst_highscore_achieved_ts_description"));
$highscore->addSubItem($highscore_achieved_ts);
$highscore_score = new ilCheckboxInputGUI($this->lng->txt("tst_highscore_score"), "highscore_score");
$highscore_score->setValue(1);
$highscore_score->setChecked($this->testOBJ->getHighscoreScore());
$highscore_score->setInfo($this->lng->txt("tst_highscore_score_description"));
$highscore->addSubItem($highscore_score);
$highscore_percentage = new ilCheckboxInputGUI($this->lng->txt("tst_highscore_percentage"), "highscore_percentage");
$highscore_percentage->setValue(1);
$highscore_percentage->setChecked($this->testOBJ->getHighscorePercentage());
$highscore_percentage->setInfo($this->lng->txt("tst_highscore_percentage_description"));
$highscore->addSubItem($highscore_percentage);
$highscore_hints = new ilCheckboxInputGUI($this->lng->txt("tst_highscore_hints"), "highscore_hints");
$highscore_hints->setValue(1);
$highscore_hints->setChecked($this->testOBJ->getHighscoreHints());
$highscore_hints->setInfo($this->lng->txt("tst_highscore_hints_description"));
$highscore->addSubItem($highscore_hints);
$highscore_wtime = new ilCheckboxInputGUI($this->lng->txt("tst_highscore_wtime"), "highscore_wtime");
$highscore_wtime->setValue(1);
$highscore_wtime->setChecked($this->testOBJ->getHighscoreWTime());
$highscore_wtime->setInfo($this->lng->txt("tst_highscore_wtime_description"));
$highscore->addSubItem($highscore_wtime);
// show signature placeholder
$showSignaturePlaceholder = new ilCheckboxInputGUI($this->lng->txt('tst_show_solution_signature'), 'solution_signature');
$showSignaturePlaceholder->setInfo($this->lng->txt('tst_show_solution_signature_desc'));
$showSignaturePlaceholder->setChecked($this->testOBJ->getShowSolutionSignature());
if ($this->testOBJ->getAnonymity()) {
$showSignaturePlaceholder->setDisabled(true);
}
$form->addItem($showSignaturePlaceholder);
// show signature placeholder
$showExamId = new ilCheckboxInputGUI($this->lng->txt('examid_in_test_res'), 'examid_in_test_res');
$showExamId->setInfo($this->lng->txt('examid_in_test_res_desc'));
$showExamId->setChecked($this->testOBJ->isShowExamIdInTestResultsEnabled());
$form->addItem($showExamId);
// export settings
$export_settings = new ilCheckboxInputGUI($this->lng->txt('tst_exp_sc_short'), 'exp_sc_short');
$export_settings->setInfo($this->lng->txt('tst_exp_sc_short_desc'));
$export_settings->setChecked($this->testOBJ->getExportSettingsSingleChoiceShort());
$form->addItem($export_settings);
}
示例4: scoringObject
//.........这里部分代码省略.........
$results_access->addOption(new ilRadioOption($this->lng->txt("tst_results_access_always"), 2, ''));
$results_access->addOption(new ilRadioOption($this->lng->txt("tst_results_access_finished"), 1, ''));
$results_access_date_limitation = new ilRadioOption($this->lng->txt("tst_results_access_date"), 3, '');
$results_access->addOption($results_access_date_limitation);
$results_access->addOption(new ilRadioOption($this->lng->txt("tst_results_access_never"), 4, ''));
$results_access->setValue($this->object->getScoreReporting());
$results_access->setInfo($this->lng->txt("tst_results_access_description"));
// access date
$reporting_date = new ilDateTimeInputGUI('', 'reporting_date');
$reporting_date->setShowDate(true);
$reporting_date->setShowTime(true);
if (strlen($this->object->getReportingDate())) {
$reporting_date->setDate(new ilDateTime($this->object->getReportingDate(), IL_CAL_TIMESTAMP));
} else {
$reporting_date->setDate(new ilDateTime(time(), IL_CAL_UNIX));
}
$results_access_date_limitation->addSubItem($reporting_date);
$form->addItem($results_access);
$results_print_best_solution = new ilCheckboxInputGUI($this->lng->txt("tst_results_print_best_solution"), "print_bs_with_res");
$results_print_best_solution->setInfo($this->lng->txt('tst_results_print_best_solution_info'));
$results_print_best_solution->setValue(1);
$results_print_best_solution->setChecked((bool) $this->object->isBestSolutionPrintedWithResult());
$form->addItem($results_print_best_solution);
// results presentation
$results_presentation = new ilCheckboxGroupInputGUI($this->lng->txt("tst_results_presentation"), "results_presentation");
$results_presentation->addOption(new ilCheckboxOption($this->lng->txt("tst_show_pass_details"), 'pass_details', ''));
$results_presentation->addOption(new ilCheckboxOption($this->lng->txt("tst_show_solution_details"), 'solution_details', ''));
$results_presentation->addOption(new ilCheckboxOption($this->lng->txt("tst_show_solution_printview"), 'solution_printview', ''));
$results_presentation->addOption(new ilCheckboxOption($this->lng->txt("tst_show_solution_feedback"), 'solution_feedback', ''));
$results_presentation->addOption(new ilCheckboxOption($this->lng->txt("tst_show_solution_answers_only"), 'solution_answers_only', ''));
$signatureOption = new ilCheckboxOption($this->lng->txt("tst_show_solution_signature"), 'solution_signature', '');
$results_presentation->addOption($signatureOption);
$results_presentation->addOption(new ilCheckboxOption($this->lng->txt("tst_show_solution_suggested"), 'solution_suggested', ''));
$values = array();
if ($this->object->getShowPassDetails()) {
array_push($values, 'pass_details');
}
if ($this->object->getShowSolutionDetails()) {
array_push($values, 'solution_details');
}
if ($this->object->getShowSolutionPrintview()) {
array_push($values, 'solution_printview');
}
if ($this->object->getShowSolutionFeedback()) {
array_push($values, 'solution_feedback');
}
if ($this->object->getShowSolutionAnswersOnly()) {
array_push($values, 'solution_answers_only');
}
if ($this->object->getShowSolutionSignature()) {
array_push($values, 'solution_signature');
}
if ($this->object->getShowSolutionSuggested()) {
array_push($values, 'solution_suggested');
}
$results_presentation->setValue($values);
$results_presentation->setInfo($this->lng->txt("tst_results_presentation_description"));
if ($this->object->getAnonymity()) {
$signatureOption->setDisabled(true);
}
$form->addItem($results_presentation);
// deletion of test results
$passDeletion = new ilRadioGroupInputGUI($this->lng->txt("tst_pass_deletion"), "pass_deletion_allowed");
$passDeletion->addOption(new ilRadioOption($this->lng->txt("tst_pass_deletion_not_allowed"), 0, ''));
$passDeletion->addOption(new ilRadioOption($this->lng->txt("tst_pass_deletion_allowed"), 1, ''));
$passDeletion->setValue($this->object->isPassDeletionAllowed());
$form->addItem($passDeletion);
// export settings
$export_settings = new ilCheckboxGroupInputGUI($this->lng->txt("tst_export_settings"), "export_settings");
$export_settings->addOption(new ilCheckboxOption($this->lng->txt("tst_exp_sc_short"), 'exp_sc_short', ''));
$values = array();
if ($this->object->getExportSettingsSingleChoiceShort()) {
array_push($values, 'exp_sc_short');
}
$export_settings->setValue($values);
$form->addItem($export_settings);
if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
$form->addCommandButton("saveScoring", $this->lng->txt("save"));
}
// remove items when using template
if ($template_settings) {
foreach ($template_settings as $id => $item) {
if ($item["hide"]) {
$form->removeItemByPostVar($id);
}
}
}
$errors = false;
if ($save) {
$errors = !$form->checkInput();
$form->setValuesByPost();
if ($errors) {
$checkonly = false;
}
}
if (!$checkonly) {
$this->tpl->setVariable("ADM_CONTENT", $form->getHTML());
}
return $errors;
}