本文整理汇总了PHP中ilCtrl类的典型用法代码示例。如果您正苦于以下问题:PHP ilCtrl类的具体用法?PHP ilCtrl怎么用?PHP ilCtrl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ilCtrl类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* @param $a_parent_obj
* @param $a_parent_cmd
*/
public function __construct($a_parent_obj, $a_parent_cmd)
{
/**
* @var $ilCtrl ilCtrl
*/
global $ilCtrl;
$this->ctrl = $ilCtrl;
// Call this immediately in constructor
$this->setId('mail_attachments');
$this->setDefaultOrderDirection('ASC');
$this->setDefaultOrderField('filename');
parent::__construct($a_parent_obj, $a_parent_cmd);
$this->setTitle($this->lng->txt('attachment'));
$this->setNoEntriesText($this->lng->txt('marked_entries'));
$this->setFormAction($this->ctrl->getFormAction($a_parent_obj, 'applyFilter'));
$this->setSelectAllCheckbox('filename[]');
$this->setRowTemplate('tpl.mail_attachment_row.html', 'Services/Mail');
$this->addMultiCommand('saveAttachments', $this->lng->txt('adopt'));
$this->addMultiCommand('deleteAttachments', $this->lng->txt('delete'));
$this->addCommandButton('cancelSaveAttachments', $this->lng->txt('cancel'));
$this->addColumn($this->lng->txt(''), '', '1px', true);
$this->addColumn($this->lng->txt('mail_file_name'), 'filename');
$this->addColumn($this->lng->txt('mail_file_size'), 'filesize');
$this->addColumn($this->lng->txt('create_date'), 'filecreatedate');
}
示例2: modifyGUI
/**
* Modify GUI objects, before they generate ouput
*
* @param string $a_comp component
* @param string $a_part string that identifies the part of the UI that is handled
* @param string $a_par array of parameters (depend on $a_comp and $a_part)
*/
function modifyGUI($a_comp, $a_part, $contextElements = array())
{
// currently only implemented for $ilTabsGUI
// Zeigt an, in welchem Modul man sich gerade in ILIAS befindet
/*
if ($part == "tabs") {
var_dump($this->ctrl->getCalHistory());
}
/**/
// tabs hook
// note that you currently do not get information in $a_comp
// here. So you need to use general GET/POST information
// like $_GET["baseClass"], $ilCtrl->getCmdClass/getCmd
// to determine the context.
//if ($a_part == "tabs")
if ($a_part == "tabs" && $this->isINCourseGUI()) {
// $a_par["tabs"] is ilTabsGUI object
/** @var ilTabsGUI $tabs */
$tabs = $contextElements["tabs"];
$this->ctrl->saveParameterByClass('ilCourseEmailSubscriptionGUI', 'ref_id');
// saveparameterbyclass behält Einstellungsvariablen (ref_id) auch bei neuem Link
$tabs->addTab('courseSubscription', 'Mitglieder Einschreiben', $this->ctrl->getLinkTargetByClass(array('ilUIPluginRouterGUI', 'ilCourseEmailSubscriptionGUI'), 'show'));
//$tabs->addTab('test', 'test', 'test');
/*
$tabs = $contextElements["tabs"];
$this->ctrl->saveParameterByClass('ilUIExampleUIHookGUI', 'ref_id');
$tabs->addTab('courseSubscription', 'Mitglieder Einschreiben', $this->ctrl->getLinkTargetByClass(array('ilUIPluginRouterGUI', 'ilUIExampleUIHookGUI'), 'show'));
*/
}
}
示例3: __construct
/**
* @param $parent
* @param string $cmd
*/
public function __construct($parent, $cmd, $template_context = '', ilMarkSchemaAware $object = null)
{
/**
* @var $ilCtrl ilCtrl
*/
global $ilCtrl;
$this->object = $object;
$this->ctrl = $ilCtrl;
$this->is_editable = $this->object->canEditMarks();
$this->setId('mark_schema_gui_' . $this->object->getMarkSchemaForeignId());
parent::__construct($parent, $cmd);
$this->setFormAction($this->ctrl->getFormAction($this->getParentObject(), $cmd));
$this->setRowTemplate('tpl.il_as_tst_mark_schema_row.html', 'Modules/Test');
$this->setNoEntriesText($this->lng->txt('tst_no_marks_defined'));
if ($this->object->canEditMarks()) {
$this->addCommandButton('addMarkStep', $this->lng->txt('tst_mark_create_new_mark_step'));
$this->addCommandButton('saveMarks', $this->lng->txt('save'));
$this->addMultiCommand('deleteMarkSteps', $this->lng->txt('delete'));
$this->setSelectAllCheckbox('marks[]');
} else {
$this->disable('select_all');
}
$this->setLimit(PHP_INT_MAX);
$this->initColumns();
$this->initData();
}
示例4: __construct
/**
* Constructor
*
* @access public
* @param assQuestion $questionOBJ
* @param ilCtrl $ctrl
* @param ilTabsGUI $tabs
* @param ilLanguage $lng
*/
public function __construct(assQuestion $questionOBJ, ilCtrl $ctrl, ilTabsGUI $tabs, ilLanguage $lng)
{
$this->questionOBJ = $questionOBJ;
$this->ctrl = $ctrl;
$this->tabs = $tabs;
$this->lng = $lng;
$this->tabs->clearTargets();
$this->lng->loadLanguageModule('content');
}
示例5: __construct
/**
* @param ilCertificateConfigGUI $parent_gui
*/
public function __construct(ilCertificateConfigGUI $parent_gui)
{
global $ilCtrl, $lng;
$this->parent_gui = $parent_gui;
$this->ctrl = $ilCtrl;
$this->lng = $lng;
$this->pl = ilCertificatePlugin::getInstance();
$this->setFormAction($this->ctrl->getFormAction($this->parent_gui));
$this->initForm();
}
示例6: __construct
/**
* @param $parent_gui
*/
public function __construct($parent_gui)
{
global $ilCtrl, $lng;
$this->parent_gui = $parent_gui;
$this->ctrl = $ilCtrl;
$this->lng = $lng;
$this->ctrl->saveParameter($parent_gui, 'clip_ext_id');
$this->setFormAction($this->ctrl->getFormAction($parent_gui));
$this->initForm();
}
示例7: initForm
/**
* Init settings property form
*
* @access private
*/
private function initForm()
{
$this->setFormAction($this->ctrl->getFormAction($this->parent_gui));
$name = new ilTextInputGUI($this->lng->txt("bibl_library_name"), 'name');
$name->setRequired(true);
$name->setValue('');
$this->addItem($name);
$url = new ilTextInputGUI($this->lng->txt("bibl_library_url"), 'url');
$url->setRequired(true);
$url->setValue('');
$this->addItem($url);
$img = new ilTextInputGUI($this->lng->txt("bibl_library_img"), 'img');
$img->setValue('');
$this->addItem($img);
$show_in_list = new ilCheckboxInputGUI($this->lng->txt("bibl_library_show_in_list"), 'show_in_list');
$show_in_list->setValue(1);
$this->addItem($show_in_list);
switch ($this->action) {
case 'create':
$this->setTitle($this->lng->txt("bibl_settings_new"));
$this->addCommandButton('create', $this->lng->txt('save'));
break;
case 'update':
$this->addCommandButton('update', $this->lng->txt('save'));
$this->fillForm();
$this->setTitle($this->lng->txt("bibl_settings_edit"));
break;
}
$this->addCommandButton('cancel', $this->lng->txt("cancel"));
}
示例8: 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);
}
}
示例9: build
public function build()
{
$this->setFormAction($this->ctrl->getFormAction($this->questionSetConfigGUI));
if ($this->questionSetConfig->doesSelectableQuestionPoolsExist()) {
$this->populateNewQuestionSelectionRuleInputs();
}
}
开发者ID:arlendotcn,项目名称:ilias,代码行数:7,代码来源:class.ilTestRandomQuestionSetSourcePoolDefinitionListToolbarGUI.php
示例10: initForm
/**
* Add all fields to the form
*/
protected function initForm()
{
$this->setFormAction($this->ctrl->getFormAction($this->parent_gui));
$this->setTitle($this->lng->txt('orgu_settings'));
$item = new ilTextInputGUI($this->lng->txt('title'), 'title');
$item->setRequired(true);
$item->setValue($this->obj_orgu->getTitle());
$this->addItem($item);
$item = new ilTextAreaInputGUI($this->lng->txt('description'), 'description');
$item->setValue($this->obj_orgu->getDescription());
$this->addItem($item);
$item = new ilFormSectionHeaderGUI();
$item->setTitle($this->lng->txt('orgu_type'));
$this->addItem($item);
$types = ilOrgUnitType::getAllTypes();
$options = array(0 => '');
/** @var ilOrgUnitType $type */
foreach ($types as $type) {
$options[$type->getId()] = $type->getTitle();
}
asort($options);
$item = new ilSelectInputGUI($this->lng->txt('orgu_type'), 'orgu_type');
$item->setOptions($options);
$item->setValue($this->obj_orgu->getOrgUnitTypeId());
$this->addItem($item);
$item = new ilFormSectionHeaderGUI();
$item->setTitle($this->lng->txt('ext_id'));
$this->addItem($item);
$item = new ilTextInputGUI($this->lng->txt('ext_id'), 'ext_id');
$item->setValue($this->obj_orgu->getImportId());
$this->addItem($item);
$this->addCommandButton('updateSettings', $this->lng->txt('save'));
}
示例11: fillRow
/**
* @param array $a_set
*/
public function fillRow($a_set)
{
$ilUDFCheck = ilUDFCheck::find($a_set['id']);
$ilUDFCheckGUI = new ilUDFCheckGUI($this->parent_obj);
foreach ($this->getSelectableColumns() as $k => $v) {
if ($k == 'actions') {
$this->ctrl->setParameter($this->parent_obj, ilUDFCheckGUI::IDENTIFIER, $ilUDFCheck->getId());
$this->ctrl->setParameter($ilUDFCheckGUI, ilUDFCheckGUI::IDENTIFIER, $ilUDFCheck->getId());
$current_selection_list = new ilAdvancedSelectionListGUI();
$current_selection_list->setListTitle($this->pl->txt('check_actions'));
$current_selection_list->setId('check_actions' . $ilUDFCheck->getId());
$current_selection_list->setUseImages(false);
$current_selection_list->addItem($this->pl->txt('check_edit'), 'check_edit', $this->ctrl->getLinkTarget($this->parent_obj, ilUserSettingsGUI::CMD_EDIT));
$current_selection_list->addItem($this->pl->txt('check_delete'), 'check_delete', $this->ctrl->getLinkTarget($this->parent_obj, ilUserSettingsGUI::CMD_CONFIRM_DELETE));
$this->tpl->setCurrentBlock('td');
$this->tpl->setVariable('VALUE', $current_selection_list->getHTML());
$this->tpl->parseCurrentBlock();
continue;
}
if ($this->isColumnSelected($k)) {
if ($a_set[$k]) {
$this->tpl->setCurrentBlock('td');
$this->tpl->setVariable('VALUE', is_array($a_set[$k]) ? implode(", ", $a_set[$k]) : $a_set[$k]);
$this->tpl->parseCurrentBlock();
} else {
$this->tpl->setCurrentBlock('td');
$this->tpl->setVariable('VALUE', ' ');
$this->tpl->parseCurrentBlock();
}
}
}
}
示例12: adjust
/**
* @return boolean
*/
public function adjust()
{
if (defined('IL_CERT_SSO')) {
return false;
} else {
if (!ilContext::supportsRedirects()) {
return false;
} else {
if ($this->ctrl->isAsynch()) {
return false;
} else {
if (in_array(basename($_SERVER['PHP_SELF']), array('logout.php'))) {
return false;
} else {
if (!$this->user->getId() || $this->user->isAnonymous()) {
return false;
}
}
}
}
}
foreach ($this->cases as $case) {
if ($case->isInFulfillment()) {
return false;
}
if ($case->shouldAdjustRequest()) {
if ($case->shouldStoreRequestTarget()) {
$this->storeRequest();
}
$case->adjust();
return true;
}
}
return false;
}
示例13: 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);
}
}
示例14: build
public function build()
{
$this->setFormAction($this->ctrl->getFormAction($this->parentGUI));
$select = new ilSelectInputGUI($this->lng->txt("tst_analysis"), self::SKILL_PROFILE_PARAM);
$select->setOptions($this->buildEvaluationModeOptionsArray());
$select->setValue($this->getSelectedEvaluationMode());
$this->addInputItem($select, true);
$this->addFormButton($this->lng->txt("select"), $this->parentCMD);
}
示例15: showCmd
private function showCmd()
{
$selectedSkillProfile = ilTestSkillEvaluationToolbarGUI::fetchSkillProfileParam($_POST);
$testSession = $this->testSessionFactory->getSession();
$this->skillEvaluation->init()->evaluate($testSession->getActiveId(), $testSession->getLastFinishedPass(), $testSession->getUserId());
$evaluationToolbarGUI = $this->buildEvaluationToolbarGUI($testSession->getUserId(), $selectedSkillProfile);
$personalSkillsGUI = $this->buildPersonalSkillsGUI($testSession->getUserId(), $selectedSkillProfile);
$this->tpl->setContent($this->ctrl->getHTML($evaluationToolbarGUI) . $this->ctrl->getHTML($personalSkillsGUI));
}