本文整理汇总了PHP中ilUtil::getHtmlPath方法的典型用法代码示例。如果您正苦于以下问题:PHP ilUtil::getHtmlPath方法的具体用法?PHP ilUtil::getHtmlPath怎么用?PHP ilUtil::getHtmlPath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilUtil
的用法示例。
在下文中一共展示了ilUtil::getHtmlPath方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getImages
/**
* Gets an array of preview images.
*
* @return array The preview images.
*/
public function getImages()
{
$images = array();
// status must be created
$path = $this->getStoragePath();
if ($this->getRenderStatus() == self::RENDER_STATUS_CREATED) {
// load files
if ($handle = @opendir($path)) {
while (false !== ($file = readdir($handle))) {
$filepath = $path . "/" . $file;
if (!is_file($filepath)) {
continue;
}
if ($file != '.' && $file != '..' && strpos($file, "preview_") === 0) {
$image = array();
$image["url"] = ilUtil::getHtmlPath($filepath);
// get image size
$size = @getimagesize($filepath);
if ($size !== false) {
$image["width"] = $size[0];
$image["height"] = $size[1];
}
$images[$file] = $image;
}
}
closedir($handle);
// sort by key
ksort($images);
}
}
return $images;
}
示例2: _getURL
/**
* get directory for files of media object (static)
*
* @param int $a_mob_id media object id
*/
function _getURL($a_mob_id)
{
return ilUtil::getHtmlPath(ilUtil::getWebspaceDir() . "/mobs/mm_" . $a_mob_id);
}
示例3: getSolutionOutput
//.........这里部分代码省略.........
$template->setVariable("ICON_OK", ilUtil::getImagePath("icon_ok.png"));
$template->setVariable("TEXT_OK", $this->lng->txt("answer_is_right"));
$template->parseCurrentBlock();
} else {
$template->setCurrentBlock("icon_ok");
$template->setVariable("ICON_NOT_OK", ilUtil::getImagePath("icon_not_ok.png"));
$template->setVariable("TEXT_NOT_OK", $this->lng->txt("answer_is_wrong"));
$template->parseCurrentBlock();
}
}
}
if (strlen($answer->getImage())) {
$template->setCurrentBlock("answer_image");
if ($this->object->getThumbSize()) {
$template->setVariable("ANSWER_IMAGE_URL", $this->object->getImagePathWeb() . $this->object->getThumbPrefix() . $answer->getImage());
} else {
$template->setVariable("ANSWER_IMAGE_URL", $this->object->getImagePathWeb() . $answer->getImage());
}
$alt = $answer->getImage();
if (strlen($answer->getAnswertext())) {
$alt = $answer->getAnswertext();
}
$alt = preg_replace("/<[^>]*?>/", "", $alt);
$template->setVariable("ANSWER_IMAGE_ALT", ilUtil::prepareFormOutput($alt));
$template->setVariable("ANSWER_IMAGE_TITLE", ilUtil::prepareFormOutput($alt));
$template->parseCurrentBlock();
}
if ($show_feedback) {
if ($this->object->getSpecificFeedbackSetting() == 2) {
foreach ($user_solution as $mc_solution) {
if (strcmp($mc_solution, $answer_id) == 0) {
$fb = $this->object->feedbackOBJ->getSpecificAnswerFeedbackTestPresentation($this->object->getId(), $answer_id);
if (strlen($fb)) {
$template->setCurrentBlock("feedback");
$template->setVariable("FEEDBACK", $this->object->prepareTextareaOutput($fb, true));
$template->parseCurrentBlock();
}
}
}
}
if ($this->object->getSpecificFeedbackSetting() == 1) {
$fb = $this->object->feedbackOBJ->getSpecificAnswerFeedbackTestPresentation($this->object->getId(), $answer_id);
if (strlen($fb)) {
$template->setCurrentBlock("feedback");
$template->setVariable("FEEDBACK", $this->object->prepareTextareaOutput($fb, true));
$template->parseCurrentBlock();
}
}
if ($this->object->getSpecificFeedbackSetting() == 3) {
$answer = $this->object->getAnswer($answer_id);
if ($answer->getPoints() > 0) {
$fb = $this->object->feedbackOBJ->getSpecificAnswerFeedbackTestPresentation($this->object->getId(), $answer_id);
if (strlen($fb)) {
$template->setCurrentBlock("feedback");
$template->setVariable("FEEDBACK", $this->object->prepareTextareaOutput($fb, true));
$template->parseCurrentBlock();
}
}
}
}
$template->setCurrentBlock("answer_row");
$template->setVariable("ANSWER_TEXT", $this->object->prepareTextareaOutput($answer->getAnswertext(), TRUE));
$checked = FALSE;
if ($result_output) {
$pointschecked = $this->object->answers[$answer_id]->getPointsChecked();
$pointsunchecked = $this->object->answers[$answer_id]->getPointsUnchecked();
$resulttextchecked = $pointschecked == 1 || $pointschecked == -1 ? "%s " . $this->lng->txt("point") : "%s " . $this->lng->txt("points");
$resulttextunchecked = $pointsunchecked == 1 || $pointsunchecked == -1 ? "%s " . $this->lng->txt("point") : "%s " . $this->lng->txt("points");
$template->setVariable("RESULT_OUTPUT", sprintf("(" . $this->lng->txt("checkbox_checked") . " = {$resulttextchecked}, " . $this->lng->txt("checkbox_unchecked") . " = {$resulttextunchecked})", $pointschecked, $pointsunchecked));
}
foreach ($user_solution as $mc_solution) {
if (strcmp($mc_solution, $answer_id) == 0) {
$template->setVariable("SOLUTION_IMAGE", ilUtil::getHtmlPath(ilUtil::getImagePath("checkbox_checked.png")));
$template->setVariable("SOLUTION_ALT", $this->lng->txt("checked"));
$checked = TRUE;
}
}
if (!$checked) {
$template->setVariable("SOLUTION_IMAGE", ilUtil::getHtmlPath(ilUtil::getImagePath("checkbox_unchecked.png")));
$template->setVariable("SOLUTION_ALT", $this->lng->txt("unchecked"));
}
$template->parseCurrentBlock();
}
$questiontext = $this->object->getQuestion();
if ($show_question_text == true) {
$template->setVariable("QUESTIONTEXT", $this->object->prepareTextareaOutput($questiontext, TRUE));
}
$questionoutput = $template->get();
$feedback = $show_feedback ? $this->getAnswerFeedbackOutput($active_id, $pass) : "";
if (strlen($feedback)) {
$solutiontemplate->setVariable("FEEDBACK", $this->object->prepareTextareaOutput($feedback, true));
}
$solutiontemplate->setVariable("SOLUTION_OUTPUT", $questionoutput);
$solutionoutput = $solutiontemplate->get();
if (!$show_question_only) {
// get page object output
$solutionoutput = '<div class="ilc_question_Standard">' . $solutionoutput . "</div>";
}
return $solutionoutput;
}
示例4: getSolutionOutput
/**
* @param $active_id
* @param null $pass
* @param bool $graphicalOutput
* @param bool $result_output
* @param bool $show_question_only
* @param bool $show_feedback
* @param bool $show_correct_solution
* @param bool $show_manual_scoring
* @param bool $show_question_text
*/
public function getSolutionOutput($active_id, $pass = NULL, $graphicalOutput = FALSE, $result_output = FALSE, $show_question_only = TRUE, $show_feedback = FALSE, $show_correct_solution = FALSE, $show_manual_scoring = FALSE, $show_question_text = TRUE)
{
// shuffle output
$keys = $this->getParticipantsAnswerKeySequence();
// get the solution of the user for the active pass or from the last pass if allowed
$user_solution = array();
if ($active_id > 0 && !$show_correct_solution) {
$solutions =& $this->object->getSolutionValues($active_id, $pass);
foreach ($solutions as $idx => $solution_value) {
$user_solution[$solution_value['value1']] = $solution_value['value2'];
}
} else {
// take the correct solution instead of the user solution
foreach ($this->object->getAnswers() as $answer) {
$user_solution[$answer->getPosition()] = $answer->getCorrectness();
}
}
// generate the question output
$template = new ilTemplate("tpl.il_as_qpl_mc_kprim_output_solution.html", TRUE, TRUE, "Modules/TestQuestionPool");
foreach ($keys as $answer_id) {
$answer = $this->object->getAnswer($answer_id);
if ($active_id > 0 && !$show_correct_solution) {
if ($graphicalOutput) {
// output of ok/not ok icons for user entered solutions
if ($user_solution[$answer->getPosition()] == $answer->getCorrectness()) {
$template->setCurrentBlock("icon_ok");
$template->setVariable("ICON_OK", ilUtil::getImagePath("icon_ok.svg"));
$template->setVariable("TEXT_OK", $this->lng->txt("answer_is_right"));
$template->parseCurrentBlock();
} else {
$template->setCurrentBlock("icon_ok");
$template->setVariable("ICON_NOT_OK", ilUtil::getImagePath("icon_not_ok.svg"));
$template->setVariable("TEXT_NOT_OK", $this->lng->txt("answer_is_wrong"));
$template->parseCurrentBlock();
}
}
}
if (strlen($answer->getImageFile())) {
$template->setCurrentBlock("answer_image");
if ($this->object->getThumbSize()) {
$template->setVariable("ANSWER_IMAGE_URL", $answer->getThumbWebPath());
} else {
$template->setVariable("ANSWER_IMAGE_URL", $answer->getImageWebPath());
}
$template->setVariable("ANSWER_IMAGE_ALT", ilUtil::prepareFormOutput($answer->getImageFile()));
$template->setVariable("ANSWER_IMAGE_TITLE", ilUtil::prepareFormOutput($answer->getImageFile()));
$template->parseCurrentBlock();
}
if ($show_feedback) {
$this->populateSpecificFeedbackInline($user_solution, $answer_id, $template);
}
$template->setCurrentBlock("answer_row");
$template->setVariable("ANSWER_TEXT", $this->object->prepareTextareaOutput($answer->getAnswertext(), TRUE));
if (isset($user_solution[$answer->getPosition()])) {
if ($user_solution[$answer->getPosition()]) {
$template->setVariable("SOLUTION_IMAGE_TRUE", ilUtil::getHtmlPath(ilUtil::getImagePath("radiobutton_checked.png")));
$template->setVariable("SOLUTION_ALT_TRUE", $this->lng->txt("checked"));
$template->setVariable("SOLUTION_IMAGE_FALSE", ilUtil::getHtmlPath(ilUtil::getImagePath("radiobutton_unchecked.png")));
$template->setVariable("SOLUTION_ALT_FALSE", $this->lng->txt("unchecked"));
} else {
$template->setVariable("SOLUTION_IMAGE_TRUE", ilUtil::getHtmlPath(ilUtil::getImagePath("radiobutton_unchecked.png")));
$template->setVariable("SOLUTION_ALT_TRUE", $this->lng->txt("unchecked"));
$template->setVariable("SOLUTION_IMAGE_FALSE", ilUtil::getHtmlPath(ilUtil::getImagePath("radiobutton_checked.png")));
$template->setVariable("SOLUTION_ALT_FALSE", $this->lng->txt("checked"));
}
} else {
$template->setVariable("SOLUTION_IMAGE_TRUE", ilUtil::getHtmlPath(ilUtil::getImagePath("radiobutton_unchecked.png")));
$template->setVariable("SOLUTION_ALT_TRUE", $this->lng->txt("unchecked"));
$template->setVariable("SOLUTION_IMAGE_FALSE", ilUtil::getHtmlPath(ilUtil::getImagePath("radiobutton_unchecked.png")));
$template->setVariable("SOLUTION_ALT_FALSE", $this->lng->txt("unchecked"));
}
$template->parseCurrentBlock();
}
if ($show_question_text == true) {
$questiontext = $this->object->getQuestion();
$template->setVariable("QUESTIONTEXT", $this->object->prepareTextareaOutput($questiontext, TRUE));
$template->setVariable("INSTRUCTIONTEXT", $this->object->getInstructionTextTranslation($this->lng, $this->object->getOptionLabel()));
}
$template->setVariable("OPTION_LABEL_TRUE", $this->object->getTrueOptionLabelTranslation($this->lng, $this->object->getOptionLabel()));
$template->setVariable("OPTION_LABEL_FALSE", $this->object->getFalseOptionLabelTranslation($this->lng, $this->object->getOptionLabel()));
$questionoutput = $template->get();
$feedback = $show_feedback ? $this->getGenericFeedbackOutput($active_id, $pass) : "";
$solutiontemplate = new ilTemplate("tpl.il_as_tst_solution_output.html", TRUE, TRUE, "Modules/TestQuestionPool");
if (strlen($feedback)) {
$solutiontemplate->setVariable("FEEDBACK", $this->object->prepareTextareaOutput($feedback, true));
}
$solutiontemplate->setVariable("SOLUTION_OUTPUT", $questionoutput);
$solutionoutput = $solutiontemplate->get();
if (!$show_question_only) {
//.........这里部分代码省略.........
示例5: login
public function login()
{
$skipClasses = array('ilpasswordassistancegui', 'ilaccountregistrationgui');
$skipFiles = array('pwassist.php');
if (in_array(strtolower($_REQUEST['cmdClass']), $skipClasses)) {
return;
} else {
$script = pathinfo($_SERVER['PHP_SELF'], PATHINFO_BASENAME);
if (in_array(strtolower($script), $skipFiles)) {
return;
}
}
if (!$this->apache_settings->get('apache_auth_authenticate_on_login_page') && (preg_match('/.*login\\.php$/', $_SERVER['SCRIPT_NAME']) || (in_array($_REQUEST['cmd'], array('showLogin', 'showTermsOfService')) || isset($_POST['change_lang_to'])) && strtolower($_REQUEST['cmdClass']) == 'ilstartupgui')) {
return;
}
if (!$this->apache_settings->get('apache_auth_authenticate_on_login_page') && preg_match('/.*login\\.php$/', $_SERVER['SCRIPT_NAME'])) {
return;
}
if (ilContext::supportsRedirects() && !isset($_GET['passed_sso']) && (!defined('IL_CERT_SSO') || IL_CERT_SSO == false)) {
// redirect to sso
// this part is executed in default ilias context...
$path = $_SERVER['REQUEST_URI'];
if ($path[0] == '/') {
$path = substr($path, 1);
}
if (substr($path, 0, 4) != 'http') {
$parts = parse_url(ILIAS_HTTP_PATH);
$path = $parts['scheme'] . '://' . $parts['host'] . '/' . $path;
}
$path = urlencode($path);
ilUtil::redirect(ilUtil::getHtmlPath('/sso/index.php?force_mode_apache=1&r=' . $path . '&cookie_path=' . IL_COOKIE_PATH . '&ilias_path=' . ILIAS_HTTP_PATH));
} else {
return parent::login();
}
}
示例6: printViewObject
/**
* Creates a print view of the survey questions
*
* @access public
*/
function printViewObject()
{
$this->questionsSubtabs("print");
$template = new ilTemplate("tpl.il_svy_svy_printview.html", TRUE, TRUE, "Modules/Survey");
include_once './Services/WebServices/RPC/classes/class.ilRPCServerSettings.php';
if (ilRPCServerSettings::getInstance()->isEnabled()) {
$this->ctrl->setParameter($this, "pdf", "1");
$template->setCurrentBlock("pdf_export");
$template->setVariable("PDF_URL", $this->ctrl->getLinkTarget($this, "printView"));
$this->ctrl->setParameter($this, "pdf", "");
$template->setVariable("PDF_TEXT", $this->lng->txt("pdf_export"));
$template->setVariable("PDF_IMG_ALT", $this->lng->txt("pdf_export"));
$template->setVariable("PDF_IMG_URL", ilUtil::getHtmlPath(ilUtil::getImagePath("application-pdf.png")));
$template->parseCurrentBlock();
}
$template->setVariable("PRINT_TEXT", $this->lng->txt("print"));
$template->setVariable("PRINT_URL", "javascript:window.print();");
$pages =& $this->object->getSurveyPages();
foreach ($pages as $page) {
if (count($page) > 0) {
foreach ($page as $question) {
$questionGUI = $this->object->getQuestionGUI($question["type_tag"], $question["question_id"]);
if (is_object($questionGUI)) {
if (strlen($question["heading"])) {
$template->setCurrentBlock("textblock");
$template->setVariable("TEXTBLOCK", $question["heading"]);
$template->parseCurrentBlock();
}
$template->setCurrentBlock("question");
$template->setVariable("QUESTION_DATA", $questionGUI->getPrintView($this->object->getShowQuestionTitles(), $question["questionblock_show_questiontext"], $this->object->getSurveyId()));
$template->parseCurrentBlock();
}
}
if (count($page) > 1) {
$template->setCurrentBlock("page");
$template->setVariable("BLOCKTITLE", $page[0]["questionblock_title"]);
$template->parseCurrentBlock();
} else {
$template->setCurrentBlock("page");
$template->parseCurrentBlock();
}
}
}
$this->tpl->addCss("./Modules/Survey/templates/default/survey_print.css", "print");
if (array_key_exists("pdf", $_GET) && $_GET["pdf"] == 1) {
$printbody = new ilTemplate("tpl.il_as_tst_print_body.html", TRUE, TRUE, "Modules/Test");
$printbody->setVariable("TITLE", sprintf($this->lng->txt("tst_result_user_name"), $uname));
$printbody->setVariable("ADM_CONTENT", $template->get());
$printoutput = $printbody->get();
$printoutput = preg_replace("/href=\".*?\"/", "", $printoutput);
$fo = $this->object->processPrintoutput2FO($printoutput);
// #11436
if (!$fo || !$this->object->deliverPDFfromFO($fo)) {
ilUtil::sendFailure($this->lng->txt("msg_failed"), true);
$this->ctrl->redirect($this, "printView");
}
} else {
$this->tpl->setVariable("ADM_CONTENT", $template->get());
}
}
示例7: getPrintView
/**
* Creates a HTML representation of the question
*
* @access private
*/
function getPrintView($question_title = 1, $show_questiontext = 1, $survey_id = null)
{
$template = new ilTemplate("tpl.il_svy_qpl_mc_printview.html", TRUE, TRUE, "Modules/SurveyQuestionPool");
switch ($this->object->getOrientation()) {
case 0:
// vertical orientation
for ($i = 0; $i < $this->object->categories->getCategoryCount(); $i++) {
$cat = $this->object->categories->getCategory($i);
if ($cat->other) {
$template->setCurrentBlock("other_row");
$template->setVariable("IMAGE_CHECKBOX", ilUtil::getHtmlPath(ilUtil::getImagePath("checkbox_unchecked.png")));
$template->setVariable("ALT_CHECKBOX", $this->lng->txt("unchecked"));
$template->setVariable("TITLE_CHECKBOX", $this->lng->txt("unchecked"));
$template->setVariable("OTHER_LABEL", ilUtil::prepareFormOutput($cat->title));
$template->setVariable("OTHER_ANSWER", " ");
$template->parseCurrentBlock();
} else {
$template->setCurrentBlock("mc_row");
$template->setVariable("IMAGE_CHECKBOX", ilUtil::getHtmlPath(ilUtil::getImagePath("checkbox_unchecked.png")));
$template->setVariable("ALT_CHECKBOX", $this->lng->txt("unchecked"));
$template->setVariable("TITLE_CHECKBOX", $this->lng->txt("unchecked"));
$template->setVariable("TEXT_MC", ilUtil::prepareFormOutput($cat->title));
$template->parseCurrentBlock();
}
}
break;
case 1:
// horizontal orientation
for ($i = 0; $i < $this->object->categories->getCategoryCount(); $i++) {
$template->setCurrentBlock("checkbox_col");
$template->setVariable("IMAGE_CHECKBOX", ilUtil::getHtmlPath(ilUtil::getImagePath("checkbox_unchecked.png")));
$template->setVariable("ALT_CHECKBOX", $this->lng->txt("unchecked"));
$template->setVariable("TITLE_CHECKBOX", $this->lng->txt("unchecked"));
$template->parseCurrentBlock();
}
for ($i = 0; $i < $this->object->categories->getCategoryCount(); $i++) {
$cat = $this->object->categories->getCategory($i);
if ($cat->other) {
$template->setCurrentBlock("other_text_col");
$template->setVariable("OTHER_LABEL", ilUtil::prepareFormOutput($cat->title));
$template->setVariable("OTHER_ANSWER", " ");
$template->parseCurrentBlock();
} else {
$template->setCurrentBlock("text_col");
$template->setVariable("TEXT_MC", ilUtil::prepareFormOutput($cat->title));
$template->parseCurrentBlock();
}
}
break;
}
if ($this->object->use_min_answers) {
$template->setCurrentBlock('min_max_msg');
if ($this->object->nr_min_answers > 0 && $this->object->nr_max_answers > 0) {
$template->setVariable('MIN_MAX_MSG', sprintf($this->lng->txt('msg_min_max_nr_answers'), $this->object->nr_min_answers, $this->object->nr_max_answers));
} else {
if ($this->object->nr_min_answers > 0) {
$template->setVariable('MIN_MAX_MSG', sprintf($this->lng->txt('msg_min_nr_answers'), $this->object->nr_min_answers));
} else {
if ($this->object->nr_max_answers > 0) {
$template->setVariable('MIN_MAX_MSG', sprintf($this->lng->txt('msg_max_nr_answers'), $this->object->nr_max_answers));
}
}
}
$template->parseCurrentBlock();
}
if ($show_questiontext) {
$this->outQuestionText($template);
}
if ($question_title) {
$template->setVariable("QUESTION_TITLE", $this->object->getTitle());
}
$template->parseCurrentBlock();
return $template->get();
}
示例8: getPrintView
//.........这里部分代码省略.........
array_push($style, sprintf("width: %.2f%s!important", $layout["percent_row"], "%"));
if (count($style) > 0) {
$tplheaders->setVariable("STYLE", " style=\"" . implode(";", $style) . "\"");
}
$template->setCurrentBlock("matrix_row");
$template->setVariable("ROW", $tplheaders->get());
$template->parseCurrentBlock();
$rowclass = array("tblrow1", "tblrow2");
for ($i = 0; $i < $this->object->getRowCount(); $i++) {
$rowobj = $this->object->getRow($i);
$tplrow = new ilTemplate("tpl.il_svy_qpl_matrix_printview_row.html", TRUE, TRUE, "Modules/SurveyQuestionPool");
for ($j = 0; $j < $this->object->getColumnCount(); $j++) {
$cat = $this->object->getColumn($j);
if ($i == 0 && $j == 0) {
if (strlen($this->object->getBipolarAdjective(0)) && strlen($this->object->getBipolarAdjective(1))) {
$tplrow->setCurrentBlock("bipolar_start");
$tplrow->setVariable("TEXT_BIPOLAR_START", ilUtil::prepareFormOutput($this->object->getBipolarAdjective(0)));
$tplrow->setVariable("ROWSPAN", $this->object->getRowCount());
$tplrow->parseCurrentBlock();
}
}
if ($i == 0 && $j == $this->object->getColumnCount() - 1) {
if (strlen($this->object->getBipolarAdjective(0)) && strlen($this->object->getBipolarAdjective(1))) {
$tplrow->setCurrentBlock("bipolar_end");
$tplrow->setVariable("TEXT_BIPOLAR_END", ilUtil::prepareFormOutput($this->object->getBipolarAdjective(1)));
$tplrow->setVariable("ROWSPAN", $this->object->getRowCount());
$tplrow->parseCurrentBlock();
}
}
switch ($this->object->getSubtype()) {
case 0:
if ($cat->neutral) {
$tplrow->setCurrentBlock("neutral_radiobutton");
$tplrow->setVariable("IMAGE_RADIO", ilUtil::getHtmlPath(ilUtil::getImagePath("radiobutton_unchecked.png")));
$tplrow->setVariable("ALT_RADIO", $this->lng->txt("unchecked"));
$tplrow->setVariable("TITLE_RADIO", $this->lng->txt("unchecked"));
$tplrow->parseCurrentBlock();
} else {
$tplrow->setCurrentBlock("radiobutton");
$tplrow->setVariable("IMAGE_RADIO", ilUtil::getHtmlPath(ilUtil::getImagePath("radiobutton_unchecked.png")));
$tplrow->setVariable("ALT_RADIO", $this->lng->txt("unchecked"));
$tplrow->setVariable("TITLE_RADIO", $this->lng->txt("unchecked"));
$tplrow->parseCurrentBlock();
}
break;
case 1:
if ($cat->neutral) {
$tplrow->setCurrentBlock("neutral_checkbox");
$tplrow->setVariable("IMAGE_CHECKBOX", ilUtil::getHtmlPath(ilUtil::getImagePath("checkbox_unchecked.png")));
$tplrow->setVariable("ALT_CHECKBOX", $this->lng->txt("unchecked"));
$tplrow->setVariable("TITLE_CHECKBOX", $this->lng->txt("unchecked"));
$tplrow->parseCurrentBlock();
} else {
$tplrow->setCurrentBlock("checkbox");
$tplrow->setVariable("IMAGE_CHECKBOX", ilUtil::getHtmlPath(ilUtil::getImagePath("checkbox_unchecked.png")));
$tplrow->setVariable("ALT_CHECKBOX", $this->lng->txt("unchecked"));
$tplrow->setVariable("TITLE_CHECKBOX", $this->lng->txt("unchecked"));
$tplrow->parseCurrentBlock();
}
break;
}
if ($cat->neutral) {
$tplrow->setCurrentBlock("neutral_answer");
$style = array();
if ($this->object->getNeutralColumnSeparator()) {
array_push($style, "border-left: {$neutralstyle}!important");
示例9: show
public function show()
{
require_once 'class.ilTestEvaluationGUI.php';
require_once './Services/PDFGeneration/classes/class.ilPDFGeneration.php';
global $ilUser;
if (array_key_exists("pass", $_GET) && strlen($_GET["pass"]) > 0 || !is_null($pass)) {
if (is_null($pass)) {
$pass = $_GET["pass"];
}
}
$template = new ilTemplate("tpl.il_as_tst_submission_review.html", TRUE, TRUE, "Modules/Test");
$this->ilCtrl->setParameter($this, "crs_show_result", $_GET['crs_show_result']);
$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"));
$this->ilCtrl->setParameter($this, "pass", "");
$this->ilCtrl->setParameter($this, "pdf", "");
$active = $this->test->getActiveIdOfUser($ilUser->getId());
$testevaluationgui = new ilTestEvaluationGUI($this->test);
$results = $this->test->getTestResult($active, $pass);
$results_output = $testevaluationgui->getPassListOfAnswers($results, $active, $pass, false, false, false, false);
if ($this->test->getShowExamviewPdf()) {
$template->setCurrentBlock("pdf_export");
$template->setVariable("PDF_TEXT", $this->lng->txt("pdf_export"));
$template->setVariable("PDF_IMG_ALT", $this->lng->txt("pdf_export"));
$template->setVariable("PDF_IMG_URL", ilUtil::getHtmlPath(ilUtil::getImagePath("application-pdf.png")));
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 . '-' . $pass . '.pdf';
require_once 'class.ilTestPDFGenerator.php';
ilTestPDFGenerator::generatePDF($results_output, ilTestPDFGenerator::PDF_OUTPUT_FILE, $filename);
$template->setVariable("PDF_FILE_LOCATION", $filename);
}
if ($this->test->getShowExamviewHtml()) {
$template->setCurrentBlock('html_review');
$template->setVariable('HTML_REVIEW', $results_output);
}
$this->tpl->setVariable($this->getContentBlockName(), $template->get());
}
示例10: getPrintView
/**
* Creates a HTML representation of the question
*
* @access private
*/
function getPrintView($question_title = 1, $show_questiontext = 1, $survey_id = null)
{
$template = new ilTemplate("tpl.il_svy_qpl_sc_printview.html", TRUE, TRUE, "Modules/SurveyQuestionPool");
switch ($this->object->orientation) {
case 0:
// vertical orientation
for ($i = 0; $i < $this->object->categories->getCategoryCount(); $i++) {
$cat = $this->object->categories->getCategory($i);
if ($cat->other) {
$template->setCurrentBlock("other_row");
$template->setVariable("IMAGE_RADIO", ilUtil::getHtmlPath(ilUtil::getImagePath("radiobutton_unchecked.png")));
$template->setVariable("ALT_RADIO", $this->lng->txt("unchecked"));
$template->setVariable("TITLE_RADIO", $this->lng->txt("unchecked"));
$template->setVariable("OTHER_LABEL", ilUtil::prepareFormOutput($cat->title));
$template->setVariable("OTHER_ANSWER", " ");
$template->parseCurrentBlock();
} else {
$template->setCurrentBlock("row");
$template->setVariable("IMAGE_RADIO", ilUtil::getHtmlPath(ilUtil::getImagePath("radiobutton_unchecked.png")));
$template->setVariable("ALT_RADIO", $this->lng->txt("unchecked"));
$template->setVariable("TITLE_RADIO", $this->lng->txt("unchecked"));
$template->setVariable("TEXT_SC", ilUtil::prepareFormOutput($cat->title));
$template->parseCurrentBlock();
}
}
break;
case 1:
// horizontal orientation
for ($i = 0; $i < $this->object->categories->getCategoryCount(); $i++) {
$template->setCurrentBlock("radio_col");
$template->setVariable("IMAGE_RADIO", ilUtil::getHtmlPath(ilUtil::getImagePath("radiobutton_unchecked.png")));
$template->setVariable("ALT_RADIO", $this->lng->txt("unchecked"));
$template->setVariable("TITLE_RADIO", $this->lng->txt("unchecked"));
$template->parseCurrentBlock();
}
for ($i = 0; $i < $this->object->categories->getCategoryCount(); $i++) {
$cat = $this->object->categories->getCategory($i);
if ($cat->other) {
$template->setCurrentBlock("other_text_col");
$template->setVariable("OTHER_LABEL", ilUtil::prepareFormOutput($cat->title));
$template->setVariable("OTHER_ANSWER", " ");
$template->parseCurrentBlock();
} else {
$template->setCurrentBlock("text_col");
$template->setVariable("TEXT_SC", ilUtil::prepareFormOutput($cat->title));
$template->parseCurrentBlock();
}
}
break;
case 2:
// combobox output
for ($i = 0; $i < $this->object->categories->getCategoryCount(); $i++) {
$cat = $this->object->categories->getCategory($i);
$template->setCurrentBlock("comborow");
$template->setVariable("TEXT_SC", ilUtil::prepareFormOutput($cat->title));
$template->setVariable("VALUE_SC", $cat->scale ? $cat->scale - 1 : $i);
if (is_array($working_data)) {
if (strcmp($working_data[0]["value"], "") != 0) {
if ($working_data[0]["value"] == $i) {
$template->setVariable("SELECTED_SC", " selected=\"selected\"");
}
}
}
$template->parseCurrentBlock();
}
$template->setCurrentBlock("combooutput");
$template->setVariable("QUESTION_ID", $this->object->getId());
$template->setVariable("SELECT_OPTION", $this->lng->txt("select_option"));
$template->setVariable("TEXT_SELECTION", $this->lng->txt("selection"));
$template->parseCurrentBlock();
break;
}
if ($question_title) {
$template->setVariable("QUESTION_TITLE", $this->object->getTitle());
}
if ($show_questiontext) {
$this->outQuestionText($template);
}
$template->parseCurrentBlock();
return $template->get();
}
示例11: getSolutionOutput
//.........这里部分代码省略.........
// generate the question output
include_once "./Services/UICore/classes/class.ilTemplate.php";
$template = new ilTemplate("tpl.il_as_qpl_mc_sr_output_solution.html", TRUE, TRUE, "Modules/TestQuestionPool");
$solutiontemplate = new ilTemplate("tpl.il_as_tst_solution_output.html", TRUE, TRUE, "Modules/TestQuestionPool");
foreach ($keys as $answer_id) {
$answer = $this->object->answers[$answer_id];
if ($active_id > 0 && !$show_correct_solution) {
if ($graphicalOutput) {
// output of ok/not ok icons for user entered solutions
$ok = FALSE;
if (strcmp($user_solution, $answer_id) == 0) {
if ($answer->getPoints() == $this->object->getMaximumPoints()) {
$ok = TRUE;
} else {
$ok = FALSE;
}
if ($ok) {
$template->setCurrentBlock("icon_ok");
$template->setVariable("ICON_OK", ilUtil::getImagePath("icon_ok.png"));
$template->setVariable("TEXT_OK", $this->lng->txt("answer_is_right"));
$template->parseCurrentBlock();
} else {
$template->setCurrentBlock("icon_not_ok");
if ($answer->getPoints() > 0) {
$template->setVariable("ICON_NOT_OK", ilUtil::getImagePath("icon_mostly_ok.png"));
$template->setVariable("TEXT_NOT_OK", $this->lng->txt("answer_is_not_correct_but_positive"));
} else {
$template->setVariable("ICON_NOT_OK", ilUtil::getImagePath("icon_not_ok.png"));
$template->setVariable("TEXT_NOT_OK", $this->lng->txt("answer_is_wrong"));
}
$template->parseCurrentBlock();
}
}
if (strlen($user_solution) == 0) {
$template->setCurrentBlock("icon_not_ok");
$template->setVariable("ICON_NOT_OK", ilUtil::getImagePath("icon_not_ok.png"));
$template->setVariable("TEXT_NOT_OK", $this->lng->txt("answer_is_wrong"));
$template->parseCurrentBlock();
}
}
}
if (strlen($answer->getImage())) {
$template->setCurrentBlock("answer_image");
if ($this->object->getThumbSize()) {
$template->setVariable("ANSWER_IMAGE_URL", $this->object->getImagePathWeb() . $this->object->getThumbPrefix() . $answer->getImage());
} else {
$template->setVariable("ANSWER_IMAGE_URL", $this->object->getImagePathWeb() . $answer->getImage());
}
$alt = $answer->getImage();
if (strlen($answer->getAnswertext())) {
$alt = $answer->getAnswertext();
}
$alt = preg_replace("/<[^>]*?>/", "", $alt);
$template->setVariable("ANSWER_IMAGE_ALT", ilUtil::prepareFormOutput($alt));
$template->setVariable("ANSWER_IMAGE_TITLE", ilUtil::prepareFormOutput($alt));
$template->parseCurrentBlock();
}
if ($show_feedback) {
if (strcmp($user_solution, $answer_id) == 0) {
$fb = $this->object->getFeedbackSingleAnswer($answer_id);
if (strlen($fb)) {
$template->setCurrentBlock("feedback");
$template->setVariable("FEEDBACK", $fb);
$template->parseCurrentBlock();
}
}
}
$template->setCurrentBlock("answer_row");
$template->setVariable("ANSWER_TEXT", $this->object->prepareTextareaOutput($answer->getAnswertext(), TRUE));
if (strcmp($user_solution, $answer_id) == 0) {
$template->setVariable("SOLUTION_IMAGE", ilUtil::getHtmlPath(ilUtil::getImagePath("radiobutton_checked.png")));
$template->setVariable("SOLUTION_ALT", $this->lng->txt("checked"));
} else {
$template->setVariable("SOLUTION_IMAGE", ilUtil::getHtmlPath(ilUtil::getImagePath("radiobutton_unchecked.png")));
$template->setVariable("SOLUTION_ALT", $this->lng->txt("unchecked"));
}
if ($result_output) {
$points = $this->object->answers[$answer_id]->getPoints();
$resulttext = $points == 1 ? "(%s " . $this->lng->txt("point") . ")" : "(%s " . $this->lng->txt("points") . ")";
$template->setVariable("RESULT_OUTPUT", sprintf($resulttext, $points));
}
$template->parseCurrentBlock();
}
$questiontext = $this->object->getQuestion();
if ($show_question_text == true) {
$template->setVariable("QUESTIONTEXT", $this->object->prepareTextareaOutput($questiontext, TRUE));
}
$questionoutput = $template->get();
$feedback = $show_feedback ? $this->getAnswerFeedbackOutput($active_id, $pass) : "";
if (strlen($feedback)) {
$solutiontemplate->setVariable("FEEDBACK", $feedback);
}
$solutiontemplate->setVariable("SOLUTION_OUTPUT", $questionoutput);
$solutionoutput = $solutiontemplate->get();
if (!$show_question_only) {
// get page object output
$solutionoutput = '<div class="ilc_question_Standard">' . $solutionoutput . "</div>";
}
return $solutionoutput;
}
示例12: getPrintView
public function getPrintView($question_title = 1, $show_questiontext = 1, $survey_id = null)
{
$template = new ilTemplate("tpl.il_svy_qpl_text_printview.html", TRUE, TRUE, "Modules/SurveyQuestionPool");
if ($show_questiontext) {
$this->outQuestionText($template);
}
if ($question_title) {
$template->setVariable("QUESTION_TITLE", $this->object->getTitle());
}
$template->setVariable("TEXT_ANSWER", $this->lng->txt("answer"));
$template->setVariable("TEXTBOX_IMAGE", ilUtil::getHtmlPath(ilUtil::getImagePath("textbox.png")));
$template->setVariable("TEXTBOX", $this->lng->txt("textbox"));
$template->setVariable("TEXTBOX_WIDTH", $this->object->getTextWidth() * 16);
$template->setVariable("TEXTBOX_HEIGHT", $this->object->getTextHeight() * 16);
$template->setVariable("QUESTION_ID", $this->object->getId());
if ($this->object->getMaxChars()) {
$template->setVariable("TEXT_MAXCHARS", sprintf($this->lng->txt("text_maximum_chars_allowed"), $this->object->getMaxChars()));
}
return $template->get();
}
示例13: getPrintView
/**
* Creates a HTML representation of the question
*
* @access private
*/
function getPrintView($question_title = 1, $show_questiontext = 1, $survey_id = null, array $a_working_data = null)
{
$options = $this->getParsedAnswers($a_working_data);
// rendering
$template = new ilTemplate("tpl.il_svy_qpl_sc_printview.html", TRUE, TRUE, "Modules/SurveyQuestionPool");
switch ($this->object->orientation) {
case 0:
// vertical orientation
foreach ($options as $option) {
if ($option["other"]) {
$template->setCurrentBlock("other_row");
$template->setVariable("IMAGE_RADIO", ilUtil::getHtmlPath(ilUtil::getImagePath("radiobutton_" . $option["checked"] . ".png")));
$template->setVariable("ALT_RADIO", $this->lng->txt($option["checked"]));
$template->setVariable("TITLE_RADIO", $this->lng->txt($option["checked"]));
$template->setVariable("OTHER_LABEL", ilUtil::prepareFormOutput($option["title"]));
$template->setVariable("OTHER_ANSWER", $option["textanswer"] ? ilUtil::prepareFormOutput($option["textanswer"]) : " ");
$template->parseCurrentBlock();
} else {
$template->setCurrentBlock("row");
$template->setVariable("IMAGE_RADIO", ilUtil::getHtmlPath(ilUtil::getImagePath("radiobutton_" . $option["checked"] . ".png")));
$template->setVariable("ALT_RADIO", $this->lng->txt($option["checked"]));
$template->setVariable("TITLE_RADIO", $this->lng->txt($option["checked"]));
$template->setVariable("TEXT_SC", ilUtil::prepareFormOutput($option["title"]));
$template->parseCurrentBlock();
}
}
break;
case 1:
// horizontal orientation
foreach ($options as $option) {
$template->setCurrentBlock("radio_col");
$template->setVariable("IMAGE_RADIO", ilUtil::getHtmlPath(ilUtil::getImagePath("radiobutton_" . $option["checked"] . ".png")));
$template->setVariable("ALT_RADIO", $this->lng->txt($option["checked"]));
$template->setVariable("TITLE_RADIO", $this->lng->txt($option["checked"]));
$template->parseCurrentBlock();
}
foreach ($options as $option) {
if ($option["other"]) {
$template->setCurrentBlock("other_text_col");
$template->setVariable("OTHER_LABEL", ilUtil::prepareFormOutput($option["title"]));
$template->setVariable("OTHER_ANSWER", $option["textanswer"] ? ilUtil::prepareFormOutput($option["textanswer"]) : " ");
$template->parseCurrentBlock();
} else {
$template->setCurrentBlock("text_col");
$template->setVariable("TEXT_SC", ilUtil::prepareFormOutput($option["title"]));
$template->parseCurrentBlock();
}
}
break;
case 2:
foreach ($options as $option) {
$template->setCurrentBlock("comborow");
$template->setVariable("TEXT_SC", ilUtil::prepareFormOutput($option["title"]));
$template->setVariable("VALUE_SC", $option["value"]);
if ($option["checked"] == "checked") {
$template->setVariable("SELECTED_SC", ' selected="selected"');
}
$template->parseCurrentBlock();
}
$template->setCurrentBlock("combooutput");
$template->setVariable("QUESTION_ID", $this->object->getId());
$template->setVariable("SELECT_OPTION", $this->lng->txt("select_option"));
$template->setVariable("TEXT_SELECTION", $this->lng->txt("selection"));
$template->parseCurrentBlock();
break;
}
if ($question_title) {
$template->setVariable("QUESTION_TITLE", $this->object->getTitle());
}
if ($show_questiontext) {
$this->outQuestionText($template);
}
$template->parseCurrentBlock();
return $template->get();
}
示例14: printobject
/**
* Print tab to create a print of all questions with points and solutions
*
* Print tab to create a print of all questions with points and solutions
*
* @access public
*/
function printobject()
{
global $ilAccess, $ilias;
if (!$ilAccess->checkAccess("write", "", $this->ref_id)) {
// allow only write access
ilUtil::sendInfo($this->lng->txt("cannot_edit_test"), true);
$this->ctrl->redirect($this, "infoScreen");
}
$this->getQuestionsSubTabs();
$template = new ilTemplate("tpl.il_as_tst_print_test_confirm.html", TRUE, TRUE, "Modules/Test");
include_once './Services/WebServices/RPC/classes/class.ilRPCServerSettings.php';
if (ilRPCServerSettings::getInstance()->isEnabled()) {
$this->ctrl->setParameter($this, "pdf", "1");
$template->setCurrentBlock("pdf_export");
$template->setVariable("PDF_URL", $this->ctrl->getLinkTarget($this, "print"));
$this->ctrl->setParameter($this, "pdf", "");
$template->setVariable("PDF_TEXT", $this->lng->txt("pdf_export"));
$template->setVariable("PDF_IMG_ALT", $this->lng->txt("pdf_export"));
$template->setVariable("PDF_IMG_URL", ilUtil::getHtmlPath(ilUtil::getImagePath("application-pdf.png")));
$template->parseCurrentBlock();
}
$this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print.css", "Modules/Test"), "print");
global $ilUser;
$print_date = mktime(date("H"), date("i"), date("s"), date("m"), date("d"), date("Y"));
$max_points = 0;
$counter = 1;
foreach ($this->object->questions as $question) {
$template->setCurrentBlock("question");
$question_gui = $this->object->createQuestionGUI("", $question);
$template->setVariable("COUNTER_QUESTION", $counter . ".");
$template->setVariable("QUESTION_TITLE", ilUtil::prepareFormOutput($question_gui->object->getTitle()));
if ($question_gui->object->getMaximumPoints() == 1) {
$template->setVariable("QUESTION_POINTS", $question_gui->object->getMaximumPoints() . " " . $this->lng->txt("point"));
} else {
$template->setVariable("QUESTION_POINTS", $question_gui->object->getMaximumPoints() . " " . $this->lng->txt("points"));
}
$result_output = $question_gui->getSolutionOutput("", NULL, FALSE, TRUE, FALSE, $this->object->getShowSolutionFeedback());
if (strlen($result_output) == 0) {
$result_output = $question_gui->getPreview(FALSE);
}
$template->setVariable("SOLUTION_OUTPUT", $result_output);
$template->parseCurrentBlock("question");
$counter++;
$max_points += $question_gui->object->getMaximumPoints();
}
$template->setCurrentBlock("navigation_buttons");
$template->setVariable("BUTTON_PRINT", $this->lng->txt("print"));
$template->parseCurrentBlock();
$template->setVariable("TITLE", ilUtil::prepareFormOutput($this->object->getTitle()));
$template->setVariable("PRINT_TEST", ilUtil::prepareFormOutput($this->lng->txt("tst_print")));
$template->setVariable("TXT_PRINT_DATE", ilUtil::prepareFormOutput($this->lng->txt("date")));
$template->setVariable("VALUE_PRINT_DATE", ilUtil::prepareFormOutput(strftime("%c", $print_date)));
$template->setVariable("TXT_MAXIMUM_POINTS", ilUtil::prepareFormOutput($this->lng->txt("tst_maximum_points")));
$template->setVariable("VALUE_MAXIMUM_POINTS", ilUtil::prepareFormOutput($max_points));
if (array_key_exists("pdf", $_GET) && $_GET["pdf"] == 1) {
$this->object->deliverPDFfromHTML($template->get(), $this->object->getTitle());
} else {
$this->tpl->setVariable("PRINT_CONTENT", $template->get());
}
}
示例15: getPrintView
/**
* Creates a HTML representation of the question
*
* @access private
*/
function getPrintView($question_title = 1, $show_questiontext = 1, $survey_id = null, array $a_working_data = null)
{
$options = $this->getParsedAnswers($a_working_data);
$template = new ilTemplate("tpl.il_svy_qpl_mc_printview.html", TRUE, TRUE, "Modules/SurveyQuestionPool");
switch ($this->object->getOrientation()) {
case 0:
// vertical orientation
foreach ($options as $option) {
if ($option["other"]) {
$template->setCurrentBlock("other_row");
$template->setVariable("IMAGE_CHECKBOX", ilUtil::getHtmlPath(ilUtil::getImagePath("checkbox_" . $option["checked"] . ".png")));
$template->setVariable("ALT_CHECKBOX", $this->lng->txt($option["checked"]));
$template->setVariable("TITLE_CHECKBOX", $this->lng->txt($option["checked"]));
$template->setVariable("OTHER_LABEL", ilUtil::prepareFormOutput($option["title"]));
$template->setVariable("OTHER_ANSWER", $option["textanswer"] ? ilUtil::prepareFormOutput($option["textanswer"]) : " ");
$template->parseCurrentBlock();
} else {
$template->setCurrentBlock("mc_row");
$template->setVariable("IMAGE_CHECKBOX", ilUtil::getHtmlPath(ilUtil::getImagePath("checkbox_" . $option["checked"] . ".png")));
$template->setVariable("ALT_CHECKBOX", $this->lng->txt($option["checked"]));
$template->setVariable("TITLE_CHECKBOX", $this->lng->txt($option["checked"]));
$template->setVariable("TEXT_MC", ilUtil::prepareFormOutput($option["title"]));
$template->parseCurrentBlock();
}
}
break;
case 1:
// horizontal orientation
foreach ($options as $option) {
$template->setCurrentBlock("checkbox_col");
$template->setVariable("IMAGE_CHECKBOX", ilUtil::getHtmlPath(ilUtil::getImagePath("checkbox_" . $option["checked"] . ".png")));
$template->setVariable("ALT_CHECKBOX", $this->lng->txt($option["checked"]));
$template->setVariable("TITLE_CHECKBOX", $this->lng->txt($option["checked"]));
$template->parseCurrentBlock();
}
foreach ($options as $option) {
if ($option["other"]) {
$template->setCurrentBlock("other_text_col");
$template->setVariable("OTHER_LABEL", ilUtil::prepareFormOutput($option["title"]));
$template->setVariable("OTHER_ANSWER", $option["textanswer"] ? ilUtil::prepareFormOutput($option["textanswer"]) : " ");
$template->parseCurrentBlock();
} else {
$template->setCurrentBlock("text_col");
$template->setVariable("TEXT_MC", ilUtil::prepareFormOutput($option["title"]));
$template->parseCurrentBlock();
}
}
break;
}
if ($this->object->use_min_answers) {
$template->setCurrentBlock('min_max_msg');
if ($this->object->nr_min_answers > 0 && $this->object->nr_max_answers > 0) {
$template->setVariable('MIN_MAX_MSG', sprintf($this->lng->txt('msg_min_max_nr_answers'), $this->object->nr_min_answers, $this->object->nr_max_answers));
} else {
if ($this->object->nr_min_answers > 0) {
$template->setVariable('MIN_MAX_MSG', sprintf($this->lng->txt('msg_min_nr_answers'), $this->object->nr_min_answers));
} else {
if ($this->object->nr_max_answers > 0) {
$template->setVariable('MIN_MAX_MSG', sprintf($this->lng->txt('msg_max_nr_answers'), $this->object->nr_max_answers));
}
}
}
$template->parseCurrentBlock();
}
if ($show_questiontext) {
$this->outQuestionText($template);
}
if ($question_title) {
$template->setVariable("QUESTION_TITLE", $this->object->getTitle());
}
$template->parseCurrentBlock();
return $template->get();
}