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


PHP ilUtil::sendQuestion方法代码示例

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


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

示例1: rsvConfirmCancelAggregationObject

 function rsvConfirmCancelAggregationObject(array $a_ids = null)
 {
     global $tpl, $ilCtrl, $lng;
     $this->tabs_gui->clearTargets();
     $this->tabs_gui->setBackTarget($lng->txt("back"), $ilCtrl->getLinkTarget($this, "log"));
     // #13511
     ilUtil::sendQuestion($lng->txt("book_confirm_cancel"));
     $form = $this->rsvConfirmCancelAggregationForm($a_ids);
     $tpl->setContent($form->getHTML());
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:10,代码来源:class.ilObjBookingPoolGUI.php

示例2: removeMemberObject

 /**
  * displays confirmation formular with users that shall be removed from group
  * @access public
  */
 function removeMemberObject()
 {
     global $ilUser, $rbacreview;
     $this->__setSubTabs('members');
     $user_ids = array();
     if (isset($_POST['user_id'])) {
         $user_ids = $_POST['user_id'];
     } else {
         if (isset($_GET['mem_id'])) {
             $user_ids[] = $_GET['mem_id'];
         } else {
             if (isset($_GET['mem_id_arr'])) {
                 $user_ids = explode(',', $_GET['mem_id_arr']);
             }
         }
     }
     if (empty($user_ids[0])) {
         $this->ilErr->raiseError($this->lng->txt("no_checkbox"), $this->ilErr->MESSAGE);
     }
     if (count($user_ids) == 1 && $ilUser->getId() != $user_ids[0]) {
         if (!$rbacreview->isAssigned($ilUser->getId(), SYSTEM_ROLE_ID) && !in_array($ilUser->getId(), $this->object->getAdminIds())) {
             $this->ilErr->raiseError($this->lng->txt("ilinc_err_no_permission"), $this->ilErr->MESSAGE);
         }
     }
     //bool value: says if $users_ids contains current user id
     $is_dismiss_me = array_search($this->ilias->account->getId(), $user_ids);
     $confirm = "confirmedRemoveMember";
     $cancel = "canceled";
     $info = $is_dismiss_me !== false ? "ilinc_dismiss_myself" : "ilinc_dismiss_member";
     $status = "";
     $return = "members";
     ilUtil::sendQuestion($this->lng->txt($info));
     $data = array();
     if (is_array($user_ids)) {
         foreach ($user_ids as $id) {
             $obj_data = ilObjectFactory::getInstanceByObjId($id);
             $data[$id] = array('type' => ilUtil::getImageTagByType($obj_data->getType(), $this->tpl->tplPath), 'title' => $obj_data->getTitle(), 'desc' => $obj_data->getDescription(), 'last_update' => $obj_data->getLastUpdateDate());
         }
     } else {
         $obj_data = ilObjectFactory::getInstanceByObjId($user_ids);
         $data[$user_ids] = array('type' => ilUtil::getImageTagByType($obj_data->getType(), $this->tpl->tplPath), 'title' => $obj_data->getTitle(), 'desc' => $obj_data->getDescription(), 'last_update' => $obj_data->getLastUpdateDate());
     }
     //write  in sessionvariables
     if (is_array($user_ids)) {
         $_SESSION['saved_post']['user_id'] = $user_ids;
     } else {
         $_SESSION['saved_post']['user_id'][0] = $user_ids;
     }
     if (isset($status)) {
         $_SESSION['saved_post']['status'] = $status;
     }
     include_once 'Modules/ILinc/classes/class.iliLinkConfirmationTableGUI.php';
     $this->ctrl->setParameter($this, 'cmd_return_location', $a_cmd_return_location);
     $this->ctrl->setParameter($this, 'mem_id_arr', implode(',', $user_ids));
     $oTable = new iliLinkConfirmationTableGUI($this, $data, 'removeMember', $return);
     $oTable->addCommandButton($cancel, $this->lng->txt('cancel'));
     $oTable->addCommandButton($confirm, $this->lng->txt('confirm'));
     return $this->tpl->setContent($oTable->getHTML());
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:63,代码来源:class.ilObjiLincCourseGUI.php

示例3: deleteBlock

 /**
  * Confirm removing question block
  * @param int $a_id
  */
 protected function deleteBlock()
 {
     global $lng, $ilCtrl;
     $ilCtrl->setParameter($this->editor_gui, "pgov", $this->current_page);
     ilUtil::sendQuestion($lng->txt("remove_questions"));
     $page = $this->object->getSurveyPages();
     $page = $page[$this->current_page - 1];
     // #10567
     if ($_REQUEST["csum"] != md5(print_r($page, true))) {
         $ilCtrl->redirect($this, "renderPage");
     }
     $page = array_shift($page);
     $block_id = $page["questionblock_id"];
     if ($block_id) {
         $this->editor_gui->removeQuestionsForm(array($block_id), array(), array());
     } else {
         $this->editor_gui->removeQuestionsForm(array(), array($page["question_id"]), array());
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:23,代码来源:class.ilSurveyPageGUI.php

示例4: delete

 /**
  * Show delete confirmation
  */
 public function delete()
 {
     global $tpl, $ilSetting, $ilErr;
     $this->ctrl->setReturnByClass(get_class($this->getContainer()), '');
     $to_delete = array();
     if ((int) $_GET['item_ref_id']) {
         $to_delete = array((int) $_GET['item_ref_id']);
     }
     if (isset($_POST['id']) and is_array($_POST['id'])) {
         $to_delete = $_POST['id'];
     }
     if (!$to_delete) {
         $ilErr->raiseError($this->lng->txt('no_checkbox'), $ilErr->MESSAGE);
     }
     include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
     $confirm = new ilConfirmationGUI();
     $confirm->setFormAction($this->ctrl->getFormActionByClass(get_class($this->getContainer()), 'cancel'));
     $confirm->setHeaderText('');
     $confirm->setCancel($this->lng->txt('cancel'), 'cancelDelete');
     $confirm->setConfirm($this->lng->txt('delete'), 'performDelete');
     foreach ($to_delete as $delete) {
         $obj_id = ilObject::_lookupObjId($delete);
         $type = ilObject::_lookupType($obj_id);
         $confirm->addItem('id[]', $delete, call_user_func(array(ilObjectFactory::getClassByType($type), '_lookupTitle'), $obj_id), ilUtil::getTypeIconPath($type, $obj_id));
     }
     $msg = $this->lng->txt("info_delete_sure");
     if (!$ilSetting->get('enable_trash')) {
         $msg .= "<br/>" . $this->lng->txt("info_delete_warning_no_trash");
     }
     ilUtil::sendQuestion($msg);
     $tpl->setContent($confirm->getHTML());
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:35,代码来源:class.ilAdministrationCommandGUI.php

示例5: confirmDeleteArchives

 function confirmDeleteArchives()
 {
     global $ilAccess, $ilErr;
     // MINIMUM ACCESS LEVEL = 'write'
     if (!$ilAccess->checkAccess("write", '', $this->course_obj->getRefId())) {
         $ilErr->raiseError($this->lng->txt('msg_no_perm_write'), $ilErr->MESSAGE);
     }
     if (!$_POST['archives']) {
         ilUtil::sendFailure($this->lng->txt("crs_no_archives_selected"));
         $this->view();
         return false;
     }
     $_SESSION["crs_archives"] = $_POST["archives"];
     ilUtil::sendQuestion($this->lng->txt("crs_sure_delete_selected_archives"));
     $this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.crs_confirm_delete_archives.html', 'Modules/Course');
     $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
     $this->tpl->setVariable("TXT_ARCHIVE_NAME", $this->lng->txt('crs_file_name'));
     $this->course_obj->initCourseArchiveObject();
     $counter = 0;
     foreach ($_POST['archives'] as $archive_id) {
         $archive = $this->course_obj->archives_obj->getArchive($archive_id);
         $this->tpl->setCurrentBlock("archives");
         $this->tpl->setVariable("ARCHIVE_NAME", $archive['archive_name']);
         $this->tpl->setVariable("CSS_ROW", ilUtil::switchColor($counter++, 'tblrow1', 'tblrow2'));
         $this->tpl->parseCurrentBlock();
     }
     $this->tpl->setVariable("DELETE", $this->lng->txt('delete'));
     $this->tpl->setVariable("CANCEL", $this->lng->txt('cancel'));
     return true;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:30,代码来源:class.ilCourseArchivesGUI.php

示例6: confirmDeleteExportFile

 /**
  * confirmation screen for export file deletion
  */
 function confirmDeleteExportFile()
 {
     if (!isset($_POST["file"])) {
         ilUtil::sendInfo($this->lng->txt("no_checkbox"), true);
         $this->ctrl->redirect($this, "showExportList");
     }
     ilUtil::sendQuestion($this->lng->txt("info_delete_sure"));
     $export_files = $this->object->getExportFiles();
     include_once "./Modules/Scorm2004/classes/class.ilSCORM2004ExportTableGUI.php";
     $table_gui = new ilSCORM2004ExportTableGUI($this, 'showExportList', true);
     $data = array();
     foreach ($export_files as $exp_file) {
         foreach ($_POST['file'] as $delete_file) {
             if (strcmp($delete_file, $exp_file['file']) == 0) {
                 $public_str = $exp_file["file"] == $this->object->getPublicExportFile($exp_file["type"]) ? " <b>(" . $this->lng->txt("public") . ")<b>" : "";
                 $file_arr = explode("__", $exp_file["file"]);
                 array_push($data, array('file' => $exp_file['file'], 'date' => ilDatePresentation::formatDate(new ilDateTime($file_arr[0], IL_CAL_UNIX)), 'size' => $exp_file['size'], 'type' => $exp_file['type'] . $public_str));
             }
         }
     }
     $table_gui->setData($data);
     $this->tpl->setVariable('ADM_CONTENT', $table_gui->getHTML());
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:26,代码来源:class.ilObjSCORM2004LearningModuleGUI.php

示例7: deleteAllUserDataObject

 /**
  * Asks for a confirmation to delete all user data of the test object
  *
  * Asks for a confirmation to delete all user data of the test object
  *
  * DEPRECATED?
  *
  * @access    public
  */
 function deleteAllUserDataObject()
 {
     ilUtil::sendQuestion($this->lng->txt("confirm_delete_all_user_data"));
     $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_as_tst_maintenance.html", "Modules/Test");
     $this->tpl->setCurrentBlock("confirm_delete");
     $this->tpl->setVariable("BTN_CONFIRM_DELETE_ALL", $this->lng->txt("confirm"));
     $this->tpl->setVariable("BTN_CANCEL_DELETE_ALL", $this->lng->txt("cancel"));
     $this->tpl->parseCurrentBlock();
     $this->tpl->setCurrentBlock("adm_content");
     $this->tpl->setVariable("FORM_ACTION", $this->ctrl->getFormAction($this));
     $this->tpl->parseCurrentBlock();
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:21,代码来源:class.ilObjTestGUI.php

示例8: originalSyncForm

 function originalSyncForm()
 {
     $this->ctrl->saveParameter($this, "rtrn");
     ilUtil::sendQuestion($this->lng->txt("confirm_sync_questions"));
     $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_svy_qpl_sync_original.html", "Modules/SurveyQuestionPool");
     $this->tpl->setCurrentBlock("adm_content");
     $this->tpl->setVariable("BUTTON_YES", $this->lng->txt("yes"));
     $this->tpl->setVariable("BUTTON_NO", $this->lng->txt("no"));
     $this->tpl->setVariable("FORM_ACTION", $this->ctrl->getFormAction($this));
     $this->tpl->parseCurrentBlock();
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:11,代码来源:class.SurveyQuestionGUI.php

示例9: updateObject

 /**
  * update GroupObject
  * @param bool update group type
  * @access public
  */
 public function updateObject()
 {
     global $ilErr;
     $this->checkPermission('write');
     $this->initForm();
     $this->form->checkInput();
     $old_type = $this->object->getGroupType();
     $this->load();
     $ilErr->setMessage('');
     if (!$this->object->validate()) {
         $err = $this->lng->txt('err_check_input');
         ilUtil::sendFailure($err);
         $err = $ilErr->getMessage();
         ilUtil::sendInfo($err);
         $this->editObject();
         return true;
     }
     $modified = false;
     if ($this->object->isGroupTypeModified($old_type) and !$update_group_type) {
         $modified = true;
         $this->object->setGroupType($old_type);
     }
     $this->object->update();
     include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
     ilObjectServiceSettingsGUI::updateServiceSettingsForm($this->object->getId(), $this->form, array(ilObjectServiceSettingsGUI::CALENDAR_VISIBILITY, ilObjectServiceSettingsGUI::NEWS_VISIBILITY));
     // Save sorting
     include_once './Services/Container/classes/class.ilContainerSortingSettings.php';
     $sort = new ilContainerSortingSettings($this->object->getId());
     $sort->setSortMode((int) $_POST['sor']);
     $sort->update();
     // BEGIN ChangeEvents: Record update Object.
     require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
     global $ilUser;
     ilChangeEvent::_recordWriteEvent($this->object->getId(), $ilUser->getId(), 'update');
     ilChangeEvent::_catchupWriteEvents($this->object->getId(), $ilUser->getId());
     // END PATCH ChangeEvents: Record update Object.
     // Update ecs export settings
     include_once 'Modules/Group/classes/class.ilECSGroupSettings.php';
     $ecs = new ilECSGroupSettings($this->object);
     $ecs->handleSettingsUpdate();
     if ($modified) {
         include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
         ilUtil::sendQuestion($this->lng->txt('grp_warn_grp_type_changed'));
         $confirm = new ilConfirmationGUI();
         $confirm->setFormAction($this->ctrl->getFormAction($this));
         $confirm->addItem('grp_type', $this->object->getGroupType(), $this->lng->txt('grp_info_new_grp_type') . ': ' . ($this->object->getGroupType() == GRP_TYPE_CLOSED ? $this->lng->txt('il_grp_status_open') : $this->lng->txt('il_grp_status_closed')));
         $confirm->addButton($this->lng->txt('grp_change_type'), 'updateGroupType');
         $confirm->setCancel($this->lng->txt('cancel'), 'edit');
         $this->tpl->setContent($confirm->getHTML());
         return true;
     } else {
         ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
         $this->ctrl->redirect($this, 'edit');
         return true;
     }
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:61,代码来源:class.ilObjGroupGUI.php

示例10: deleteSubscribers

 function deleteSubscribers()
 {
     global $rbacsystem;
     $this->tabs_gui->setTabActive('members');
     // MINIMUM ACCESS LEVEL = 'administrate'
     $this->checkPermission('write');
     /*
     if(!$rbacsystem->checkAccess("write", $this->object->getRefId()))
     {
     	$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
     }
     */
     if (!is_array($_POST["subscriber"]) or !count($_POST["subscriber"])) {
         ilUtil::sendFailure($this->lng->txt("crs_no_subscribers_selected"));
         $this->membersObject();
         return false;
     }
     ilUtil::sendQuestion($this->lng->txt("crs_delete_subscribers_sure"));
     // SHOW DELETE SCREEN
     $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.crs_editMembers.html", 'Modules/Course');
     // SAVE IDS IN SESSION
     $_SESSION["crs_delete_subscriber_ids"] = $_POST["subscriber"];
     $counter = 0;
     $f_result = array();
     foreach ($_POST["subscriber"] as $member_id) {
         $member_data = $this->object->getMembersObject()->getSubscriberData($member_id);
         // GET USER OBJ
         if ($tmp_obj = ilObjectFactory::getInstanceByObjId($member_id, false)) {
             $f_result[$counter][] = $tmp_obj->getLogin();
             $f_result[$counter][] = $tmp_obj->getFirstname();
             $f_result[$counter][] = $tmp_obj->getLastname();
             $f_result[$counter][] = ilDatePresentation::formatDate(new ilDateTime($member_data['time']), IL_CAL_UNIX);
             unset($tmp_obj);
             ++$counter;
         }
     }
     return $this->__showDeleteSubscriberTable($f_result);
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:38,代码来源:class.ilObjCourseGUI.php

示例11: confirmResetTemplateObject

 /**
  * Enable all settings - Confirmation
  */
 function confirmResetTemplateObject()
 {
     ilUtil::sendQuestion($this->lng->txt("test_confirm_template_reset"));
     $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_tst_tst_confirm_resettemplate.html", "Modules/Test");
     $this->tpl->setCurrentBlock("adm_content");
     $this->tpl->setVariable("BTN_CONFIRM_REMOVE", $this->lng->txt("confirm"));
     $this->tpl->setVariable("BTN_CANCEL_REMOVE", $this->lng->txt("cancel"));
     $this->tpl->setVariable("FORM_ACTION", $this->ctrl->getFormAction($this, "resetTemplateObject"));
     $this->tpl->parseCurrentBlock();
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:13,代码来源:class.ilObjTestGUI.php

示例12: askDeleteObjective

 function askDeleteObjective()
 {
     global $rbacsystem;
     // MINIMUM ACCESS LEVEL = 'write'
     if (!$rbacsystem->checkAccess("write", $this->course_obj->getRefId())) {
         $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"), $this->ilErr->MESSAGE);
     }
     if (!count($_POST['objective'])) {
         ilUtil::sendFailure($this->lng->txt('crs_no_objective_selected'));
         $this->listObjectives();
         return true;
     }
     $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.crs_objectives.html", 'Modules/Course');
     ilUtil::sendQuestion($this->lng->txt('crs_delete_objectve_sure'));
     $tpl =& new ilTemplate("tpl.table.html", true, true);
     $tpl->addBlockfile("TBL_CONTENT", "tbl_content", "tpl.crs_objectives_delete_row.html", 'Modules/Course');
     $counter = 0;
     foreach ($_POST['objective'] as $objective_id) {
         $objective_obj = $this->__initObjectivesObject($objective_id);
         $tpl->setCurrentBlock("tbl_content");
         $tpl->setVariable("ROWCOL", ilUtil::switchColor(++$counter, "tblrow2", "tblrow1"));
         $tpl->setVariable("TITLE", $objective_obj->getTitle());
         $tpl->setVariable("DESCRIPTION", $objective_obj->getDescription());
         $tpl->parseCurrentBlock();
     }
     $tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
     // Show action row
     $tpl->setCurrentBlock("tbl_action_btn");
     $tpl->setVariable("BTN_NAME", 'deleteObjectives');
     $tpl->setVariable("BTN_VALUE", $this->lng->txt('delete'));
     $tpl->parseCurrentBlock();
     $tpl->setCurrentBlock("tbl_action_btn");
     $tpl->setVariable("BTN_NAME", 'listObjectives');
     $tpl->setVariable("BTN_VALUE", $this->lng->txt('cancel'));
     $tpl->parseCurrentBlock();
     $tpl->setCurrentBlock("tbl_action_row");
     $tpl->setVariable("COLUMN_COUNTS", 1);
     $tpl->setVariable("IMG_ARROW", ilUtil::getImagePath('arrow_downright.png'));
     $tpl->parseCurrentBlock();
     // create table
     $tbl = new ilTableGUI();
     $tbl->setStyle('table', 'std');
     // title & header columns
     $tbl->setTitle($this->lng->txt("crs_objectives"), "icon_lobj.png", $this->lng->txt("crs_objectives"));
     $tbl->setHeaderNames(array($this->lng->txt("title")));
     $tbl->setHeaderVars(array("title"), array("ref_id" => $this->course_obj->getRefId(), "cmdClass" => "ilcourseobjectivesgui", "cmdNode" => $_GET["cmdNode"]));
     $tbl->setColumnWidth(array("50%"));
     $tbl->setLimit($_GET["limit"]);
     $tbl->setOffset($_GET["offset"]);
     $tbl->setMaxCount(count($_POST['objective']));
     // footer
     $tbl->disable("footer");
     $tbl->disable('sort');
     // render table
     $tbl->setTemplate($tpl);
     $tbl->render();
     $this->tpl->setVariable("OBJECTIVES_TABLE", $tpl->get());
     // Save marked objectives
     $_SESSION['crs_delete_objectives'] = $_POST['objective'];
     return true;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:61,代码来源:class.ilCourseObjectivesGUI.php

示例13: getHTML

 /**
  * Get confirmation screen HTML.
  *
  * @return	string		HTML code.
  */
 public final function getHTML()
 {
     global $lng;
     ilUtil::sendQuestion($this->getHeaderText());
     include_once "./Services/Utilities/classes/class.ilConfirmationTableGUI.php";
     // delete/handle items
     if (count($this->item) > 0) {
         $ctab = new ilConfirmationTableGUI($this->use_images);
         $ctab->setData($this->item);
         // other buttons
         foreach ($this->buttons as $b) {
             $ctab->addCommandButton($b["cmd"], $b["txt"]);
         }
         $ctab->addCommandButton($this->confirm_cmd, $this->confirm_txt);
         $ctab->addCommandButton($this->cancel_cmd, $this->cancel_txt);
         $ctab->setFormAction($this->getFormAction());
         foreach ($this->hidden_item as $hidden_item) {
             $ctab->addHiddenInput($hidden_item["var"], $hidden_item["value"]);
         }
         if ($this->form_name) {
             $ctab->setFormName($this->form_name);
         }
         return $ctab->getHTML();
     } else {
         $tb = new ilToolbarGUI();
         $tb->setFormAction($this->getFormAction());
         $tb->addFormButton($this->confirm_txt, $this->confirm_cmd);
         $tb->addFormButton($this->cancel_txt, $this->cancel_cmd);
         return $tb->getHTML();
     }
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:36,代码来源:class.ilConfirmationGUI.php

示例14: deleteCoupon

 public function deleteCoupon()
 {
     $this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.main_view.html', 'Services/Payment');
     if (!isset($_GET['coupon_id'])) {
         return ilUtil::sendFailure($this->lng->txt('no_coupon_selected'));
     }
     #		$this->ctrl->setParameter($this, 'coupon_id', $this->coupon_obj->getId());
     $this->__showButtons();
     ilUtil::sendQuestion($this->lng->txt('paya_coupons_sure_delete_selected_codes'));
     $oConfirmationGUI = new ilConfirmationGUI();
     // set confirm/cancel commands
     $oConfirmationGUI->setFormAction($this->ctrl->getFormAction($this, 'performDeleteCoupon'));
     $oConfirmationGUI->setHeaderText('');
     $oConfirmationGUI->setCancel($this->lng->txt("cancel"), "showCoupons");
     $oConfirmationGUI->setConfirm($this->lng->txt("confirm"), 'performDeleteCoupon');
     $oConfirmationGUI->addItem('', '', ilPaymentCoupons::_lookupTitle($_GET['coupon_id']));
     $oConfirmationGUI->addHiddenItem('coupon_id', $_GET['coupon_id']);
     $this->tpl->setVariable('CONFIRMATION', $oConfirmationGUI->getHTML());
     return true;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:20,代码来源:class.ilPaymentCouponGUI.php

示例15: deleteVersions

 /**
  * Displays a confirmation screen with selected file versions that should be deleted.
  */
 function deleteVersions()
 {
     global $ilTabs, $ilLocator;
     // get ids either from GET (if single item was clicked) or
     // from POST (if multiple items were selected)
     $version_ids = isset($_GET["hist_id"]) ? array($_GET["hist_id"]) : $_POST["hist_id"];
     if (count($version_ids) < 1) {
         ilUtil::sendFailure($this->lng->txt("no_checkbox"), true);
         $this->ctrl->redirect($this, "versions");
     } else {
         $ilTabs->activateTab("id_versions");
         // check if all versions are selected
         $versionsToKeep = array_udiff($this->object->getVersions(), $version_ids, array($this, "compareHistoryIds"));
         if (count($versionsToKeep) < 1) {
             // set our message
             ilUtil::sendQuestion($this->lng->txt("file_confirm_delete_all_versions"));
             // show confirmation gui
             include_once "./Services/Utilities/classes/class.ilConfirmationGUI.php";
             $conf_gui = new ilConfirmationGUI();
             $conf_gui->setFormAction($this->ctrl->getFormAction($this, "versions"));
             $conf_gui->setCancel($this->lng->txt("cancel"), "cancelDeleteFile");
             $conf_gui->setConfirm($this->lng->txt("confirm"), "confirmDeleteFile");
             $conf_gui->addItem("id[]", $this->ref_id, $this->object->getTitle(), ilObject::_getIcon($this->object->getId(), "small", $this->object->getType()), $this->lng->txt("icon") . " " . $this->lng->txt("obj_" . $this->object->getType()));
             $html = $conf_gui->getHTML();
         } else {
             include_once "./Modules/File/classes/class.ilFileVersionTableGUI.php";
             ilUtil::sendQuestion($this->lng->txt("file_confirm_delete_versions"));
             $versions = $this->object->getVersions($version_ids);
             $table = new ilFileVersionTableGUI($this, 'versions', true);
             $table->setMaxCount(sizeof($versions));
             $table->setData($versions);
             $html = $table->getHTML();
         }
         $this->tpl->setVariable('ADM_CONTENT', $html);
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:39,代码来源:class.ilObjFileGUI.php


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