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


PHP ilUtil::sendSuccess方法代码示例

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


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

示例1: 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

示例2: handleCode

 /**
  * Handle target parameter
  * @param object $a_target
  * @return 
  */
 public static function handleCode($a_ref_id, $a_type, $a_code)
 {
     global $lng, $tree, $ilUser;
     include_once './Services/Link/classes/class.ilLink.php';
     $lng->loadLanguageModule($a_type);
     try {
         self::useCode($a_code, $a_ref_id);
         $title = ilObject::_lookupTitle(ilObject::_lookupObjectId($a_ref_id));
         ilUtil::sendSuccess(sprintf($lng->txt($a_type . "_admission_link_success_registration"), $title), true);
         ilUtil::redirect(ilLink::_getLink($a_ref_id));
     } catch (ilMembershipRegistrationException $e) {
         switch ($e->getCode()) {
             case 124:
                 //added to waiting list
                 ilUtil::sendSuccess($e->getMessage(), true);
                 break;
             case 123:
                 //object is full
                 ilUtil::sendFailure($lng->txt($a_type . "_admission_link_failure_membership_limited"), true);
                 break;
             case 789:
                 //out of registration period
                 ilUtil::sendFailure($lng->txt($a_type . "_admission_link_failure_registration_period"), true);
                 break;
             default:
                 ilUtil::sendFailure($e->getMessage(), true);
                 break;
         }
         $GLOBALS['ilLog']->logStack();
         $GLOBALS['ilLog']->write($e->getCode() . ': ' . $e->getMessage());
         $parent_id = $tree->getParentId($a_ref_id);
         ilUtil::redirect(ilLink::_getLink($parent_id));
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:39,代码来源:class.ilMembershipRegistrationCodeUtils.php

示例3: changeOwner

 function changeOwner()
 {
     global $rbacsystem, $ilObjDataCache;
     if (!($user_id = ilObjUser::_lookupId($_POST['owner']))) {
         ilUtil::sendFailure($this->lng->txt('user_not_known'));
         $this->owner();
         return true;
     }
     // no need to change?
     if ($user_id != $this->gui_obj->object->getOwner()) {
         $this->gui_obj->object->setOwner($user_id);
         $this->gui_obj->object->updateOwner();
         $ilObjDataCache->deleteCachedEntry($this->gui_obj->object->getId());
         include_once "Services/AccessControl/classes/class.ilRbacLog.php";
         if (ilRbacLog::isActive()) {
             ilRbacLog::add(ilRbacLog::CHANGE_OWNER, $this->gui_obj->object->getRefId(), array($user_id));
         }
     }
     ilUtil::sendSuccess($this->lng->txt('owner_updated'), true);
     if (!$rbacsystem->checkAccess("edit_permission", $this->gui_obj->object->getRefId())) {
         $this->ctrl->redirect($this->gui_obj);
         return true;
     }
     $this->ctrl->redirect($this, 'owner');
     return true;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:26,代码来源:class.ilPermission2GUI.php

示例4: 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");
     }
 }
开发者ID:prante,项目名称:CoreEmailSubscription,代码行数:33,代码来源:class.ilCourseEmailSubscriptionGUI.php

示例5: retryGeneration

 /**
  * @param srCertificate $certificate
  */
 protected function retryGeneration(srCertificate $certificate)
 {
     $certificate->setStatus(srCertificate::STATUS_NEW);
     $certificate->update();
     ilUtil::sendSuccess($this->pl->txt('msg_retry_generation'), true);
     $this->ctrl->redirect($this, 'index');
 }
开发者ID:studer-raimann,项目名称:Certificate,代码行数:10,代码来源:class.srCertificateAdministrationGUI.php

示例6: saveObject

 /**
  * save object
  * @access	public
  */
 function saveObject()
 {
     global $rbacadmin;
     // create and insert forum in objecttree
     $newObj = parent::saveObject();
     // put here object specific stuff
     // always send a message
     ilUtil::sendSuccess($this->lng->txt("object_added"), true);
     exit;
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:14,代码来源:class.ilObjRecoveryFolderGUI.php

示例7: save

 /**
  * Save config
  */
 public function save()
 {
     $form = new ilCertificateConfigFormGUI($this);
     if ($form->saveObject()) {
         ilUtil::sendSuccess($this->pl->txt('msg_save_config'), true);
         $this->ctrl->redirect($this, 'configure');
     } else {
         $form->setValuesByPost();
         $this->tpl->setContent($form->getHTML());
     }
 }
开发者ID:studer-raimann,项目名称:Certificate,代码行数:14,代码来源:class.ilCertificateConfigGUI.php

示例8: saveSettings

 public function saveSettings()
 {
     global $ilSetting;
     $this->checkPermission("write");
     $form = $this->initFormSettings();
     if ($form->checkInput()) {
         $ilSetting->set("links_dynamic", $form->getInput("links_dynamic"));
         ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
         $this->ctrl->redirect($this, "editSettings");
     }
     $form->setValuesByPost();
     $this->editSettings($form);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:13,代码来源:class.ilObjWebResourceAdministrationGUI.php

示例9: save

 /**
  * Save form input (currently does not save anything to db)
  *
  */
 public function save()
 {
     global $tpl, $lng, $ilCtrl;
     $pl = $this->getPluginObject();
     $form = $this->initConfigurationForm();
     if ($form->checkInput()) {
         ilUtil::sendSuccess($pl->txt("saving_invoked"), true);
         $ilCtrl->redirect($this, "configure");
     } else {
         $form->setValuesByPost();
         $tpl->setContent($form->getHtml());
     }
 }
开发者ID:ilifau,项目名称:Flashcards,代码行数:17,代码来源:class.ilFlashcardsConfigGUI.php

示例10: update

 /**
  * Update
  */
 protected function update()
 {
     include_once './Services/WebServices/FileManager/classes/class.ilFMSettings.php';
     $settings = ilFMSettings::getInstance();
     $form = $this->initSettingsForm();
     if ($form->checkInput()) {
         $settings->enable($form->getInput('active'));
         $settings->enableLocalFS($form->getInput('local'));
         $settings->setMaxFileSize($form->getInput('filesize'));
         $settings->update();
         ilUtil::sendSuccess($GLOBALS['lng']->txt('settings_saved'), true);
         $GLOBALS['ilCtrl']->redirect($this, 'settings');
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:17,代码来源:class.ilFMSettingsGUI.php

示例11: saveSettings

 public function saveSettings()
 {
     global $ilSetting;
     $this->checkPermission("write");
     $form = $this->initFormSettings();
     if ($form->checkInput()) {
         if ($this->save($form)) {
             $ilSetting->set('mail_' . $this->getParentObjType() . '_member_notification', (int) $form->getInput('mail_member_notification'));
             ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
             $this->ctrl->redirect($this, "editSettings");
         }
     }
     $form->setValuesByPost();
     $this->editSettings($form);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:15,代码来源:class.ilMembershipAdministrationGUI.php

示例12: updateUser

 function updateUser()
 {
     if (isset($_GET["userdetails_id"])) {
         $parent = $this->details_id;
         $this->__initDetails((int) $_GET["userdetails_id"]);
     }
     $this->__updateUser($_REQUEST['user_id'], $this->details_obj_id);
     ilUtil::sendSuccess($this->lng->txt('trac_update_edit_user'));
     if (!isset($_GET["userdetails_id"])) {
         $this->details();
     } else {
         $this->__initDetails($parent);
         $this->userDetails();
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:15,代码来源:class.ilLPListOfObjectsGUI.php

示例13: removeParticipations

 /**
  * Remove a participations.
  *
  * @param integer $booking_id The booking id of the participation.
  */
 public function removeParticipations(array $a_booking_ids)
 {
     foreach ($a_booking_ids as $a_booking_id) {
         if (!ilRoomSharingNumericUtils::isPositiveNumber($a_booking_id)) {
             ilUtil::sendFailure($this->lng->txt("rep_robj_xrs_no_id_submitted"), true);
         }
     }
     //In order to prevent unnessary prepareManip statements, use different function if only one booking shoud be left.
     if (count($a_booking_ids) == 1) {
         $this->ilRoomsharingDatabase->deleteParticipation($this->ilUser->getId(), $a_booking_ids[0]);
     } else {
         $this->ilRoomsharingDatabase->deleteParticipations($this->ilUser->getId(), $a_booking_ids);
     }
     $this->sendQuitMail($a_booking_ids);
     ilUtil::sendSuccess($this->lng->txt('rep_robj_xrs_participations_left'), true);
 }
开发者ID:studer-raimann,项目名称:RoomSharing,代码行数:21,代码来源:class.ilRoomSharingParticipations.php

示例14: save

 /**
  * Save settings
  */
 protected function save()
 {
     global $lng, $ilCtrl;
     $form = $this->initConfigurationForm();
     $settings = ilFhoevEventSettings::getInstance();
     if ($form->checkInput()) {
         $settings->setActive($form->getInput('active'));
         $settings->setTemplateId($form->getInput('dtpl'));
         $settings->save();
         ilUtil::sendSuccess($lng->txt('settings_saved'), true);
         $ilCtrl->redirect($this, 'configure');
     }
     $error = $lng->txt('err_check_input');
     $form->setValuesByPost();
     ilUtil::sendFailure($e);
     $this->configure($form);
 }
开发者ID:leifos-gmbh,项目名称:FhoevEvent,代码行数:20,代码来源:class.ilFhoevEventConfigGUI.php

示例15: save

 public function save()
 {
     global $lng;
     $table = ilDataCollectionCache::getTableCache($_GET['table_id']);
     $fields =& $table->getFields();
     foreach ($fields as &$field) {
         $field->setVisible($_POST['visible'][$field->getId()] == "on");
         $field->setEditable($_POST['editable'][$field->getId()] == "on");
         $field->setFilterable($_POST['filterable'][$field->getId()] == "on");
         $field->setLocked($_POST['locked'][$field->getId()] == "on");
         $field->setOrder($_POST['order'][$field->getId()]);
         $field->doUpdate();
     }
     $table->buildOrderFields();
     ilUtil::sendSuccess($lng->txt("dcl_table_settings_saved"));
     $this->listFields();
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:17,代码来源:class.ilDataCollectionFieldListGUI.php


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