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


PHP assQuestion::sumTimesInISO8601FormatH_i_s_Extended方法代码示例

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


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

示例1: 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("ilAssQuestionPageGUI", "q_id", $data["question_id"]);
     $this->ctrl->setParameterByClass("ilAssQuestionPreviewGUI", "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("ilAssQuestionPageGUI", "edit"));
             $this->tpl->parseCurrentBlock();
         }
         if ($data["complete"] == 0) {
             $this->tpl->setCurrentBlock("qpl_warning");
             $this->tpl->setVariable("IMAGE_WARNING", ilUtil::getImagePath("icon_alert.svg"));
             $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->totalWorkingTime = assQuestion::sumTimesInISO8601FormatH_i_s_Extended($this->totalWorkingTime, $data['working_time']);
         }
         $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();
             }
             if (strcmp($c, 'working_time') == 0) {
                 $this->tpl->setCurrentBlock('working_time');
                 $this->tpl->setVariable('WORKING_TIME', $data["working_time"]);
                 $this->tpl->parseCurrentBlock();
             }
         }
         $this->tpl->setCurrentBlock('preview');
         $this->tpl->setVariable("TXT_PREVIEW", $this->lng->txt("preview"));
         $this->tpl->setVariable("LINK_PREVIEW", $this->ctrl->getLinkTargetByClass('ilAssQuestionPreviewGUI', ilAssQuestionPreviewGUI::CMD_SHOW));
         $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"] : " ");
             $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:bheyser,项目名称:qplskl,代码行数:97,代码来源:class.ilQuestionBrowserTableGUI.php

示例2: 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("icon_alert.svg"));
             $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"] . "\">" . ilGlyphGUI::get(ilGlyphGUI::UP, $this->lng->txt('up')) . "</a>");
         }
         if ($data["sequence"] != count($this->getData())) {
             $this->tpl->setVariable("BUTTON_DOWN", "<a href=\"" . $this->ctrl->getLinkTarget($this->getParentObject(), "questions") . "&down=" . $data["question_id"] . "\">" . ilGlyphGUI::get(ilGlyphGUI::DOWN, $this->lng->txt('down')) . "</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"];
     $this->totalWorkingTime = assQuestion::sumTimesInISO8601FormatH_i_s_Extended($this->totalWorkingTime, $data['working_time']);
     if (isset($this->visibleOptionalColumns['author'])) {
         $this->tpl->setVariable("QUESTION_AUTHOR", $data["author"]);
     }
     if (isset($this->visibleOptionalColumns['working_time'])) {
         $this->tpl->setVariable("QUESTION_WORKING_TIME", $data["working_time"]);
     }
     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", $this->lng->txt('tst_question_not_from_pool_info'));
     }
     $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:arlendotcn,项目名称:ilias,代码行数:79,代码来源:class.ilTestQuestionsTableGUI.php


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