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


PHP ilLanguage::txt方法代码示例

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


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

示例1: buildHeaderText

 private function buildHeaderText($isFixedTest)
 {
     if ($isFixedTest) {
         return $this->lng->txt('tst_optional_questions_confirmation_fixed_test');
     }
     return $this->lng->txt('tst_optional_questions_confirmation_non_fixed_test');
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:7,代码来源:class.ilTestAnswerOptionalQuestionsConfirmationGUI.php

示例2: getFormAlert

 /**
  * @param ilLanguage $lng
  * @return string
  */
 public function getFormAlert(ilLanguage $lng)
 {
     if ($this->getQuestionIndex() === null) {
         return sprintf($lng->txt("ass_lac_answer_index_not_exist_cur_qst"), $this->getAnswerIndex());
     }
     return sprintf($lng->txt("ass_lac_answer_index_not_exist"), $this->getQuestionIndex(), $this->getAnswerIndex());
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:11,代码来源:ilAssLacAnswerIndexNotExist.php

示例3: getFormAlert

 /**
  * @param ilLanguage $lng
  * @return string
  */
 public function getFormAlert(ilLanguage $lng)
 {
     if ($this->getQuestionIndex() === null) {
         return sprintf($lng->txt("ass_lac_expression_not_supported_by_cur_question"), $this->getExpression());
     }
     return sprintf($lng->txt("ass_lac_expression_not_supported_by_question"), $this->getQuestionIndex(), $this->getExpression());
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:11,代码来源:ilAssLacExpressionNotSupportedByQuestion.php

示例4: build

 public function build(ilTestRandomQuestionSetSourcePoolDefinition $sourcePool, $availableTaxonomyIds)
 {
     $this->setFormAction($this->ctrl->getFormAction($this->questionSetConfigGUI));
     $this->setTitle($this->lng->txt('tst_rnd_quest_set_cfg_pool_form'));
     $this->setId('tstRndQuestSetCfgPoolForm');
     $this->addCommandButton($this->getSaveCommand(), $this->lng->txt('save_and_back'));
     if (null !== $this->getSaveAndNewCommand()) {
         $this->addCommandButton($this->getSaveAndNewCommand(), $this->lng->txt('tst_save_and_create_new_rule'));
     }
     $this->addCommandButton(ilTestRandomQuestionSetConfigGUI::CMD_SHOW_SRC_POOL_DEF_LIST, $this->lng->txt('cancel'));
     $hiddenDefId = new ilHiddenInputGUI('src_pool_def_id');
     $hiddenDefId->setValue($sourcePool->getId());
     $this->addItem($hiddenDefId);
     $hiddenPoolId = new ilHiddenInputGUI('quest_pool_id');
     $hiddenPoolId->setValue($sourcePool->getPoolId());
     $this->addItem($hiddenPoolId);
     $nonEditablePoolLabel = new ilNonEditableValueGUI($this->lng->txt('tst_inp_source_pool_label'), 'quest_pool_label');
     $nonEditablePoolLabel->setValue($sourcePool->getPoolInfoLabel($this->lng));
     $this->addItem($nonEditablePoolLabel);
     if (count($availableTaxonomyIds)) {
         $taxRadio = new ilRadioGroupInputGUI($this->lng->txt('tst_inp_source_pool_filter_tax'), 'filter_tax');
         $taxRadio->setRequired(true);
         $taxRadio->addOption(new ilRadioOption($this->lng->txt('tst_inp_source_pool_no_tax_filter'), 0));
         $taxRadio->setValue(0);
         require_once 'Services/Taxonomy/classes/class.ilTaxSelectInputGUI.php';
         foreach ($availableTaxonomyIds as $taxId) {
             $taxonomy = new ilObjTaxonomy($taxId);
             $label = sprintf($this->lng->txt('tst_inp_source_pool_filter_tax_x'), $taxonomy->getTitle());
             $taxRadioOption = new ilRadioOption($label, $taxId);
             $taxRadio->addOption($taxRadioOption);
             $taxSelect = new ilTaxSelectInputGUI($taxId, "filter_tax_{$taxId}", false);
             $taxSelect->setRequired(true);
             $taxRadioOption->addSubItem($taxSelect);
             if ($taxId == $sourcePool->getOriginalFilterTaxId()) {
                 $taxRadio->setValue($sourcePool->getOriginalFilterTaxId());
                 $taxSelect->setValue($sourcePool->getOriginalFilterTaxNodeId());
             }
         }
         $this->addItem($taxRadio);
     } else {
         $hiddenNoTax = new ilHiddenInputGUI('filter_tax');
         $hiddenNoTax->setValue(0);
         $this->addItem($hiddenNoTax);
         $nonEditableNoTax = new ilNonEditableValueGUI($this->lng->txt('tst_inp_source_pool_filter_tax'), 'no_tax_label');
         $nonEditableNoTax->setValue($this->lng->txt('tst_inp_no_available_tax_hint'));
         $this->addItem($nonEditableNoTax);
     }
     if ($this->questionSetConfig->isQuestionAmountConfigurationModePerPool()) {
         $questionAmountPerSourcePool = new ilNumberInputGUI($this->lng->txt('tst_inp_quest_amount_per_source_pool'), 'question_amount_per_pool');
         $questionAmountPerSourcePool->setRequired(true);
         $questionAmountPerSourcePool->allowDecimals(false);
         $questionAmountPerSourcePool->setMinValue(0);
         $questionAmountPerSourcePool->setMinvalueShouldBeGreater(true);
         $questionAmountPerSourcePool->setSize(4);
         if ($sourcePool->getQuestionAmount()) {
             $questionAmountPerSourcePool->setValue($sourcePool->getQuestionAmount());
         }
         $this->addItem($questionAmountPerSourcePool);
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:60,代码来源:class.ilTestRandomQuestionSetPoolDefinitionFormGUI.php

示例5: saveSkillThresholdsCmd

 private function saveSkillThresholdsCmd()
 {
     require_once 'Modules/Test/classes/class.ilTestSkillLevelThreshold.php';
     if (is_array($_POST['threshold'])) {
         $threshold = $_POST['threshold'];
         $assignmentList = $this->buildSkillQuestionAssignmentList();
         $assignmentList->loadFromDb();
         foreach ($assignmentList->getUniqueAssignedSkills() as $data) {
             $skill = $data['skill'];
             $skillKey = $data['skill_base_id'] . ':' . $data['skill_tref_id'];
             $levels = $skill->getLevelData();
             foreach ($levels as $level) {
                 if (isset($threshold[$skillKey]) && isset($threshold[$skillKey][$level['id']])) {
                     $skillLevelThreshold = new ilTestSkillLevelThreshold($this->db);
                     $skillLevelThreshold->setTestId($this->testOBJ->getTestId());
                     $skillLevelThreshold->setSkillBaseId($data['skill_base_id']);
                     $skillLevelThreshold->setSkillTrefId($data['skill_tref_id']);
                     $skillLevelThreshold->setSkillLevelId($level['id']);
                     $skillLevelThreshold->setThreshold($threshold[$skillKey][$level['id']]);
                     $skillLevelThreshold->saveToDb();
                 }
             }
         }
     }
     ilUtil::sendSuccess($this->lng->txt('tst_msg_skl_lvl_thresholds_saved'), true);
     $this->ctrl->redirect($this, self::CMD_SHOW_SKILL_THRESHOLDS);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:27,代码来源:class.ilTestSkillLevelThresholdsGUI.php

示例6: saveEnteredPasswordCmd

 private function saveEnteredPasswordCmd()
 {
     $this->passwordChecker->setUserEnteredPassword($_POST["password"]);
     if (!$this->passwordChecker->isUserEnteredPasswordCorrect()) {
         ilUtil::sendFailure($this->lng->txt("tst_password_entered_wrong_password"), true);
     }
     $this->ctrl->redirectByClass($this->getNextCommandClass(), $this->getNextCommandCmd());
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:8,代码来源:class.ilTestPasswordProtectionGUI.php

示例7: initColumns

 protected function initColumns()
 {
     $this->addColumn('', 'check', '10%', true);
     $this->addColumn($this->lng->txt('title'), 'title', '30%');
     $this->addColumn($this->lng->txt('description'), 'description', '30%');
     $this->addColumn($this->lng->txt('members'), 'members', '20%');
     $this->addColumn($this->lng->txt('actions'), '', '10%');
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:8,代码来源:class.ilMailingListsTableGUI.php

示例8: getHTML

 public function getHTML()
 {
     $gui = new ilPersonalSkillsGUI();
     $gui->setGapAnalysisActualStatusModePerObject($this->testOBJ->getId(), $this->lng->txt('tst_test_result'));
     $gui->setProfileId($this->getSelectedSkillProfile());
     $html = $gui->getGapAnalysisHTML($this->getUsrId(), $this->getAvailableSkills());
     return $html;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:8,代码来源:class.ilTestPersonalSkillsGUI.php

示例9: manageTabs

 public function manageTabs($activeSubTabId)
 {
     $link = $this->ctrl->getLinkTargetByClass('iltestskillquestionassignmentsgui', ilTestSkillQuestionAssignmentsGUI::CMD_SHOW_SKILL_QUEST_ASSIGNS);
     $this->tabs->addSubTab('iltestskillquestionassignmentsgui', $this->lng->txt('tst_skl_sub_tab_quest_assign'), $link);
     $link = $this->ctrl->getLinkTargetByClass('iltestskilllevelthresholdsgui', ilTestSkillLevelThresholdsGUI::CMD_SHOW_SKILL_THRESHOLDS);
     $this->tabs->addSubTab('iltestskilllevelthresholdsgui', $this->lng->txt('tst_skl_sub_tab_thresholds'), $link);
     $this->tabs->activateTab('tst_tab_competences');
     $this->tabs->activateSubTab($activeSubTabId);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:9,代码来源:class.ilTestSkillAdministrationGUI.php

示例10: populateNewQuestionSelectionRuleInputs

 private function populateNewQuestionSelectionRuleInputs()
 {
     $availablePools = $this->questionSetConfig->getSelectableQuestionPools();
     require_once 'Services/Form/classes/class.ilSelectInputGUI.php';
     $poolSelection = new ilSelectInputGUI(null, 'quest_pool_id');
     $poolSelection->setOptions($this->buildSourcePoolSelectOptionsArray($availablePools));
     $this->addInputItem($poolSelection, true);
     $this->addFormButton($this->lng->txt('tst_rnd_quest_set_tb_add_pool_btn'), ilTestRandomQuestionSetConfigGUI::CMD_SHOW_CREATE_SRC_POOL_DEF_FORM);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:9,代码来源:class.ilTestRandomQuestionSetSourcePoolDefinitionListToolbarGUI.php

示例11: build

 public function build()
 {
     $availablePools = $this->testOBJ->getAvailableQuestionpools(true, $this->questionSetConfig->arePoolsWithHomogeneousScoredQuestionsRequired(), false, true, true);
     require_once 'Services/Form/classes/class.ilSelectInputGUI.php';
     $poolSelection = new ilSelectInputGUI(null, 'quest_pool_id');
     $poolSelection->setOptions($this->buildSourcePoolSelectOptionsArray($availablePools));
     $this->addInputItem($poolSelection, true);
     $this->setFormAction($this->ctrl->getFormAction($this->questionSetConfigGUI));
     $this->addFormButton($this->lng->txt('tst_rnd_quest_set_tb_add_pool_btn'), ilTestRandomQuestionSetConfigGUI::CMD_SHOW_CREATE_SRC_POOL_DEF_FORM);
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:10,代码来源:class.ilTestRandomQuestionSetSourcePoolDefinitionListToolbarGUI.php

示例12: build

 public function build()
 {
     $this->setFormAction($this->ctrl->getFormAction($this->questionSetConfigGUI));
     $this->setTitle($this->lng->txt('tst_rnd_quest_set_cfg_general_form'));
     $this->setId('tstRndQuestSetCfgGeneralForm');
     $this->addCommandButton(ilTestRandomQuestionSetConfigGUI::CMD_SAVE_GENERAL_CONFIG_FORM, $this->lng->txt('save'));
     // Require Pools with Homogeneous Scored Questions
     $requirePoolsQuestionsHomoScored = new ilCheckboxInputGUI($this->lng->txt('tst_inp_all_quest_points_equal_per_pool'), 'quest_points_equal_per_pool');
     $requirePoolsQuestionsHomoScored->setInfo($this->lng->txt('tst_inp_all_quest_points_equal_per_pool_desc'));
     $requirePoolsQuestionsHomoScored->setChecked($this->questionSetConfig->arePoolsWithHomogeneousScoredQuestionsRequired());
     $this->addItem($requirePoolsQuestionsHomoScored);
     // question amount config mode (per test / per pool)
     $questionAmountConfigMode = new ilRadioGroupInputGUI($this->lng->txt('tst_inp_quest_amount_cfg_mode'), 'quest_amount_cfg_mode');
     $questionAmountConfigMode->setValue($this->fetchValidQuestionAmountConfigModeWithFallbackModePerTest($this->questionSetConfig));
     $questionAmountConfigModePerTest = new ilRadioOption($this->lng->txt('tst_inp_quest_amount_cfg_mode_test'), ilTestRandomQuestionSetConfig::QUESTION_AMOUNT_CONFIG_MODE_PER_TEST);
     $questionAmountConfigMode->addOption($questionAmountConfigModePerTest);
     $questionAmountConfigModePerPool = new ilRadioOption($this->lng->txt('tst_inp_quest_amount_cfg_mode_pool'), ilTestRandomQuestionSetConfig::QUESTION_AMOUNT_CONFIG_MODE_PER_POOL);
     $questionAmountConfigMode->addOption($questionAmountConfigModePerPool);
     $questionAmountConfigMode->setRequired(true);
     $this->addItem($questionAmountConfigMode);
     // question amount per test
     $questionAmountPerTest = new ilNumberInputGUI($this->lng->txt('tst_inp_quest_amount_per_test'), 'quest_amount_per_test');
     $questionAmountPerTest->setRequired(true);
     $questionAmountPerTest->setMinValue(0);
     $questionAmountPerTest->allowDecimals(false);
     $questionAmountPerTest->setMinvalueShouldBeGreater(true);
     $questionAmountPerTest->setSize(4);
     $questionAmountPerTest->setValue($this->questionSetConfig->getQuestionAmountPerTest());
     $questionAmountConfigModePerTest->addSubItem($questionAmountPerTest);
     if ($this->testOBJ->participantDataExist()) {
         $requirePoolsQuestionsHomoScored->setDisabled(true);
         $questionAmountConfigMode->setDisabled(true);
         $questionAmountPerTest->setDisabled(true);
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:35,代码来源:class.ilTestRandomQuestionSetGeneralConfigFormGUI.php

示例13: buildEvaluationModeOptionsArray

 private function buildEvaluationModeOptionsArray()
 {
     $options = array();
     if ($this->isNoSkillProfileOptionEnabled()) {
         $options[0] = $this->lng->txt('tst_all_test_competences');
     }
     foreach ($this->getAvailableSkillProfiles() as $skillProfileId => $skillProfileTitle) {
         $options[$skillProfileId] = "{$this->lng->txt('tst_gap_analysis')}: {$skillProfileTitle}";
     }
     return $options;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:11,代码来源:class.ilTestSkillEvaluationToolbarGUI.php

示例14: getHTML

 public function getHTML()
 {
     $gui = new ilPersonalSkillsGUI();
     $gui->setGapAnalysisActualStatusModePerObject($this->getTestId(), $this->lng->txt('tst_test_result'));
     // this is not required, we have no self evals in the test context,
     // getReachedSkillLevel is a "test evaluation"
     //$gui->setGapAnalysisSelfEvalLevels($this->getReachedSkillLevels());
     $gui->setProfileId($this->getSelectedSkillProfile());
     $html = $gui->getGapAnalysisHTML($this->getUsrId(), $this->getAvailableSkills());
     return $html;
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:11,代码来源:class.ilTestPersonalSkillsGUI.php

示例15: getFormAlert

 /**
  * @param ilLanguage $lng
  * @return string
  */
 public function getFormAlert(ilLanguage $lng)
 {
     if ($this->getQuestionIndex() === null && $this->getAnswerIndex() === null) {
         return sprintf($lng->txt("ass_lac_answer_value_not_exists_cur_qst_one_answer"), $this->getValue());
     }
     if ($this->getQuestionIndex() === null) {
         return sprintf($lng->txt("ass_lac_answer_value_not_exists_cur_qst"), $this->getValue(), $this->getAnswerIndex());
     }
     if ($this->getAnswerIndex() === null) {
         return sprintf($lng->txt("ass_lac_answer_value_not_exists_one_answer"), $this->getValue(), $this->getQuestionIndex());
     }
     return sprintf($lng->txt("ass_lac_answer_value_not_exists"), $this->getValue(), $this->getQuestionIndex(), $this->getAnswerIndex());
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:17,代码来源:ilAssLacAnswerValueNotExist.php


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