本文整理匯總了PHP中ilYuiUtil::initDragDropAnimation方法的典型用法代碼示例。如果您正苦於以下問題:PHP ilYuiUtil::initDragDropAnimation方法的具體用法?PHP ilYuiUtil::initDragDropAnimation怎麽用?PHP ilYuiUtil::initDragDropAnimation使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ilYuiUtil
的用法示例。
在下文中一共展示了ilYuiUtil::initDragDropAnimation方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getTestOutput
function getTestOutput($active_id, $pass = NULL, $is_postponed = FALSE, $use_post_solutions = FALSE, $show_feedback = FALSE)
{
// generate the question output
$template = new ilTemplate("tpl.il_as_qpl_orderinghorizontal_output.html", TRUE, TRUE, "Modules/TestQuestionPool");
$elements = $this->object->getRandomOrderingElements();
if ($active_id) {
$solutions = NULL;
include_once "./Modules/Test/classes/class.ilObjTest.php";
if (!ilObjTest::_getUsePreviousAnswers($active_id, true)) {
if (is_null($pass)) {
$pass = ilObjTest::_getPass($active_id);
}
}
$solutions =& $this->object->getSolutionValues($active_id, $pass);
if (count($solutions) == 1) {
$elements = split("{::}", $solutions[0]["value1"]);
}
}
if (strlen($_SESSION['qst_selection'])) {
$this->object->moveRight($_SESSION['qst_selection'], $active_id, $pass);
unset($_SESSION['qst_selection']);
$solutions =& $this->object->getSolutionValues($active_id, $pass);
if (count($solutions) == 1) {
$elements = split("{::}", $solutions[0]["value1"]);
}
}
if (count($solutions) == 0) {
$_SESSION['qst_ordering_horizontal_elements'] = $elements;
} else {
unset($_SESSION['qst_ordering_horizontal_elements']);
}
$idx = 0;
foreach ($elements as $id => $element) {
$template->setCurrentBlock("element");
$template->setVariable("ELEMENT_ID", "e_" . $this->object->getId() . "_{$id}");
$template->setVariable("ELEMENT_VALUE", ilUtil::prepareFormOutput($element));
$this->ctrl->setParameterByClass('iltestoutputgui', 'qst_selection', $idx);
$idx++;
$url = $this->ctrl->getLinkTargetByClass('iltestoutputgui', 'gotoQuestion');
$template->setVariable("MOVE_RIGHT", $url);
$template->setVariable("TEXT_MOVE_RIGHT", $this->lng->txt('move_right'));
$template->setVariable("RIGHT_IMAGE", ilUtil::getImagePath('nav_arr_R.png'));
$template->parseCurrentBlock();
}
if ($this->object->textsize >= 10) {
echo $template->setVariable("STYLE", " style=\"font-size: " . $this->object->textsize . "%;\"");
}
$template->setVariable("VALUE_ORDERRESULT", ' value="' . join($elements, '{::}') . '"');
$template->setVariable("QUESTIONTEXT", $this->object->prepareTextareaOutput($this->object->getQuestion(), TRUE));
$questionoutput = $template->get();
if (!$show_question_only) {
// get page object output
$questionoutput = $this->getILIASPage($questionoutput);
}
include_once "./Services/YUI/classes/class.ilYuiUtil.php";
ilYuiUtil::initDragDropAnimation();
$this->tpl->addJavascript("./Modules/TestQuestionPool/templates/default/orderinghorizontal.js");
$questionoutput = $template->get();
$pageoutput = $this->outQuestionPage("", $is_postponed, $active_id, $questionoutput);
return $pageoutput;
}