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


PHP ilAdvancedSelectionListGUI::flush方法代码示例

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


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

示例1: getSkillHTML


//.........这里部分代码省略.........
             				}
             
             				// assigned materials
             				if ($this->use_materials)
             				{
             
             					$mat_cnt = ilPersonalSkill::countAssignedMaterial($user->getId(),
             						$bs["tref"], $v["id"]);
             					if ($mat_cnt == 0)
             					{
             						$tpl->setCurrentBlock("material_td");
             						$tpl->setVariable("VAL_MATERIAL", " ");
             						$tpl->parseCurrentBlock();
             					}
             					else
             					{					
             						// links to material files
             						$tpl->setCurrentBlock("material_links");
             											
             						$mat_tt = array();
             						$cnt = 1;
             						foreach(ilPersonalSkill::getAssignedMaterial($user->getId(),
             							$bs["tref"], $v["id"]) as $item)
             						{												
             							$mat_data = $this->getMaterialInfo($item["wsp_id"]);
             							$tpl->setVariable("URL_MATERIAL", $mat_data[1]);
             							$tpl->setVariable("TXT_MATERIAL", $cnt);
             							
             							// tooltip
             							$mat_tt_id = "skmg_skl_tt_mat_".self::$skill_tt_cnt;
             							self::$skill_tt_cnt++;
             							$tpl->setVariable("TOOLTIP_MATERIAL_ID", $mat_tt_id);
             							
             							if(!$this->offline_mode)
             							{
             								ilTooltipGUI::addTooltip($mat_tt_id, $mat_data[0]);
             							}
             							else
             							{							
             								$this->tooltips[] = ilTooltipGUI::getTooltip($mat_tt_id, $mat_data[0]);
             							}
             							
             							$tpl->parseCurrentBlock();
             							$cnt++;
             						}																	
             						
             						$tpl->setCurrentBlock("material_td");
             						$tpl->setVariable("CLASS_MAT", "ilSkillMat");
             						$tpl->parseCurrentBlock();
             					}
             				}
             */
         }
         $title = $sep = "";
         $found = false;
         foreach ($path as $p) {
             if ($found) {
                 $title .= $sep . $p["title"];
                 $sep = " > ";
             }
             if ($a_top_skill_id == $p["child"]) {
                 $found = true;
             }
         }
         $tpl->setCurrentBlock("skill");
         $tpl->setVariable("BSKILL_TITLE", $title);
         /*			$tpl->setVariable("TXT_LEVEL", $lng->txt("skmg_level"));
         			$tpl->setVariable("TXT_SELF_EVAL", $lng->txt("skmg_self_evaluation"));
         			if ($this->use_materials)
         			{
         				$tpl->setVariable("TXT_MATERIAL", $lng->txt("skmg_material"));
         			}*/
         $tpl->setVariable("TXT_TARGET", $lng->txt("skmg_target_level"));
         $tpl->setVariable("TXT_360_SURVEY", $lng->txt("skmg_360_survey"));
         if ($a_edit) {
             $act_list->flush();
             $act_list->setId("act_" . $a_top_skill_id . "_" . $bs["id"]);
             $ilCtrl->setParameterByClass("ilpersonalskillsgui", "skill_id", $a_top_skill_id);
             $ilCtrl->setParameterByClass("ilpersonalskillsgui", "tref_id", $bs["tref"]);
             $ilCtrl->setParameterByClass("ilpersonalskillsgui", "basic_skill_id", $bs["id"]);
             if ($this->use_materials) {
                 $act_list->addItem($lng->txt('skmg_assign_materials'), "", $ilCtrl->getLinkTargetByClass("ilpersonalskillsgui", "assignMaterials"));
             }
             $act_list->addItem($lng->txt('skmg_self_evaluation'), "", $ilCtrl->getLinkTargetByClass("ilpersonalskillsgui", "selfEvaluation"));
             $tpl->setVariable("ACTIONS2", $act_list->getHTML());
         }
         $tpl->parseCurrentBlock();
     }
     $tpl->setVariable("SKILL_TITLE", ilSkillTreeNode::_lookupTitle($a_top_skill_id));
     if ($a_edit) {
         $act_list->flush();
         $act_list->setId("act_" . $a_top_skill_id);
         $ilCtrl->setParameterByClass("ilpersonalskillsgui", "skill_id", $a_top_skill_id);
         //			$act_list->addItem($lng->txt('skmg_assign_materials'), "",
         //				$ilCtrl->getLinkTargetByClass("ilpersonalskillsgui", "assignMaterials"));
         $act_list->addItem($lng->txt('skmg_remove_skill'), "", $ilCtrl->getLinkTargetByClass("ilpersonalskillsgui", "confirmSkillRemove"));
         $tpl->setVariable("ACTIONS1", $act_list->getHTML());
     }
     return $tpl->get();
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:101,代码来源:class.ilPersonalSkillsGUI.php

示例2: getSkillHTML


//.........这里部分代码省略.........
             // level
             $tpl->setCurrentBlock("level_td");
             $tpl->setVariable("VAL_LEVEL", $v["title"]);
             $tt_id = "skmg_skl_tt_" . self::$skill_tt_cnt;
             self::$skill_tt_cnt++;
             $tpl->setVariable("TT_ID", $tt_id);
             if ($v["description"] != "") {
                 ilTooltipGUI::addTooltip($tt_id, $v["description"]);
             }
             $tpl->parseCurrentBlock();
             // self evaluation
             $tpl->setCurrentBlock("self_eval_td");
             if ($valid_sel_level && !$found) {
                 $tpl->setVariable("VAL_SELF_EVAL", "x");
                 $tpl->setVariable("CLASS_SELF_EVAL", "ilSkillSelf");
             } else {
                 $tpl->setVariable("VAL_SELF_EVAL", " ");
             }
             $tpl->parseCurrentBlock();
             if ($v["id"] == $se_level) {
                 $found = true;
             }
             // assigned materials
             if ($this->use_materials) {
                 $mat_cnt = ilPersonalSkill::countAssignedMaterial($user->getId(), $bs["tref"], $v["id"]);
                 if ($mat_cnt == 0) {
                     $tpl->setCurrentBlock("material_td");
                     $tpl->setVariable("VAL_MATERIAL", " ");
                     $tpl->parseCurrentBlock();
                 } else {
                     // links to material files
                     $tpl->setCurrentBlock("material_links");
                     $mat_tt = array();
                     $cnt = 1;
                     foreach (ilPersonalSkill::getAssignedMaterial($user->getId(), $bs["tref"], $v["id"]) as $item) {
                         $mat_data = $this->getMaterialInfo($item["wsp_id"]);
                         $tpl->setVariable("URL_MATERIAL", $mat_data[1]);
                         $tpl->setVariable("TXT_MATERIAL", $cnt);
                         // tooltip
                         $mat_tt_id = "skmg_skl_tt_mat_" . self::$skill_tt_cnt;
                         self::$skill_tt_cnt++;
                         $tpl->setVariable("TOOLTIP_MATERIAL_ID", $mat_tt_id);
                         if (!$this->offline_mode) {
                             ilTooltipGUI::addTooltip($mat_tt_id, $mat_data[0]);
                         } else {
                             $this->tooltips[] = ilTooltipGUI::getTooltip($mat_tt_id, $mat_data[0]);
                         }
                         $tpl->parseCurrentBlock();
                         $cnt++;
                     }
                     $tpl->setCurrentBlock("material_td");
                     $tpl->setVariable("CLASS_MAT", "ilSkillMat");
                     $tpl->parseCurrentBlock();
                 }
             }
         }
         $title = $sep = "";
         $found = false;
         foreach ($path as $p) {
             if ($found) {
                 $title .= $sep . $p["title"];
                 $sep = " > ";
             }
             if ($a_top_skill_id == $p["child"]) {
                 $found = true;
             }
         }
         $tpl->setCurrentBlock("skill");
         $tpl->setVariable("BSKILL_TITLE", $title);
         $tpl->setVariable("TXT_LEVEL", $lng->txt("skmg_level"));
         $tpl->setVariable("TXT_SELF_EVAL", $lng->txt("skmg_self_evaluation"));
         if ($this->use_materials) {
             $tpl->setVariable("TXT_MATERIAL", $lng->txt("skmg_material"));
         }
         if ($a_edit) {
             $act_list->flush();
             $act_list->setId("act_" . $a_top_skill_id . "_" . $bs["id"]);
             $ilCtrl->setParameterByClass("ilpersonalskillsgui", "skill_id", $a_top_skill_id);
             $ilCtrl->setParameterByClass("ilpersonalskillsgui", "tref_id", $bs["tref"]);
             $ilCtrl->setParameterByClass("ilpersonalskillsgui", "basic_skill_id", $bs["id"]);
             if ($this->use_materials) {
                 $act_list->addItem($lng->txt('skmg_assign_materials'), "", $ilCtrl->getLinkTargetByClass("ilpersonalskillsgui", "assignMaterials"));
             }
             $act_list->addItem($lng->txt('skmg_self_evaluation'), "", $ilCtrl->getLinkTargetByClass("ilpersonalskillsgui", "selfEvaluation"));
             $tpl->setVariable("ACTIONS2", $act_list->getHTML());
         }
         $tpl->parseCurrentBlock();
     }
     $tpl->setVariable("SKILL_TITLE", ilSkillTreeNode::_lookupTitle($a_top_skill_id));
     if ($a_edit) {
         $act_list->flush();
         $act_list->setId("act_" . $a_top_skill_id);
         $ilCtrl->setParameterByClass("ilpersonalskillsgui", "skill_id", $a_top_skill_id);
         //			$act_list->addItem($lng->txt('skmg_assign_materials'), "",
         //				$ilCtrl->getLinkTargetByClass("ilpersonalskillsgui", "assignMaterials"));
         $act_list->addItem($lng->txt('skmg_remove_skill'), "", $ilCtrl->getLinkTargetByClass("ilpersonalskillsgui", "confirmSkillRemove"));
         $tpl->setVariable("ACTIONS1", $act_list->getHTML());
     }
     return $tpl->get();
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:101,代码来源:class.ilPersonalSkillsGUI.php


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