本文整理汇总了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;
}