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


PHP assQuestion::_getTitle方法代码示例

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


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

示例1: send

 /**
  * Send notifications
  * @return 
  */
 public function send()
 {
     global $ilUser;
     switch ($this->getType()) {
         case self::TYPE_USER_BLOCKED:
             foreach ($this->getRecipients() as $rcp) {
                 $this->initLanguage($rcp);
                 $this->initMail();
                 $this->setSubject(sprintf($this->getLanguageText('cont_user_blocked'), $this->getObjectTitle(true)));
                 $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage()));
                 $this->appendBody("\n\n");
                 $this->appendBody($this->getLanguageText('cont_user_blocked2'));
                 $this->appendBody("\n");
                 $this->appendBody($this->getLanguageText('cont_user_blocked3') . " '" . $this->getLanguageText('objs_qst') . "' > '" . $this->getLanguageText('cont_blocked_users') . "'");
                 $this->appendBody("\n");
                 $this->appendBody($this->getLanguageText('obj_lm') . ": " . $this->getObjectTitle(true));
                 $this->appendBody("\n");
                 include_once "./Services/User/classes/class.ilUserUtil.php";
                 $this->appendBody($this->getLanguageText('user') . ": " . ilUserUtil::getNamePresentation($ilUser->getId(), false, false, ""));
                 $this->appendBody("\n");
                 include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
                 $this->appendBody($this->getLanguageText('question') . ": " . assQuestion::_getTitle($this->getQuestionId()));
                 $this->appendBody("\n");
                 $this->appendBody("\n\n");
                 $this->appendBody($this->getLanguageText('cont_lm_mail_permanent_link'));
                 $this->appendBody("\n");
                 $this->appendBody($this->createPermanentLink(array(), ""));
                 $this->getMail()->appendInstallationSignature(true);
                 $this->sendMail(array($rcp), array('system'));
             }
             break;
     }
     return true;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:38,代码来源:class.ilLMMailNotification.php

示例2: sahs_questions

 function sahs_questions()
 {
     global $tpl, $lng, $ilCtrl;
     $this->setTabs();
     $this->setLocator();
     include_once "./Services/Table/classes/class.ilTableGUI.php";
     include_once "./Modules/Scorm2004/classes/class.ilSCORM2004Page.php";
     include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
     include_once "./Services/COPage/classes/class.ilPCQuestionGUI.php";
     // load template for table
     $tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl.table.html");
     $tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.scormeditor_sco_question.html", "Modules/Scorm2004");
     $tbl = new ilTableGUI();
     $tbl->setTitle("Questions for " . $this->node_object->getTitle());
     $tbl->setHeaderNames(array("Question", "Page"));
     $cols = array("question", "page");
     $tbl->setHeaderVars($cols, $header_params);
     $tbl->setColumnWidth(array("50%", "50%"));
     $tbl->disable("sort");
     $tbl->disable("footer");
     $tree = new ilTree($this->slm_object->getId());
     $tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
     $tree->setTreeTablePK("slm_id");
     foreach ($tree->getSubTree($tree->getNodeData($this->node_object->getId()), true, 'page') as $page) {
         // get question ids
         include_once "./Services/COPage/classes/class.ilPCQuestion.php";
         $qids = ilPCQuestion::_getQuestionIdsForPage("sahs", $page["obj_id"]);
         if (count($qids) > 0) {
             // output questions
             foreach ($qids as $qid) {
                 $tpl->setCurrentBlock("tbl_content");
                 $tpl->setVariable("TXT_PAGE_TITLE", $page["title"]);
                 $ilCtrl->setParameterByClass("ilscorm2004pagenodegui", "obj_id", $page["obj_id"]);
                 $tpl->setVariable("HREF_EDIT_PAGE", $ilCtrl->getLinkTargetByClass("ilscorm2004pagenodegui", "edit"));
                 $qtitle = assQuestion::_getTitle($qid);
                 $tpl->setVariable("TXT_QUESTION", $qtitle);
                 $ilCtrl->setParameterByClass("ilscorm2004pagenodegui", "obj_id", $page["obj_id"]);
                 //$tpl->setVariable("HREF_EDIT_QUESTION", $ilCtrl->getLinkTargetByClass("ilscorm2004pagenodegui", "edit"));
                 $tpl->setVariable("CSS_ROW", ilUtil::switchColor($i++, "tblrow1", "tblrow2"));
                 $tpl->parseCurrentBlock();
             }
         }
     }
     $tbl->render();
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:45,代码来源:class.ilSCORM2004ScoGUI.php

示例3: assessmentObject

 /**
  * show assessment data of object
  */
 function assessmentObject()
 {
     $this->tpl->addBlockFile("CONTENT", "content", "tpl.il_as_qpl_content.html", "Modules/TestQuestionPool");
     $this->tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
     // catch feedback message
     ilUtil::sendInfo();
     include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
     $question_title = assQuestion::_getTitle($_GET["q_id"]);
     $title = $this->lng->txt("statistics") . " - {$question_title}";
     if (!empty($title)) {
         $this->tpl->setVariable("HEADER", $title);
     }
     include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
     $total_of_answers = assQuestion::_getTotalAnswers($_GET["q_id"]);
     $counter = 0;
     $color_class = array("tblrow1", "tblrow2");
     $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_as_qpl_assessment_of_questions.html", "Modules/TestQuestionPool");
     if (!$total_of_answers) {
         $this->tpl->setCurrentBlock("emptyrow");
         $this->tpl->setVariable("TXT_NO_ASSESSMENT", $this->lng->txt("qpl_assessment_no_assessment_of_questions"));
         $this->tpl->setVariable("COLOR_CLASS", $color_class[$counter % 2]);
         $this->tpl->parseCurrentBlock();
     } else {
         $this->tpl->setCurrentBlock("row");
         $this->tpl->setVariable("TXT_RESULT", $this->lng->txt("qpl_assessment_total_of_answers"));
         $this->tpl->setVariable("TXT_VALUE", $total_of_answers);
         $this->tpl->setVariable("COLOR_CLASS", $color_class[$counter % 2]);
         $counter++;
         $this->tpl->parseCurrentBlock();
         $this->tpl->setCurrentBlock("row");
         $this->tpl->setVariable("TXT_RESULT", $this->lng->txt("qpl_assessment_total_of_right_answers"));
         $this->tpl->setVariable("TXT_VALUE", sprintf("%2.2f", assQuestion::_getTotalRightAnswers($_GET["edit"]) * 100.0) . " %");
         $this->tpl->setVariable("COLOR_CLASS", $color_class[$counter % 2]);
         $this->tpl->parseCurrentBlock();
     }
     $this->tpl->setCurrentBlock("adm_content");
     $this->tpl->setVariable("TXT_QUESTION_TITLE", $question_title);
     $this->tpl->setVariable("TXT_RESULT", $this->lng->txt("result"));
     $this->tpl->setVariable("TXT_VALUE", $this->lng->txt("value"));
     $this->tpl->parseCurrentBlock();
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:44,代码来源:class.ilObjQuestionPoolGUI.php


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