本文整理汇总了PHP中ilObjTest::getListOfQuestionsEnd方法的典型用法代码示例。如果您正苦于以下问题:PHP ilObjTest::getListOfQuestionsEnd方法的具体用法?PHP ilObjTest::getListOfQuestionsEnd怎么用?PHP ilObjTest::getListOfQuestionsEnd使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilObjTest
的用法示例。
在下文中一共展示了ilObjTest::getListOfQuestionsEnd方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show
public function show()
{
require_once 'class.ilTestEvaluationGUI.php';
require_once './Services/PDFGeneration/classes/class.ilPDFGeneration.php';
global $ilUser;
$template = new ilTemplate("tpl.il_as_tst_submission_review.html", TRUE, TRUE, "Modules/Test");
$this->ilCtrl->setParameter($this, "skipfinalstatement", 1);
$template->setVariable("FORMACTION", $this->ilCtrl->getFormAction($this->testOutputGUI, 'redirectBack') . '&reviewed=1');
$template->setVariable("BUTTON_CONTINUE", $this->lng->txt("btn_next"));
$template->setVariable("BUTTON_BACK", $this->lng->txt("btn_previous"));
if ($this->test->getListOfQuestionsEnd()) {
$template->setVariable("CANCEL_CMD", 'outQuestionSummary');
} else {
$template->setVariable("CANCEL_CMD", 'backFromSummary');
}
$active = $this->test->getActiveIdOfUser($ilUser->getId());
$testevaluationgui = new ilTestEvaluationGUI($this->test);
$results = $this->test->getTestResult($active, $this->testSession->getPass());
$results_output = $testevaluationgui->getPassListOfAnswers($results, $active, $this->testSession->getPass(), false, false, false, false);
if ($this->test->getShowExamviewPdf()) {
$template->setVariable("PDF_TEXT", $this->lng->txt("pdf_export"));
global $ilSetting;
$inst_id = $ilSetting->get('inst_id', null);
$path = ilUtil::getWebspaceDir() . '/assessment/' . $this->testOutputGUI->object->getId() . '/exam_pdf';
if (!is_dir($path)) {
ilUtil::makeDirParents($path);
}
$filename = $path . '/exam_N' . $inst_id . '-' . $this->testOutputGUI->object->getId() . '-' . $active . '-' . $this->testSession->getPass() . '.pdf';
require_once 'class.ilTestPDFGenerator.php';
ilTestPDFGenerator::generatePDF($results_output, ilTestPDFGenerator::PDF_OUTPUT_FILE, $filename);
$template->setVariable("PDF_FILE_LOCATION", $filename);
} else {
$template->setCurrentBlock('prevent_double_form_subm');
$template->touchBlock('prevent_double_form_subm');
$template->parseCurrentBlock();
}
if ($this->test->getShowExamviewHtml()) {
if ($this->test->getListOfQuestionsEnd()) {
$template->setVariable("CANCEL_CMD_BOTTOM", 'outQuestionSummary');
} else {
$template->setVariable("CANCEL_CMD_BOTTOM", 'backFromSummary');
}
$template->setVariable("BUTTON_CONTINUE_BOTTOM", $this->lng->txt("btn_next"));
$template->setVariable("BUTTON_BACK_BOTTOM", $this->lng->txt("btn_previous"));
$template->setVariable('HTML_REVIEW', $results_output);
}
$this->tpl->setVariable($this->getContentBlockName(), $template->get());
}
示例2: buildForm
//.........这里部分代码省略.........
$form->addItem($autosave_output);
if (!$this->settingsTemplate || $this->formShowSequenceSection($this->settingsTemplate->getSettings())) {
// sequence properties
$seqheader = new ilFormSectionHeaderGUI();
$seqheader->setTitle($this->lng->txt("tst_sequence_properties"));
$form->addItem($seqheader);
}
// postpone questions
$postpone = new ilCheckboxInputGUI($this->lng->txt("tst_postpone"), "chb_postpone");
$postpone->setValue(1);
$postpone->setChecked($this->testOBJ->getSequenceSettings());
$postpone->setInfo($this->lng->txt("tst_postpone_description"));
$form->addItem($postpone);
// shuffle questions
$shuffle = new ilCheckboxInputGUI($this->lng->txt("tst_shuffle_questions"), "chb_shuffle_questions");
$shuffle->setValue(1);
$shuffle->setChecked($this->testOBJ->getShuffleQuestions());
$shuffle->setInfo($this->lng->txt("tst_shuffle_questions_description"));
$form->addItem($shuffle);
// show list of questions
$list_of_questions = new ilCheckboxInputGUI($this->lng->txt("tst_show_summary"), "list_of_questions");
//$list_of_questions->setOptionTitle($this->lng->txt("tst_show_summary"));
$list_of_questions->setValue(1);
$list_of_questions->setChecked($this->testOBJ->getListOfQuestions());
$list_of_questions->setInfo($this->lng->txt("tst_show_summary_description"));
$list_of_questions_options = new ilCheckboxGroupInputGUI('', "list_of_questions_options");
$list_of_questions_options->addOption(new ilCheckboxOption($this->lng->txt("tst_list_of_questions_start"), 'chb_list_of_questions_start', ''));
$list_of_questions_options->addOption(new ilCheckboxOption($this->lng->txt("tst_list_of_questions_end"), 'chb_list_of_questions_end', ''));
$list_of_questions_options->addOption(new ilCheckboxOption($this->lng->txt("tst_list_of_questions_with_description"), 'chb_list_of_questions_with_description', ''));
$values = array();
if ($this->testOBJ->getListOfQuestionsStart()) {
array_push($values, 'chb_list_of_questions_start');
}
if ($this->testOBJ->getListOfQuestionsEnd()) {
array_push($values, 'chb_list_of_questions_end');
}
if ($this->testOBJ->getListOfQuestionsDescription()) {
array_push($values, 'chb_list_of_questions_with_description');
}
$list_of_questions_options->setValue($values);
$list_of_questions->addSubItem($list_of_questions_options);
$form->addItem($list_of_questions);
// show question marking
$marking = new ilCheckboxInputGUI($this->lng->txt("question_marking"), "chb_show_marker");
$marking->setValue(1);
$marking->setChecked($this->testOBJ->getShowMarker());
$marking->setInfo($this->lng->txt("question_marking_description"));
$form->addItem($marking);
// show suspend test
$cancel = new ilCheckboxInputGUI($this->lng->txt("tst_show_cancel"), "chb_show_cancel");
$cancel->setValue(1);
$cancel->setChecked($this->testOBJ->getShowCancel());
$cancel->setInfo($this->lng->txt("tst_show_cancel_description"));
$form->addItem($cancel);
if (!$this->settingsTemplate || $this->formShowNotificationSection($this->settingsTemplate->getSettings())) {
// notifications
$notifications = new ilFormSectionHeaderGUI();
$notifications->setTitle($this->lng->txt("tst_mail_notification"));
$form->addItem($notifications);
}
// mail notification
$mailnotification = new ilRadioGroupInputGUI($this->lng->txt("tst_finish_notification"), "mailnotification");
$mailnotification->addOption(new ilRadioOption($this->lng->txt("tst_finish_notification_no"), 0, ''));
$mailnotification->addOption(new ilRadioOption($this->lng->txt("tst_finish_notification_simple"), 1, ''));
$mailnotification->addOption(new ilRadioOption($this->lng->txt("tst_finish_notification_advanced"), 2, ''));
$mailnotification->setValue($this->testOBJ->getMailNotification());
示例3: propertiesObject
//.........这里部分代码省略.........
$form->addItem($autosave_output);
if (!$template || $template && $this->formShowSequenceSection($template_settings)) {
// sequence properties
$seqheader = new ilFormSectionHeaderGUI();
$seqheader->setTitle($this->lng->txt("tst_sequence_properties"));
$form->addItem($seqheader);
}
// postpone questions
$postpone = new ilCheckboxInputGUI($this->lng->txt("tst_postpone"), "chb_postpone");
$postpone->setValue(1);
$postpone->setChecked($this->object->getSequenceSettings());
$postpone->setInfo($this->lng->txt("tst_postpone_description"));
$form->addItem($postpone);
// shuffle questions
$shuffle = new ilCheckboxInputGUI($this->lng->txt("tst_shuffle_questions"), "chb_shuffle_questions");
$shuffle->setValue(1);
$shuffle->setChecked($this->object->getShuffleQuestions());
$shuffle->setInfo($this->lng->txt("tst_shuffle_questions_description"));
$form->addItem($shuffle);
// show list of questions
$list_of_questions = new ilCheckboxInputGUI($this->lng->txt("tst_show_summary"), "list_of_questions");
//$list_of_questions->setOptionTitle($this->lng->txt("tst_show_summary"));
$list_of_questions->setValue(1);
$list_of_questions->setChecked($this->object->getListOfQuestions());
$list_of_questions->setInfo($this->lng->txt("tst_show_summary_description"));
$list_of_questions_options = new ilCheckboxGroupInputGUI('', "list_of_questions_options");
$list_of_questions_options->addOption(new ilCheckboxOption($this->lng->txt("tst_list_of_questions_start"), 'chb_list_of_questions_start', ''));
$list_of_questions_options->addOption(new ilCheckboxOption($this->lng->txt("tst_list_of_questions_end"), 'chb_list_of_questions_end', ''));
$list_of_questions_options->addOption(new ilCheckboxOption($this->lng->txt("tst_list_of_questions_with_description"), 'chb_list_of_questions_with_description', ''));
$values = array();
if ($this->object->getListOfQuestionsStart()) {
array_push($values, 'chb_list_of_questions_start');
}
if ($this->object->getListOfQuestionsEnd()) {
array_push($values, 'chb_list_of_questions_end');
}
if ($this->object->getListOfQuestionsDescription()) {
array_push($values, 'chb_list_of_questions_with_description');
}
$list_of_questions_options->setValue($values);
$list_of_questions->addSubItem($list_of_questions_options);
$form->addItem($list_of_questions);
// show question marking
$marking = new ilCheckboxInputGUI($this->lng->txt("question_marking"), "chb_show_marker");
$marking->setValue(1);
$marking->setChecked($this->object->getShowMarker());
$marking->setInfo($this->lng->txt("question_marking_description"));
$form->addItem($marking);
// show suspend test
$cancel = new ilCheckboxInputGUI($this->lng->txt("tst_show_cancel"), "chb_show_cancel");
$cancel->setValue(1);
$cancel->setChecked($this->object->getShowCancel());
$cancel->setInfo($this->lng->txt("tst_show_cancel_description"));
$form->addItem($cancel);
if (!$template || $template && $this->formShowNotificationSection($template_settings)) {
// notifications
$notifications = new ilFormSectionHeaderGUI();
$notifications->setTitle($this->lng->txt("tst_mail_notification"));
$form->addItem($notifications);
}
// mail notification
$mailnotification = new ilRadioGroupInputGUI($this->lng->txt("tst_finish_notification"), "mailnotification");
$mailnotification->addOption(new ilRadioOption($this->lng->txt("tst_finish_notification_no"), 0, ''));
$mailnotification->addOption(new ilRadioOption($this->lng->txt("tst_finish_notification_simple"), 1, ''));
$mailnotification->addOption(new ilRadioOption($this->lng->txt("tst_finish_notification_advanced"), 2, ''));
$mailnotification->setValue($this->object->getMailNotification());