本文整理汇总了PHP中ilUtil::sendInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP ilUtil::sendInfo方法的具体用法?PHP ilUtil::sendInfo怎么用?PHP ilUtil::sendInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilUtil
的用法示例。
在下文中一共展示了ilUtil::sendInfo方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getDeveloperRubricCardFormCommandRow
private function getDeveloperRubricCardFormCommandRow($form_action)
{
global $ilUser;
include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
//configure the command row
$rubric_commandrow_tpl = new ilTemplate('tpl.lp_rubricform_commandrow.html', true, true, 'Services/Tracking');
$select_prop = new ilSelectInputGUI('Title', 'selected_cmdrubric');
$options = array('behavior_1' => $this->lng->txt('rubric_option_behavior_1'), 'behavior_2' => $this->lng->txt('rubric_option_behavior_2'), 'behavior_3' => $this->lng->txt('rubric_option_behavior_3'), 'behavior_4' => $this->lng->txt('rubric_option_behavior_4'), 'behavior_5' => $this->lng->txt('rubric_option_behavior_5'), 'add_group' => $this->lng->txt('rubric_option_add_group'), 'del_group' => $this->lng->txt('rubric_option_del_group'), 'add_criteria' => $this->lng->txt('rubric_option_add_criteria'), 'del_criteria' => $this->lng->txt('rubric_option_del_criteria'));
$select_prop->setOptions($options);
$rubric_commandrow_tpl->setVariable('RURBRIC_COMMANDROW_SELECT', $select_prop->render());
$rubric_commandrow_tpl->setVariable('RUBRIC_SAVE', $this->lng->txt('save'));
$rubric_commandrow_tpl->setVariable('RUBRIC_EXECUTE', $this->lng->txt('execute'));
$rubric_commandrow_tpl->setVariable('FORM_ACTION', $form_action);
$rubric_commandrow_tpl->setVariable('PASSING_GRADE_VALUE', "{$this->passing_grade}");
if (!is_null($this->rubric_locked)) {
$rubric_commandrow_tpl->setVariable('RUBRIC_DISABLED', 'disabled');
$rubric_commandrow_tpl->setVariable('RUBRIC_LOCK', $this->lng->txt('rubric_card_unlock'));
$tmp_user = ilObjectFactory::getInstanceByObjId($this->rubric_owner, false);
if ($this->rubric_owner !== $ilUser->getId()) {
$rubric_commandrow_tpl->setVariable('USER_LOCK', 'disabled');
}
ilUtil::sendInfo($this->lng->txt('rubric_locked_info') . ' ' . $tmp_user->getFullName() . ' ' . $this->rubric_locked);
} else {
$rubric_commandrow_tpl->setVariable('RUBRIC_LOCK', $this->lng->txt('rubric_card_lock'));
}
$rubric_commandrow_tpl->setVariable('EXPORT', $this->lng->txt('rubric_option_export_pdf'));
return $rubric_commandrow_tpl;
}
示例2: activateMultilinguality
/**
* Activate multi language (-> master language selection)
*/
function activateMultilinguality()
{
global $tpl, $lng;
ilUtil::sendInfo($lng->txt("cont_select_master_lang"));
$form = $this->getMultiLangForm();
$tpl->setContent($form->getHTML());
}
示例3: fillRow
/**
* Fill table row
*/
protected function fillRow($a_set)
{
global $lng;
$this->tpl->setVariable("VAL_TITLE", $a_set["title"]);
$this->tpl->setVariable("PAGE_ID", $a_set["obj_id"]);
$exp_id = ilLMPageObject::getExportId($this->parent_obj->object->getId(), $a_set["obj_id"], $a_set["type"]);
if ($this->validation) {
if (!preg_match("/^[a-zA-Z_]*\$/", trim($_POST["exportid"][$a_set["obj_id"]]))) {
// @todo: move to style
$this->tpl->setVariable("STYLE", " style='background-color: #FCEAEA;' ");
$this->tpl->setVariable("ALERT_IMG", ilUtil::img(ilUtil::getImagePath("icon_alert.svg"), $lng->txt("alert")));
}
$this->tpl->setVariable("EXPORT_ID", ilUtil::prepareFormOutput(ilUtil::stripSlashes($_POST["exportid"][$a_set["obj_id"]])));
} else {
$this->tpl->setVariable("EXPORT_ID", ilUtil::prepareFormOutput($exp_id));
}
if ($this->cnt_exp_ids[$exp_id] > 1) {
$this->tpl->setVariable("ITEM_ADD_TXT", $lng->txt("cont_exp_id_used_multiple"));
$this->tpl->setVariable("ALERT_IMG", ilUtil::img(ilUtil::getImagePath("icon_alert.svg"), $lng->txt("alert")));
if (!$this->dup_info_given) {
ilUtil::sendInfo($lng->txt("content_some_export_ids_multiple_times"));
$this->dup_info_given = true;
}
}
}
示例4: general
/**
* Prepares and displays settings form.
* @param ilPropertyFormGUI $settingsForm
*/
public function general(ilPropertyFormGUI $settingsForm = null)
{
/**
* @var $lng ilLanguage
* @var $tpl ilTemplate
* @var $ilCtrl ilCtrl
*/
global $lng, $tpl, $ilCtrl;
if (!ilChatroom::checkUserPermissions(array('read', 'write'), $this->gui->ref_id)) {
$ilCtrl->setParameterByClass('ilrepositorygui', 'ref_id', ROOT_FOLDER_ID);
$ilCtrl->redirectByClass('ilrepositorygui', '');
}
$chatSettings = new ilSetting('chatroom');
if (!$chatSettings->get('chat_enabled')) {
ilUtil::sendInfo($lng->txt('server_disabled'), true);
}
$this->gui->switchToVisibleMode();
$formFactory = new ilChatroomFormFactory();
if (!$settingsForm) {
$settingsForm = $formFactory->getSettingsForm();
}
$room = ilChatRoom::byObjectId($this->gui->object->getId());
$settings = array('title' => $this->gui->object->getTitle(), 'desc' => $this->gui->object->getDescription());
if ($room) {
ilChatroomFormFactory::applyValues($settingsForm, array_merge($settings, $room->getSettings()));
} else {
ilChatroomFormFactory::applyValues($settingsForm, $settings);
}
$settingsForm->setTitle($lng->txt('settings_title'));
$settingsForm->addCommandButton('settings-saveGeneral', $lng->txt('save'));
$settingsForm->setFormAction($ilCtrl->getFormAction($this->gui, 'settings-saveGeneral'));
$tpl->setVariable('ADM_CONTENT', $settingsForm->getHtml());
}
示例5: confirmTemplateSwitch
protected function confirmTemplateSwitch()
{
global $ilCtrl, $ilTabs, $tpl;
include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
// Check if template is changed
$new_tpl_id = (int) $_REQUEST['tplid'];
if ($new_tpl_id == ilDidacticTemplateObjSettings::lookupTemplateId($this->getParentObject()->object->getRefId())) {
$GLOBALS['ilLog']->write(__METHOD__ . ': Template id: ' . $new_tpl_id);
ilUtil::sendInfo($this->lng->txt('didactic_not_changed'), true);
$ilCtrl->returnToParent($this);
}
$ilTabs->clearTargets();
$ilTabs->clearSubTabs();
include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
$confirm = new ilConfirmationGUI();
$confirm->setFormAction($ilCtrl->getFormAction($this));
$confirm->setHeaderText($this->lng->txt('didactic_confirm_apply_new_template'));
$confirm->setConfirm($this->lng->txt('apply'), 'switchTemplate');
$confirm->setCancel($this->lng->txt('cancel'), 'cancel');
if ($new_tpl_id) {
include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateSetting.php';
$dtpl = new ilDidacticTemplateSetting($new_tpl_id);
$confirm->addItem('tplid', $new_tpl_id, $dtpl->getTitle() . '<div class="il_Description">' . $dtpl->getDescription() . ' ' . '</div>');
} else {
$confirm->addItem('tplid', $new_tpl_id, $this->lng->txt('default') . ' ' . '<div class="il_Description">' . sprintf($this->lng->txt('didactic_default_type_info'), $this->lng->txt('objs_' . $this->getParentObject()->object->getType())) . '</div>');
}
$tpl->setContent($confirm->getHTML());
}
示例6: suggestRange
/**
* Suggest a range for a result
*
* @access public
*/
function suggestRange()
{
if ($this->writePostData()) {
ilUtil::sendInfo($this->getErrorMessage());
}
$this->editQuestion();
}
示例7: save
private function save()
{
global $tpl, $ilCtrl;
$form = $this->BuildForm();
// Formular bauen
// Eingaben prüfen (Abhängig von SetRequired)
if ($form->CheckInput()) {
$form->setValuesByPost();
// Lade die Benutzereingaben
$emails = $form->getInput('emails');
// Speichere die E-Mails in eine Variable
require_once "Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/UIExample/classes/class.ilEmailSubscriber.php";
$subscriber = new ilEmailSubscriber($_GET['ref_id']);
$emails = $subscriber->getEmailsFromString($emails);
foreach ($emails as $email) {
$subscriber->subscribeEmail($email);
}
//var_dump($subscriber->getEmailsFromString($emails));
//exit;
//$emails_untereinander = "";
//$eintremails_untereinander = ;
ilUtil::sendSuccess("Die Nutzer folgender E-Mail-Adressen sind jetzt Kursmitglieder: " . $this->werteuntereinander($subscriber->getEmailsFound()), true);
ilUtil::sendInfo("Die Nutzer folgender E-Mail-Adressen konnten nicht gefunden werden: " . $this->werteuntereinander($subscriber->getEmailsNotFound()), true);
$this->ctrl->redirect($this, 'show');
/*
$ausgabestr .= "Die Nutzer folgender E-Mail-Adressen sind jetzt Kursmitglieder: ".$this->werteuntereinander($subscriber->getEmailsFound());
$ausgabestr .= "<br /><br /><br />Die Nutzer folgender E-Mail-Adressen konnten nicht gefunden werden: ".$this->werteuntereinander($subscriber->getEmailsNotFound());
$this->tpl->setContent($ausgabestr); //Zeige die E-Mails im Content an
*/
} else {
$this->tpl->setContent("Nicht Speichern");
}
}
示例8: ilObjectStatusGUI
/**
* Constructor
* @access public
*/
function ilObjectStatusGUI(&$a_obj)
{
global $ilUser, $ilCtrl, $ilias, $ilErr, $lng, $rbacreview;
$this->ctrl =& $ilCtrl;
$this->object =& $a_obj;
$this->tpl = new ilTemplate("tpl.info_layout.html", false, false, "Services/AccessControl");
$this->tpl->setVariable("INFO_REMARK_INTERRUPTED", $lng->txt('info_remark_interrupted'));
if (empty($_POST['Fuserid'])) {
$this->user =& $ilUser;
} else {
if ($_POST['Fselect_type'] == "id") {
$this->user = $ilias->obj_factory->getInstanceByObjId($_POST['Fuserid'], false);
} else {
include_once 'Services/User/classes/class.ilObjUser.php';
$user_id = ilObjUser::_lookupId($_POST['Fuserid']);
$this->user = $ilias->obj_factory->getInstanceByObjId($user_id, false);
}
if ($this->user === false or $this->user->getType() != 'usr') {
$this->user =& $ilUser;
ilUtil::sendFailure($lng->txt('info_err_user_not_exist'));
} else {
ilUtil::sendInfo($lng->txt('info_user_view_changed'));
}
}
// get all user roles and all valid roles in scope
$this->user_roles = $rbacreview->assignedRoles($this->user->getId());
$this->global_roles = $rbacreview->getGlobalRoles();
$this->valid_roles = $rbacreview->getParentRoleIds($this->object->getRefId());
$this->assigned_valid_roles = $this->getAssignedValidRoles();
$this->getPermissionInfo();
$this->getRoleAssignmentInfo();
$this->getObjectSummary();
}
示例9: updateLicense
/**
* Save the license form
* @access public
*/
function updateLicense()
{
$this->license->setLicenses((int) $_REQUEST["licenses"]);
$this->license->setRemarks($_REQUEST["remarks"]);
$this->license->update();
ilUtil::sendInfo($this->lng->txt('license_updated'), true);
$this->ctrl->redirect($this, "editLicense");
}
示例10: configure
/**
* Configure screen
*/
function configure()
{
global $tpl;
$pl = $this->getPluginObject();
ilUtil::sendInfo($pl->txt("nothing_to_configure"), false);
return;
$form = $this->initConfigurationForm();
$tpl->setContent($form->getHTML());
}
示例11: __construct
/**
* Constructor
*
* @param object $a_parent_obj parent gui object
* @param string $a_parent_cmd parent default command
* @param object $a_handler workspace access handler
* @param bool $a_load_data
* @param int $a_parent_node_id
*/
function __construct($a_parent_obj, $a_parent_cmd, $a_handler, $a_parent_node_id = null, $a_load_data = false)
{
global $ilCtrl, $lng;
$this->handler = $a_handler;
if (stristr(get_class($a_parent_obj), "portfolio")) {
$this->parent_node_id = $a_parent_node_id;
$this->portfolio_mode = true;
}
parent::__construct($a_parent_obj, $a_parent_cmd);
$this->setId("il_tbl_wspsh");
$this->setTitle($lng->txt("wsp_shared_resources"));
$this->addColumn($this->lng->txt("lastname"), "lastname");
$this->addColumn($this->lng->txt("firstname"), "firstname");
$this->addColumn($this->lng->txt("login"), "login");
if (!$this->portfolio_mode) {
$this->addColumn($this->lng->txt("wsp_shared_object_type"), "obj_type");
}
$this->addColumn($this->lng->txt("wsp_shared_date"), "acl_date");
$this->addColumn($this->lng->txt("wsp_shared_title"), "title");
$this->addColumn($this->lng->txt("wsp_shared_type"));
if (!$this->portfolio_mode) {
$this->addColumn($this->lng->txt("action"));
}
$this->setDefaultOrderField("acl_date");
$this->setDefaultOrderDirection("desc");
$this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
$this->setRowTemplate("tpl.shared_row.html", "Services/PersonalWorkspace");
$this->setDisableFilterHiding(true);
$this->setResetCommand("resetsharefilter", $this->lng->txt("wsp_shared_filter_reset_button"));
$this->setFilterCommand("applysharefilter", $this->lng->txt("wsp_shared_filter_button"));
$this->initFilter();
// reset will remove all filters
if ($this->portfolio_mode && !$this->filter["obj_type"]) {
$this->filter["obj_type"] = "prtf";
}
if ($a_load_data) {
/*
if(($this->filter["user"] && strlen($this->filter["user"]) > 3) ||
($this->filter["title"] && strlen($this->filter["title"]) > 3) ||
$this->filter["acl_date"] ||
$this->filter["obj_type"] ||
$this->filter["acl_type"] ||
$this->filter["crsgrp"])
{
*/
// #16630
$this->importData();
include_once "Services/User/classes/class.ilUserUtil.php";
return;
} else {
ilUtil::sendInfo($lng->txt("wsp_shared_mandatory_filter_info"));
}
// initial state: show filters only
$this->disable("header");
$this->disable("content");
}
示例12: postOutputProcessing
function postOutputProcessing($a_output)
{
global $lng;
if ($this->getOutputMode() == IL_PAGE_PREVIEW) {
if (!$this->getPageObject()->getActive()) {
ilUtil::sendInfo($lng->txt("adm_imprint_inactive"));
}
}
return $a_output;
}
示例13: writePostData
/**
* Evaluates a posted edit form and writes the form data in the question object
*
* @return integer A positive value, if one of the required fields wasn't set, else 0
* @access private
*/
function writePostData($always = false)
{
$hasErrors = !$always ? $this->editQuestion(true) : false;
if (!$hasErrors) {
$this->object->setTitle($_POST["title"]);
$this->object->setAuthor($_POST["author"]);
$this->object->setComment($_POST["comment"]);
include_once "./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
$questiontext = $_POST["question"];
$this->object->setQuestion($questiontext);
$this->object->setShuffle($_POST["shuffle"]);
$this->object->setEstimatedWorkingTime($_POST["Estimated"]["hh"], $_POST["Estimated"]["mm"], $_POST["Estimated"]["ss"]);
$this->object->setFeedbackSetting($_POST['feedback_setting']);
if ($this->getSelfAssessmentEditingMode()) {
$this->object->setNrOfTries($_POST['nr_of_tries']);
}
$this->object->setMultilineAnswerSetting($_POST["types"]);
if (is_array($_POST['choice']['imagename']) && $_POST["types"] == 1) {
$this->object->isSingleline = true;
ilUtil::sendInfo($this->lng->txt('info_answer_type_change'), true);
} else {
$this->object->isSingleline = $_POST["types"] == 0 ? true : false;
}
$this->object->setThumbSize(strlen($_POST["thumb_size"]) ? $_POST["thumb_size"] : "");
// Delete all existing answers and create new answers from the form data
$this->object->flushAnswers();
if ($this->object->isSingleline) {
foreach ($_POST['choice']['answer'] as $index => $answertext) {
$picturefile = $_POST['choice']['imagename'][$index];
$file_org_name = $_FILES['choice']['name']['image'][$index];
$file_temp_name = $_FILES['choice']['tmp_name']['image'][$index];
if (strlen($file_temp_name)) {
// check suffix
$suffix = strtolower(array_pop(explode(".", $file_org_name)));
if (in_array($suffix, array("jpg", "jpeg", "png", "gif"))) {
// upload image
$filename = $this->object->createNewImageFileName($file_org_name);
if ($this->object->setImageFile($filename, $file_temp_name) == 0) {
$picturefile = $filename;
}
}
}
$this->object->addAnswer($answertext, $_POST['choice']['points'][$index], $_POST['choice']['points_unchecked'][$index], $index, $picturefile);
}
} else {
foreach ($_POST['choice']['answer'] as $index => $answer) {
$answertext = $answer;
$this->object->addAnswer($answertext, $_POST['choice']['points'][$index], $_POST['choice']['points_unchecked'][$index], $index);
}
}
return 0;
} else {
return 1;
}
}
示例14: saveSorting
public function saveSorting()
{
if (count($_POST['sorting'])) {
foreach ($_POST['sorting'] as $topic_id => $sorting_value) {
$oTopic = new ilShopTopic($topic_id);
$oTopic->setCustomSorting((int) $sorting_value);
$oTopic->saveCustomSorting();
}
}
ilUtil::sendInfo($this->lng->txt('saved_successfully'));
return $this->showTopicsSortingTable();
}
示例15: onFeedbackEditingForwarding
/**
* On feedback editing forwarding
*/
function onFeedbackEditingForwarding()
{
global $lng;
if (strtolower($_GET["cmdClass"]) == "ilassquestionfeedbackeditinggui") {
include_once "./Modules/LearningModule/classes/class.ilObjContentObject.php";
if (ilObjContentObject::_lookupDisableDefaultFeedback($this->getPageObject()->getParentId())) {
ilUtil::sendInfo($lng->txt("cont_def_feedb_deactivated"));
} else {
ilUtil::sendInfo($lng->txt("cont_def_feedb_activated"));
}
}
}