当前位置: 首页>>代码示例>>PHP>>正文


PHP assQuestion::_getQuestionTypeName方法代码示例

本文整理汇总了PHP中assQuestion::_getQuestionTypeName方法的典型用法代码示例。如果您正苦于以下问题:PHP assQuestion::_getQuestionTypeName方法的具体用法?PHP assQuestion::_getQuestionTypeName怎么用?PHP assQuestion::_getQuestionTypeName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在assQuestion的用法示例。


在下文中一共展示了assQuestion::_getQuestionTypeName方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: outQuestionType

 public function outQuestionType()
 {
     $count = $this->object->isInUse();
     if (assQuestion::_questionExistsInPool($this->object->getId()) && $count) {
         global $rbacsystem;
         if ($rbacsystem->checkAccess("write", $_GET["ref_id"])) {
             ilUtil::sendInfo(sprintf($this->lng->txt("qpl_question_is_in_use"), $count));
         }
     }
     return assQuestion::_getQuestionTypeName($this->object->getQuestionType());
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:11,代码来源:class.assQuestionGUI.php

示例2: setTitleAndDescription

 /**
  * called by prepare output
  */
 function setTitleAndDescription()
 {
     parent::setTitleAndDescription();
     if ($_GET["q_id"] > 0) {
         include_once "./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
         $q_gui = assQuestionGUI::_getQuestionGUI("", $_GET["q_id"]);
         if ($q_gui->object instanceof assQuestion) {
             $q_gui->object->setObjId($this->object->getId());
             $title = $q_gui->object->getTitle();
             if (!$title) {
                 $title = $this->lng->txt('new') . ': ' . assQuestion::_getQuestionTypeName($q_gui->object->getQuestionType());
             }
             $this->tpl->setTitle($title);
             $this->tpl->setDescription($q_gui->object->getComment());
             if ($this->object instanceof ilObjectPlugin) {
                 $this->tpl->setTitleIcon($this->object->plugin->getImagePath("icon_" . $this->object->getType() . ".svg"), $this->lng->txt("obj_" . $this->object->getType()));
             } else {
                 $this->tpl->setTitleIcon(ilObject::_getIcon("", "big", $this->object->getType()));
             }
         } else {
             // Workaround for context issues: If no object was found, redirect without q_id parameter
             $this->ctrl->setParameter($this, 'q_id', '');
             $this->ctrl->redirect($this);
         }
     } else {
         $this->tpl->setTitle($this->object->getTitle());
         $this->tpl->setDescription($this->object->getLongDescription());
         $this->tpl->setTitleIcon(ilObject::_getIcon("", "big", $this->object->getType()));
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:33,代码来源:class.ilObjQuestionPoolGUI.php

示例3: fillRow

 /**
  * fill row 
  *
  * @access public
  * @param
  * @return
  */
 public function fillRow($data)
 {
     global $ilUser, $ilAccess;
     $q_id = $data["question_id"];
     $this->tpl->setVariable("QUESTION_ID", $q_id);
     if (isset($this->visibleOptionalColumns['qid'])) {
         $this->tpl->setVariable("QUESTION_ID_PRESENTATION", $q_id);
     }
     if ($this->getWriteAccess() && !$this->getTotal() && $data["obj_fi"] > 0) {
         if (!$data['complete']) {
             $this->tpl->setVariable("IMAGE_WARNING", ilUtil::getImagePath("warning.png"));
             $this->tpl->setVariable("ALT_WARNING", $this->lng->txt("warning_question_not_complete"));
             $this->tpl->setVariable("TITLE_WARNING", $this->lng->txt("warning_question_not_complete"));
         }
         $qpl_ref_id = current(ilObject::_getAllReferences($data["obj_fi"]));
         $this->tpl->setVariable("QUESTION_TITLE", "<a href=\"" . $this->ctrl->getLinkTarget($this->getParentObject(), "questions") . "&eqid={$q_id}&eqpl={$qpl_ref_id}" . "\">" . $data["title"] . "</a>");
         // obligatory checkbox (when obligation is possible)
         if ($data["obligationPossible"]) {
             $CHECKED = $data["obligatory"] ? "checked=\"checked\" " : "";
             $OBLIGATORY = "<input type=\"checkbox\" name=\"obligatory[{$q_id}]\" value=\"1\" {$CHECKED}/>";
         } else {
             $OBLIGATORY = "";
         }
     } else {
         global $lng;
         $this->tpl->setVariable("QUESTION_TITLE", $data["title"]);
         // obligatory icon
         if ($data["obligatory"]) {
             $OBLIGATORY = "<img src=\"" . ilUtil::getImagePath("obligatory.gif", "Modules/Test") . "\" alt=\"" . $lng->txt("question_obligatory") . "\" title=\"" . $lng->txt("question_obligatory") . "\" />";
         } else {
             $OBLIGATORY = '';
         }
     }
     if ($this->parent_obj->object->areObligationsEnabled()) {
         $this->tpl->setVariable("QUESTION_OBLIGATORY", $OBLIGATORY);
     }
     $this->tpl->setVariable("QUESTION_SEQUENCE", $this->lng->txt("tst_sequence"));
     if ($this->getWriteAccess() && !$this->getTotal()) {
         if ($data["sequence"] != 1) {
             $this->tpl->setVariable("BUTTON_UP", "<a href=\"" . $this->ctrl->getLinkTarget($this->getParentObject(), "questions") . "&up=" . $data["question_id"] . "\"><img src=\"" . ilUtil::getImagePath("a_up.png") . "\" alt=\"" . $this->lng->txt("up") . "\" border=\"0\" /></a>");
         }
         if ($data["sequence"] != count($this->getData())) {
             $this->tpl->setVariable("BUTTON_DOWN", "<a href=\"" . $this->ctrl->getLinkTarget($this->getParentObject(), "questions") . "&down=" . $data["question_id"] . "\"><img src=\"" . ilUtil::getImagePath("a_down.png") . "\" alt=\"" . $this->lng->txt("down") . "\" border=\"0\" /></a>");
         }
     }
     if (isset($this->visibleOptionalColumns['description'])) {
         if ($data["description"]) {
             $this->tpl->setVariable("QUESTION_COMMENT", $data["description"] ? $data["description"] : '&nbsp;');
         } else {
             $this->tpl->touchBlock('question_comment_block');
         }
     }
     include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
     $this->tpl->setVariable("QUESTION_TYPE", assQuestion::_getQuestionTypeName($data["type_tag"]));
     $this->tpl->setVariable("QUESTION_POINTS", $data["points"]);
     $this->totalPoints += $data["points"];
     if (isset($this->visibleOptionalColumns['author'])) {
         $this->tpl->setVariable("QUESTION_AUTHOR", $data["author"]);
     }
     if (ilObject::_lookupType($data["orig_obj_fi"]) == 'qpl') {
         $this->tpl->setVariable("QUESTION_POOL", ilObject::_lookupTitle($data["orig_obj_fi"]));
     } else {
         $this->tpl->setVariable("QUESTION_POOL", '&nbsp;');
     }
     $this->position += 10;
     $field = "<input type=\"text\" name=\"order[q_" . $data["question_id"] . "]\" value=\"" . $this->position . "\" maxlength=\"3\" style=\"width:30px\" />";
     $this->tpl->setVariable("QUESTION_POSITION", $field);
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:75,代码来源:class.ilTestQuestionsTableGUI.php

示例4: fillRow

 /**
  * fill row
  *
  * @param array $data
  *
  * @return void
  */
 public function fillRow($data)
 {
     $this->tpl->setVariable("QUESTION_ID", $data["question_id"]);
     $this->tpl->setVariable("QUESTION_TITLE", $data["title"]);
     $this->tpl->setVariable("QUESTION_COMMENT", $data["description"]);
     include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
     $this->tpl->setVariable("QUESTION_TYPE", assQuestion::_getQuestionTypeName($data["type_tag"]));
     $this->tpl->setVariable("QUESTION_AUTHOR", $data["author"]);
     $this->tpl->setVariable("QUESTION_CREATED", ilDatePresentation::formatDate(new ilDate($data['created'], IL_CAL_UNIX)));
     $this->tpl->setVariable("QUESTION_UPDATED", ilDatePresentation::formatDate(new ilDate($data["tstamp"], IL_CAL_UNIX)));
     $this->tpl->setVariable("QUESTION_POOL", $data['qpl']);
     $this->tpl->setVariable("WORKING_TIME", $data['working_time']);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:20,代码来源:class.ilTestQuestionBrowserTableGUI.php

示例5: removeQuestionsForm

 /**
  * Displays a form to confirm the removal of questions from the test
  *
  * Displays a form to confirm the removal of questions from the test
  *
  * @access    public
  */
 function removeQuestionsForm($checked_questions)
 {
     $total = $this->object->evalTotalPersons();
     if ($total) {
         // the test was executed previously
         $question = sprintf($this->lng->txt("tst_remove_questions_and_results"), $total);
     } else {
         if (count($checked_questions) == 1) {
             $question = $this->lng->txt("tst_remove_question");
         } else {
             $question = $this->lng->txt("tst_remove_questions");
         }
     }
     include_once "./Services/Utilities/classes/class.ilConfirmationGUI.php";
     $cgui = new ilConfirmationGUI();
     $cgui->setHeaderText($question);
     $this->ctrl->saveParameter($this, 'test_express_mode');
     $this->ctrl->saveParameter($this, 'q_id');
     $cgui->setFormAction($this->ctrl->getFormAction($this));
     $cgui->setCancel($this->lng->txt("cancel"), "cancelRemoveQuestions");
     $cgui->setConfirm($this->lng->txt("confirm"), "confirmRemoveQuestions");
     include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
     $removablequestions =& $this->object->getTestQuestions();
     if (count($removablequestions)) {
         foreach ($removablequestions as $data) {
             if (in_array($data["question_id"], $checked_questions)) {
                 $txt = $data["title"] . " (" . assQuestion::_getQuestionTypeName($data["type_tag"]) . ")";
                 $txt .= ' [' . $this->lng->txt('question_id_short') . ': ' . $data['question_id'] . ']';
                 if ($data["description"]) {
                     $txt .= "<div class=\"small\">" . $data["description"] . "</div>";
                 }
                 $cgui->addItem("q_id[]", $data["question_id"], $txt);
             }
         }
     }
     $this->tpl->setContent($cgui->getHTML());
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:44,代码来源:class.ilObjTestGUI.php

示例6: fillRow

 /**
  * fill row 
  *
  * @access public
  * @param
  * @return
  */
 public function fillRow($data)
 {
     global $ilUser, $ilAccess;
     include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
     include_once "./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
     $class = strtolower(assQuestionGUI::_getGUIClassNameForId($data["question_id"]));
     $this->ctrl->setParameterByClass("ilpageobjectgui", "q_id", $data["question_id"]);
     $this->ctrl->setParameterByClass($class, "q_id", $data["question_id"]);
     $points = 0;
     if (!$this->confirmdelete) {
         $this->tpl->setCurrentBlock('checkbox');
         $this->tpl->setVariable('CB_QUESTION_ID', $data["question_id"]);
         $this->tpl->parseCurrentBlock();
         if ($this->getEditable()) {
             $this->tpl->setCurrentBlock("edit_link");
             $this->tpl->setVariable("TXT_EDIT", $this->lng->txt("edit"));
             $this->tpl->setVariable("LINK_EDIT", $this->ctrl->getLinkTargetByClass("ilpageobjectgui", "edit"));
             $this->tpl->parseCurrentBlock();
         }
         if ($data["complete"] == 0) {
             $this->tpl->setCurrentBlock("qpl_warning");
             $this->tpl->setVariable("IMAGE_WARNING", ilUtil::getImagePath("warning.png"));
             $this->tpl->setVariable("ALT_WARNING", $this->lng->txt("warning_question_not_complete"));
             $this->tpl->setVariable("TITLE_WARNING", $this->lng->txt("warning_question_not_complete"));
             $this->tpl->parseCurrentBlock();
         } else {
             $points = $data["points"];
         }
         $this->totalPoints += $points;
         foreach ($this->getSelectedColumns() as $c) {
             if (strcmp($c, 'points') == 0) {
                 $this->tpl->setCurrentBlock('points');
                 $this->tpl->setVariable("QUESTION_POINTS", $points);
                 $this->tpl->parseCurrentBlock();
             }
             if (strcmp($c, 'statistics') == 0) {
                 $this->tpl->setCurrentBlock('statistics');
                 $this->tpl->setVariable("LINK_ASSESSMENT", $this->ctrl->getLinkTargetByClass($class, "assessment"));
                 $this->tpl->setVariable("TXT_ASSESSMENT", $this->lng->txt("statistics"));
                 include_once "./Services/Utilities/classes/class.ilUtil.php";
                 $this->tpl->setVariable("IMG_ASSESSMENT", ilUtil::getImagePath("assessment.gif", "Modules/TestQuestionPool"));
                 $this->tpl->parseCurrentBlock();
             }
             if (strcmp($c, 'author') == 0) {
                 $this->tpl->setCurrentBlock('author');
                 $this->tpl->setVariable("QUESTION_AUTHOR", $data["author"]);
                 $this->tpl->parseCurrentBlock();
             }
             if (strcmp($c, 'created') == 0) {
                 $this->tpl->setCurrentBlock('created');
                 $this->tpl->setVariable('QUESTION_CREATED', ilDatePresentation::formatDate(new ilDateTime($data['created'], IL_CAL_UNIX)));
                 $this->tpl->parseCurrentBlock();
             }
             if (strcmp($c, 'tstamp') == 0) {
                 $this->tpl->setCurrentBlock('updated');
                 $this->tpl->setVariable('QUESTION_UPDATED', ilDatePresentation::formatDate(new ilDateTime($data['tstamp'], IL_CAL_UNIX)));
                 $this->tpl->parseCurrentBlock();
             }
         }
         $this->tpl->setCurrentBlock('preview');
         $this->tpl->setVariable("TXT_PREVIEW", $this->lng->txt("preview"));
         $this->tpl->setVariable("LINK_PREVIEW", $this->ctrl->getLinkTargetByClass("ilpageobjectgui", "preview"));
         $this->tpl->parseCurrentBlock();
     } else {
         $this->tpl->setCurrentBlock('hidden');
         $this->tpl->setVariable('HIDDEN_QUESTION_ID', $data["question_id"]);
         $this->tpl->parseCurrentBlock();
     }
     foreach ($this->getSelectedColumns() as $c) {
         if (strcmp($c, 'description') == 0) {
             $this->tpl->setCurrentBlock('description');
             $this->tpl->setVariable("QUESTION_COMMENT", strlen($data["description"]) ? $data["description"] : "&nbsp;");
             $this->tpl->parseCurrentBlock();
         }
         if (strcmp($c, 'type') == 0) {
             $this->tpl->setCurrentBlock('type');
             $this->tpl->setVariable("QUESTION_TYPE", assQuestion::_getQuestionTypeName($data["type_tag"]));
             $this->tpl->parseCurrentBlock();
         }
     }
     $this->tpl->setVariable('QUESTION_ID', $data["question_id"]);
     $this->tpl->setVariable("QUESTION_TITLE", $data["title"]);
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:90,代码来源:class.ilQuestionBrowserTableGUI.php

示例7: fillRow

 /**
  * Fill row 
  *
  * @param array $a_set data array
  */
 public function fillRow($a_set)
 {
     global $ilCtrl, $lng;
     //var_dump($a_set);
     // action: copy
     $ilCtrl->setParameter($this->parent_obj, "q_id", $a_set["question_id"]);
     $ilCtrl->setParameter($this->parent_obj, "subCmd", "copyQuestion");
     $this->tpl->setCurrentBlock("cmd");
     $this->tpl->setVariable("HREF_CMD", $ilCtrl->getLinkTarget($this->parent_obj, $this->parent_cmd));
     $this->tpl->setVariable("TXT_CMD", $lng->txt("cont_copy_question_into_page"));
     $this->tpl->parseCurrentBlock();
     $ilCtrl->setParameter($this->parent_obj, "subCmd", "listPoolQuestions");
     // properties
     $this->tpl->setVariable("TITLE", $a_set["title"]);
     $this->tpl->setVariable("TYPE", assQuestion::_getQuestionTypeName($a_set["type_tag"]));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:21,代码来源:class.ilCopySelfAssQuestionTableGUI.php

示例8: outQuestionType

 public function outQuestionType()
 {
     include_once "./Services/UICore/classes/class.ilTemplate.php";
     $template = new ilTemplate("tpl.il_as_qpl_questiontype.html", TRUE, TRUE, "Modules/TestQuestionPool");
     $count = $this->object->isInUse();
     if (assQuestion::_questionExistsInPool($this->object->getId()) && $count) {
         global $rbacsystem;
         if ($rbacsystem->checkAccess("write", $_GET["ref_id"])) {
             $template->setCurrentBlock("infosign");
             $template->setVariable("INFO_IMG_SRC", ilUtil::getImagePath("messagebox_tip.png"));
             $template->setVariable("INFO_IMG_ALT", sprintf($this->lng->txt("qpl_question_is_in_use"), $count));
             $template->setVariable("INFO_IMG_TITLE", sprintf($this->lng->txt("qpl_question_is_in_use"), $count));
             $template->parseCurrentBlock();
         }
     }
     $template->setVariable("TEXT_QUESTION_TYPE", assQuestion::_getQuestionTypeName($this->object->getQuestionType()));
     return $template->get();
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:18,代码来源:class.assQuestionGUI.php


注:本文中的assQuestion::_getQuestionTypeName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。