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


PHP ilInfoScreenGUI::setFormAction方法代码示例

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


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

示例1: show

 /**
  * Show subscription info
  */
 protected function show()
 {
     $token = $this->createToken();
     ilUtil::sendInfo($GLOBALS['lng']->txt('cal_subscription_info'));
     include_once './Services/InfoScreen/classes/class.ilInfoScreenGUI.php';
     $info = new ilInfoScreenGUI($this);
     $info->setFormAction($GLOBALS['ilCtrl']->getFormAction($this));
     $hash = $this->createToken();
     $url = ILIAS_HTTP_PATH . '/calendar.php?client_id=' . CLIENT_ID . '&token=' . $hash;
     $info->addSection($this->getCalendar()->getTitle());
     $info->addProperty('Abonnieren', $url, $url);
     $GLOBALS['tpl']->setContent($info->getHTML());
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:16,代码来源:class.ilCalendarSubscriptionGUI.php

示例2: details

 /**
  * show calendar details
  *
  * @access protected
  * @return
  */
 protected function details()
 {
     global $tpl;
     if (!$_GET['category_id']) {
         ilUtil::sendFailure($this->lng->txt('select_one'), true);
         $this->ctrl->returnToParent($this);
     }
     $this->readPermissions();
     $this->checkVisible();
     $category = new ilCalendarCategory((int) $_GET['category_id']);
     if (!in_array($category->getType(), array(ilCalendarCategory::TYPE_CH, ilCalendarCategory::TYPE_BOOK))) {
         include_once "./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php";
         $toolbar = new ilToolbarGui();
         $toolbar->addButton($this->lng->txt("cal_add_appointment"), $this->ctrl->getLinkTargetByClass("ilcalendarappointmentgui", "add"));
         if (!in_array($category->getType(), array(ilCalendarCategory::TYPE_CH, ilCalendarCategory::TYPE_BOOK))) {
             $toolbar->addButton($this->lng->txt("cal_import_appointments"), $this->ctrl->getLinkTarget($this, "importAppointments"));
         }
         $toolbar = $toolbar->getHTML();
     }
     // Non editable category
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     $info->setFormAction($this->ctrl->getFormAction($this));
     $info->addSection($this->lng->txt('cal_cal_details'));
     // Calendar Name
     $info->addProperty($this->lng->txt('cal_calendar_name'), $category->getTitle());
     switch ($category->getType()) {
         case ilCalendarCategory::TYPE_USR:
             $info->addProperty($this->lng->txt('cal_cal_type'), $this->lng->txt('cal_type_personal'));
             break;
         case ilCalendarCategory::TYPE_GLOBAL:
             $info->addProperty($this->lng->txt('cal_cal_type'), $this->lng->txt('cal_type_system'));
             break;
         case ilCalendarCategory::TYPE_OBJ:
             $info->addProperty($this->lng->txt('cal_cal_type'), $this->lng->txt('cal_type_' . $category->getObjType()));
             $info->addSection($this->lng->txt('additional_info'));
             $info->addProperty($this->lng->txt('perma_link'), $this->addReferenceLinks($category->getObjId()));
             break;
         case ilCalendarCategory::TYPE_CH:
         case ilCalendarCategory::TYPE_BOOK:
             // nothing to do
             break;
     }
     // Ical link
     $this->ctrl->setParameterByClass('ilcalendarsubscriptiongui', 'cal_id', (int) $_GET['category_id']);
     $info->addProperty($this->lng->txt('cal_ical_infoscreen'), '<img src="' . ilUtil::getImagePath('ical.png', 'Services/Calendar') . '" />', $this->ctrl->getLinkTargetByClass(array('ilcalendarpresentationgui', 'ilcalendarsubscriptiongui')));
     $tpl->setContent($toolbar . $info->getHTML() . $this->showAssignedAppointments());
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:54,代码来源:class.ilCalendarCategoryGUI.php

示例3: infoScreen

 /**
  * show information screen
  */
 function infoScreen()
 {
     global $ilAccess, $ilTabs, $ilUser, $ilToolbar;
     if (!$this->external_rater_360 && !$ilAccess->checkAccess("visible", "", $this->ref_id)) {
         $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"), $this->ilias->error_obj->MESSAGE);
     }
     $ilTabs->activateTab("info_short");
     include_once "./Modules/Survey/classes/class.ilSurveyExecutionGUI.php";
     $output_gui =& new ilSurveyExecutionGUI($this->object);
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     $info->enablePrivateNotes();
     // "active" survey?
     $canStart = $this->object->canStartSurvey(null, $this->external_rater_360);
     $showButtons = $canStart["result"];
     if (!$showButtons) {
         if ($canStart["edit_settings"] && $ilAccess->checkAccess("write", "", $this->ref_id)) {
             $canStart["messages"][] = "<a href=\"" . $this->ctrl->getLinkTarget($this, "properties") . "\">&raquo; " . $this->lng->txt("survey_edit_settings") . "</a>";
         }
         ilUtil::sendInfo(implode("<br />", $canStart["messages"]));
     }
     $big_button = false;
     if ($showButtons) {
         // closing survey?
         $is_appraisee = false;
         if ($this->object->get360Mode() && $this->object->isAppraisee($ilUser->getId())) {
             $info->addSection($this->lng->txt("survey_360_appraisee_info"));
             $appr_data = $this->object->getAppraiseesData();
             $appr_data = $appr_data[$ilUser->getId()];
             $info->addProperty($this->lng->txt("survey_360_raters_status_info"), $appr_data["finished"]);
             if (!$appr_data["closed"]) {
                 include_once "Services/UIComponent/Button/classes/class.ilLinkButton.php";
                 $button = ilLinkButton::getInstance();
                 $button->setCaption("survey_360_appraisee_close_action");
                 $button->setUrl($this->ctrl->getLinkTargetByClass("ilsurveyparticipantsgui", "confirmappraiseeclose"));
                 $close_button_360 = '<div>' . $button->render() . '</div>';
                 $txt = "survey_360_appraisee_close_action_info";
                 if ($this->object->get360SkillService()) {
                     $txt .= "_skill";
                 }
                 $info->addProperty($this->lng->txt("status"), $close_button_360 . $this->lng->txt($txt));
             } else {
                 ilDatePresentation::setUseRelativeDates(false);
                 $dt = new ilDateTime($appr_data["closed"], IL_CAL_UNIX);
                 $info->addProperty($this->lng->txt("status"), sprintf($this->lng->txt("survey_360_appraisee_close_action_status"), ilDatePresentation::formatDate($dt)));
             }
             $is_appraisee = true;
         }
         // handle code
         // validate incoming
         $code_input = false;
         $anonymous_code = $_POST["anonymous_id"];
         if ($anonymous_code) {
             $code_input = true;
             // if(!$this->object->isUnusedCode($anonymous_code, $ilUser->getId()))
             if (!$this->object->checkSurveyCode($anonymous_code)) {
                 $anonymous_code = null;
             } else {
                 // #15860
                 $this->object->bindSurveyCodeToUser($ilUser->getId(), $anonymous_code);
             }
         }
         if ($anonymous_code) {
             $_SESSION["anonymous_id"][$this->object->getId()] = $anonymous_code;
         } else {
             $anonymous_code = $_SESSION["anonymous_id"][$this->object->getId()];
             if ($anonymous_code) {
                 $code_input = true;
             }
         }
         // try to find code for current (registered) user from existing run
         if ($this->object->getAnonymize() && !$anonymous_code) {
             $anonymous_code = $this->object->findCodeForUser($ilUser->getId());
         }
         // get existing runs for current user, might generate code
         $participant_status = $this->object->getUserSurveyExecutionStatus($anonymous_code);
         if ($participant_status) {
             $anonymous_code = $participant_status["code"];
             $participant_status = $participant_status["runs"];
         }
         // (final) check for proper anonymous code
         if (!$this->object->isAccessibleWithoutCode() && !$is_appraisee && $code_input && (!$anonymous_code || !$this->object->isAnonymousKey($anonymous_code))) {
             $anonymous_code = null;
             ilUtil::sendInfo($this->lng->txt("wrong_survey_code_used"));
         }
         // :TODO: really save in session?
         $_SESSION["anonymous_id"][$this->object->getId()] = $anonymous_code;
         // code is mandatory and not given yet
         if (!$is_appraisee && !$anonymous_code && !$this->object->isAccessibleWithoutCode()) {
             $info->setFormAction($this->ctrl->getFormAction($this, "infoScreen"));
             $info->addSection($this->lng->txt("anonymization"));
             $info->addProperty("", $this->lng->txt("anonymize_anonymous_introduction"));
             $info->addPropertyTextinput($this->lng->txt("enter_anonymous_id"), "anonymous_id", "", 8, "infoScreen", $this->lng->txt("submit"), true);
         } else {
             // trunk/default
             if (!$this->object->get360Mode()) {
                 if ($anonymous_code) {
//.........这里部分代码省略.........
开发者ID:arlendotcn,项目名称:ilias,代码行数:101,代码来源:class.ilObjSurveyGUI.php

示例4: showUserObjectMatrix

 /**
  * Show object user matrix
  */
 function showUserObjectMatrix()
 {
     global $tpl;
     if ($this->isAnonymized()) {
         ilUtil::sendFailure($this->lng->txt('permission_denied'));
         return;
     }
     $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.lp_loo.html', 'Services/Tracking');
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     $info->setFormAction($this->ctrl->getFormAction($this));
     if ($this->__showObjectDetails($info, $this->details_obj_id)) {
         $this->tpl->setCurrentBlock("info");
         $this->tpl->setVariable("INFO_TABLE", $info->getHTML());
         $this->tpl->parseCurrentBlock();
     }
     include_once "./Services/Tracking/classes/repository_statistics/class.ilTrMatrixTableGUI.php";
     $table = new ilTrMatrixTableGUI($this, "showUserObjectMatrix", $this->getRefId());
     $this->tpl->setVariable('LP_OBJECTS', $table->getHTML());
     $this->tpl->setVariable('LEGEND', $this->__getLegendHTML());
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:24,代码来源:class.ilLPListOfObjectsGUI.php

示例5: infoScreen

 /**
  * show information screen
  */
 function infoScreen($session_lock = "")
 {
     /**
      * @var $ilAccess  ilAccessHandler
      * @var $ilUser    ilObjUser
      * @var $ilToolbar ilToolbarGUI
      */
     global $ilAccess, $ilUser, $ilToolbar;
     require_once 'Modules/Test/classes/class.ilTestDynamicQuestionSetFilterSelection.php';
     $testQuestionSetConfig = $this->testQuestionSetConfigFactory->getQuestionSetConfig();
     $testSession = $this->testSessionFactory->getSession();
     $testSequence = $this->testSequenceFactory->getSequenceByTestSession($testSession);
     $testSequence->loadFromDb();
     $testSequence->loadQuestions($testQuestionSetConfig, new ilTestDynamicQuestionSetFilterSelection());
     $testPlayerGUI = $this->testPlayerFactory->getPlayerGUI();
     if ($_GET['createRandomSolutions']) {
         $this->object->createRandomSolutions($_GET['createRandomSolutions']);
     }
     if (!$ilAccess->checkAccess("read", "", $this->ref_id)) {
         $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"), $this->ilias->error_obj->MESSAGE);
     }
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     $this->ctrl->setParameter($testPlayerGUI, "sequence", $testSession->getLastSequence());
     $info->setFormAction($this->ctrl->getFormAction($testPlayerGUI));
     if (strlen($session_lock)) {
         $info->addHiddenElement("lock", $session_lock);
     } else {
         $info->addHiddenElement("lock", md5($_COOKIE['PHPSESSID'] . time()));
     }
     $online_access = false;
     if ($this->object->getFixedParticipants()) {
         include_once "./Modules/Test/classes/class.ilObjTestAccess.php";
         $online_access_result = ilObjTestAccess::_lookupOnlineTestAccess($this->object->getId(), $ilUser->getId());
         if ($online_access_result === true) {
             $online_access = true;
         } else {
             ilUtil::sendInfo($online_access_result);
         }
     }
     $enter_anonymous_code = false;
     if ($this->object->isOnline() && $this->object->isComplete($this->testQuestionSetConfigFactory->getQuestionSetConfig())) {
         if ((!$this->object->getFixedParticipants() || $online_access) && $ilAccess->checkAccess("read", "", $this->ref_id)) {
             $executable = $this->object->isExecutable($testSession, $ilUser->getId(), $allowPassIncrease = TRUE);
             if ($executable["executable"]) {
                 if ($this->object->areObligationsEnabled() && $this->object->hasObligations($this->object->getTestId())) {
                     ilUtil::sendInfo($GLOBALS['lng']->txt('tst_test_contains_obligatory_questions'));
                 }
                 if ($testSession->getActiveId() > 0) {
                     // resume test
                     require_once 'Modules/Test/classes/class.ilTestPassesSelector.php';
                     $testPassesSelector = new ilTestPassesSelector($GLOBALS['ilDB'], $this->object);
                     $testPassesSelector->setActiveId($testSession->getActiveId());
                     $testPassesSelector->setLastFinishedPass($testSession->getLastFinishedPass());
                     $closedPasses = $testPassesSelector->getReportablePasses();
                     $existingPasses = $testPassesSelector->getExistingPasses();
                     if ($existingPasses > $closedPasses) {
                         $resumeTestLabel = $this->lng->txt("tst_resume_test");
                         $big_button[] = array('resumePlayer', $resumeTestLabel, true);
                     } else {
                         $resumeTestLabel = $this->object->getStartTestLabel($testSession->getActiveId());
                         $big_button[] = array('startPlayer', $resumeTestLabel, true);
                     }
                 } else {
                     // start new test
                     $big_button[] = array("startPlayer", $this->object->getStartTestLabel($testSession->getActiveId()), true);
                 }
             } else {
                 ilUtil::sendInfo($executable["errormessage"]);
             }
             if ($testSession->getActiveId() > 0) {
                 // test results button
                 require_once 'Modules/Test/classes/class.ilTestPassesSelector.php';
                 $testPassesSelector = new ilTestPassesSelector($GLOBALS['ilDB'], $this->object);
                 $testPassesSelector->setActiveId($testSession->getActiveId());
                 $testPassesSelector->setLastFinishedPass($testSession->getLastFinishedPass());
                 if ($this->object->canShowTestResults($testSession, $ilUser->getId()) && count($testPassesSelector->getReportablePasses())) {
                     //$info->addFormButton("outUserResultsOverview", $this->lng->txt("tst_show_results"));
                     $big_button[] = array(array('ilTestEvaluationGUI', 'outUserResultsOverview'), $this->lng->txt("tst_show_results"), false);
                     if ($this->object->getHighscoreEnabled()) {
                         // Can also compare results then
                         $big_button[] = array("outResultsToplist", $this->lng->txt("tst_show_toplist"), false);
                     }
                     if ($this->object->isSkillServiceToBeConsidered()) {
                         require_once 'Modules/Test/classes/class.ilTestSkillEvaluationGUI.php';
                         $big_button[] = array(array('ilTestSkillEvaluationGUI', ilTestSkillEvaluationGUI::CMD_SHOW), $this->lng->txt("tst_show_comp_results"), false);
                     }
                 }
             }
         }
         if ($testSession->getActiveId() > 0) {
             if ($this->object->canShowSolutionPrintview($ilUser->getId())) {
                 //$info->addFormButton("outUserListOfAnswerPasses", $this->lng->txt("tst_list_of_answers_show"));
                 $big_button[] = array("outUserListOfAnswerPasses", $this->lng->txt("tst_list_of_answers_show"), false);
             }
         }
         if ($this->isDeleteDynamicTestResultsButtonRequired($testSession, $testSequence)) {
//.........这里部分代码省略.........
开发者ID:bheyser,项目名称:qplskl,代码行数:101,代码来源:class.ilObjTestGUI.php

示例6: accessStatusInfo

 /**
  * Access- and Statusinformation Info
  * @return string HTML
  */
 function accessStatusInfo()
 {
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI(new stdClass());
     $info->setFormAction($this->ilCtrl->getFormAction($this));
     $info->addSection($this->lng->txt("info_access_and_status_info"));
     foreach ($this->getAccessStatusInfoData() as $data) {
         $info->addProperty($data[0], $data[1]);
     }
     return $info->getHTML();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:15,代码来源:class.ilObjectPermissionStatusGUI.php

示例7: showInfoScreen

 /**
  * show info screen
  *
  * @access protected
  * @return
  */
 protected function showInfoScreen()
 {
     global $tpl, $ilUser;
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     $info->setFormAction($this->ctrl->getFormAction($this));
     if ($this->app->isMilestone()) {
         $info->addSection($this->lng->txt('cal_ms_details'));
     } else {
         $info->addSection($this->lng->txt('cal_details'));
     }
     // Appointment
     $info->addProperty($this->lng->txt('appointment'), ilDatePresentation::formatPeriod($this->app->getStart(), $this->app->getEnd()));
     $info->addProperty($this->lng->txt('title'), $this->app->getPresentationTitle());
     // Description
     if (strlen($desc = $this->app->getDescription())) {
         $info->addProperty($this->lng->txt('description'), $desc);
     }
     // Location
     if (strlen($loc = $this->app->getLocation())) {
         $info->addProperty($this->lng->txt('cal_where'), $loc);
     }
     // completion
     if ($this->app->isMilestone() && $this->app->getCompletion() > 0) {
         $info->addProperty($this->lng->txt('cal_task_completion'), $this->app->getCompletion() . " %");
     }
     include_once './Services/Calendar/classes/class.ilCalendarCategoryAssignments.php';
     $cat_id = ilCalendarCategoryAssignments::_lookupCategory($this->app->getEntryId());
     $cat_info = ilCalendarCategories::_getInstance()->getCategoryInfo($cat_id);
     $type = ilObject::_lookupType($cat_info['obj_id']);
     if ($this->app->isMilestone() && $cat_info['type'] == ilCalendarCategory::TYPE_OBJ && ($type == "grp" || $type == "crs")) {
         // users responsible
         $users = $this->app->readResponsibleUsers();
         $delim = "";
         foreach ($users as $r) {
             $value .= $delim . $r["lastname"] . ", " . $r["firstname"] . " [" . $r["login"] . "]";
             $delim = "<br />";
         }
         if (count($users) > 0) {
             $info->addProperty($this->lng->txt('cal_responsible'), $value);
         }
     }
     $category = new ilCalendarCategory($cat_id);
     if ($category->getType() == ilCalendarCategory::TYPE_OBJ) {
         $info->addSection($this->lng->txt('additional_info'));
         $cat_info = ilCalendarCategories::_getInstance()->getCategoryInfo($cat_id);
         $refs = ilObject::_getAllReferences($cat_info['obj_id']);
         include_once './Services/Link/classes/class.ilLink.php';
         $href = ilLink::_getStaticLink(current($refs), ilObject::_lookupType($cat_info['obj_id']), true);
         $info->addProperty($this->lng->txt('perma_link'), '<a class="small" href="' . $href . '" target="_top">' . $href . '</a>');
     }
     $tpl->setContent($info->getHTML());
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:59,代码来源:class.ilCalendarAppointmentGUI.php

示例8: addInfoItems

 /**
  * Add info items
  * @param ilInfoScreenGUI $info 
  */
 public function addInfoItems($info)
 {
     global $ilCtrl, $ilUser;
     $access = true;
     if (ilViteroLockedUser::isLocked($ilUser->getId(), $this->object->getVGroupId())) {
         ilUtil::sendFailure(ilViteroPlugin::getInstance()->txt('user_locked_info'));
         $access = false;
     }
     $booking_id = ilViteroUtils::getOpenRoomBooking($this->object->getVGroupId());
     if ($booking_id and $access) {
         $this->ctrl->setParameter($this, 'bid', $booking_id);
         $info->setFormAction($ilCtrl->getFormAction($this), '_blank');
         $big_button = '<div class="il_ButtonGroup" style="margin:25px; text-align:center; font-size:25px;">' . '<input type="submit" class="submit" name="cmd[startSession]" value="' . ilViteroPlugin::getInstance()->txt('start_session') . '" style="padding:10px;" /></div>';
         $info->addSection("");
         $info->addProperty("", $big_button);
     }
     $start = new ilDateTime(time(), IL_CAL_UNIX);
     $end = clone $start;
     $end->increment(IL_CAL_YEAR, 1);
     $booking = ilViteroUtils::lookupNextBooking($start, $end, $this->object->getVGroupId());
     if (!$booking['start'] instanceof ilDateTime) {
         return true;
     }
     ilDatePresentation::setUseRelativeDates(false);
     $info->addSection(ilViteroPlugin::getInstance()->txt('info_next_appointment'));
     $info->addProperty(ilViteroPlugin::getInstance()->txt('info_next_appointment_dt'), ilDatePresentation::formatPeriod($booking['start'], $booking['end']));
 }
开发者ID:leifos-gmbh,项目名称:Vitero,代码行数:31,代码来源:class.ilObjViteroGUI.php

示例9: ilInfoScreenGUI

 function __showProgressList()
 {
     global $ilUser, $ilObjDataCache, $ilCtrl;
     $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.lp_list_progress.html', 'Services/Tracking');
     // User info
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     $info->setFormAction($ilCtrl->getFormAction($this));
     if ($this->__appendUserInfo($info, $this->tracked_user)) {
         $this->tpl->setCurrentBlock("info_user");
         $this->tpl->setVariable("USER_INFO", $info->getHTML());
         $this->tpl->parseCurrentBlock();
     }
     include_once "./Services/Tracking/classes/repository_statistics/class.ilLPProgressTableGUI.php";
     $lp_table = new ilLPProgressTableGUI($this, "", $this->tracked_user, null, false, null, false, null, null, $this->getMode());
     $this->tpl->setVariable("LP_OBJECTS", $lp_table->getHTML());
     $this->tpl->setVariable("LEGEND", $this->__getLegendHTML());
 }
开发者ID:JKN-INC,项目名称:SHELBY-ILIAS,代码行数:18,代码来源:class.ilLPListOfProgressGUI.php

示例10: showContent

 public function showContent()
 {
     /*
      * var $ilUser ilUser
      */
     global $ilUser, $tpl, $ilAccess;
     $this->pluginObj->includeClass('class.ilAdobeConnectUserUtil.php');
     $this->pluginObj->includeClass('class.ilAdobeConnectServer.php');
     $has_write_permission = $ilAccess->checkAccess("write", "", $this->object->getRefId());
     $settings = ilAdobeConnectServer::_getInstance();
     if ($settings->getAuthMode() == ilAdobeConnectServer::AUTH_MODE_SWITCHAAI and ilAdobeConnectServer::useSwitchaaiAuthMode($ilUser->getAuthMode(true))) {
         //Login User - this creates a user if he not exists.
         $ilAdobeConnectUser = new ilAdobeConnectUserUtil($this->user->getId());
         $ilAdobeConnectUser->loginUser();
         //Add the user as Participant @adobe switch
         $status = ilXAVCMembers::_lookupStatus($ilUser->getId(), $this->object->getRefId());
         $this->object->addSwitchParticipant($ilUser->getEmail(), $status);
     }
     $this->tabs->setTabActive('contents');
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     $info->removeFormAction();
     $this->pluginObj->includeClass('class.ilAdobeConnectQuota.php');
     $this->pluginObj->includeClass("class.ilObjAdobeConnectAccess.php");
     $is_member = ilObjAdobeConnectAccess::_hasMemberRole($ilUser->getId(), $this->object->getRefId());
     $is_admin = ilObjAdobeConnectAccess::_hasAdminRole($ilUser->getId(), $this->object->getRefId());
     //SWITCHAAI: If the user has no SWITCHaai-Account, we show the room link without connecting to the adobe-connect server. This is used for guest logins.
     $show_only_roomlink = false;
     if ($settings->getAuthMode() == ilAdobeConnectServer::AUTH_MODE_SWITCHAAI and !ilAdobeConnectServer::useSwitchaaiAuthMode($ilUser->getAuthMode(true))) {
         $show_only_roomlink = true;
         $presentation_url = $settings->getPresentationUrl();
         $button_txt = $this->pluginObj->txt('enter_vc');
         $button_target = $presentation_url . $this->object->getURL();
         $button_tpl = new ilTemplate($this->pluginObj->getDirectory() . "/templates/default/tpl.bigbutton.html", true, true);
         $button_tpl->setVariable('BUTTON_TARGET', $button_target);
         $button_tpl->setVariable('BUTTON_TEXT', $button_txt);
         $big_button = $button_tpl->get();
         $info->addSection('');
         $info->addProperty('', $big_button . "<br />");
     }
     if (($this->access->checkAccess("write", "", $this->object->getRefId()) || $is_member || $is_admin) && !$show_only_roomlink) {
         $presentation_url = $settings->getPresentationUrl();
         $form = new ilPropertyFormGUI();
         $form->setTitle($this->pluginObj->txt('access_meeting_title'));
         $this->object->doRead();
         if ($this->object->getStartDate() != NULL) {
             $ilAdobeConnectUser = new ilAdobeConnectUserUtil($this->user->getId());
             $ilAdobeConnectUser->ensureAccountExistance();
             $xavc_login = $ilAdobeConnectUser->getXAVCLogin();
             $quota = new ilAdobeConnectQuota();
             // show button
             if (($this->object->getPermanentRoom() == 1 || $this->doProvideAccessLink()) && $this->object->isParticipant($xavc_login)) {
                 if (!$quota->mayStartScheduledMeeting($this->object->getScoId())) {
                     $href = $this->txt("meeting_not_available_no_slots");
                     $button_disabled = true;
                 } else {
                     $href = '<a href="' . $this->ctrl->getLinkTarget($this, 'performSso') . '" target="_blank" >' . $presentation_url . $this->object->getURL() . '</a>';
                     $button_disabled = false;
                 }
             } else {
                 $href = $this->txt("meeting_not_available");
                 $button_disabled = true;
             }
             if ($button_disabled == true) {
                 $button_txt = $href;
             } else {
                 $button_txt = $this->pluginObj->txt('enter_vc');
             }
             $button_target = ILIAS_HTTP_PATH . "/" . $this->ctrl->getLinkTarget($this, 'performSso', '', false, false);
             $button_tpl = new ilTemplate($this->pluginObj->getDirectory() . "/templates/default/tpl.bigbutton.html", true, true);
             $button_tpl->setVariable('BUTTON_TARGET', $button_target);
             $button_tpl->setVariable('BUTTON_TEXT', $button_txt);
             $big_button = $button_tpl->get();
             $info->addSection('');
             if ($button_disabled == true) {
                 $info->addProperty('', $href);
             } else {
                 $info->addProperty('', $big_button . "<br />");
             }
             // show instructions
             if (strlen($this->object->getInstructions()) > 1) {
                 $info->addSection($this->lng->txt('exc_instruction'));
                 $info->addProperty('', nl2br($this->object->getInstructions()));
             }
             // show contact info
             if (strlen($this->object->getContactInfo()) > 1) {
                 $info->addSection($this->pluginObj->txt('contact_information'));
                 $info->addProperty('', nl2br($this->object->getContactInfo()));
             }
             //show contents
             if (ilXAVCPermissions::hasAccess($ilUser->getId(), $this->object->getRefId(), AdobeConnectPermissions::PERM_READ_CONTENTS) && $this->object->getReadContents('content')) {
                 $info->addSection($this->pluginObj->txt('file_uploads'));
                 $info->setFormAction($this->ctrl->getFormAction($this, 'showContent'));
                 $has_access = false;
                 if (ilXAVCPermissions::hasAccess($ilUser->getId(), $this->ref_id, AdobeConnectPermissions::PERM_UPLOAD_CONTENT) || $has_write_permission) {
                     $has_access = true;
                     $tpl_sub_button = new ilTemplate("Services/InfoScreen/templates/default/tpl.submitbuttons.html", true, true);
                     $tpl_sub_button->setVariable('BTN_NAME', $this->txt("add_new_content"));
                     $tpl_sub_button->setVariable('BTN_COMMAND', 'showAddContent');
                     $info->addProperty('', $tpl_sub_button->get());
//.........这里部分代码省略.........
开发者ID:KamuiXenom,项目名称:ILIAS_AdobeConnectPlugin,代码行数:101,代码来源:class.ilObjAdobeConnectGUI.php

示例11: infoScreen

 /**
  * show information screen
  */
 function infoScreen($session_lock = "")
 {
     global $ilAccess;
     global $ilUser;
     // Disabled
     if ($_GET['crs_show_result']) {
         $this->object->hideCorrectAnsweredQuestions();
     } else {
         if ($this->object->getTestSequence()->hasHiddenQuestions()) {
             $this->object->getTestSequence()->clearHiddenQuestions();
             $this->object->getTestSequence()->saveToDb();
         }
     }
     if ($_GET['createRandomSolutions']) {
         $this->object->createRandomSolutions($_GET['createRandomSolutions']);
     }
     if (!$ilAccess->checkAccess("visible", "", $this->ref_id)) {
         $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"), $this->ilias->error_obj->MESSAGE);
     }
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     $seq = $this->object->getTestSession()->getLastSequence();
     include_once "./Modules/Test/classes/class.ilTestOutputGUI.php";
     $output_gui =& new ilTestOutputGUI($this->object);
     $this->ctrl->setParameter($output_gui, "sequence", $seq);
     $info->setFormAction($this->ctrl->getFormAction($output_gui));
     if (strlen($session_lock)) {
         $info->addHiddenElement("lock", $session_lock);
     } else {
         $info->addHiddenElement("lock", md5($_COOKIE['PHPSESSID'] . time()));
     }
     $online_access = false;
     if ($this->object->getFixedParticipants()) {
         include_once "./Modules/Test/classes/class.ilObjTestAccess.php";
         $online_access_result = ilObjTestAccess::_lookupOnlineTestAccess($this->object->getId(), $ilUser->getId());
         if ($online_access_result === true) {
             $online_access = true;
         } else {
             ilUtil::sendInfo($online_access_result);
         }
     }
     if ($this->object->isOnline() && $this->object->isComplete()) {
         if ((!$this->object->getFixedParticipants() || $online_access) && $ilAccess->checkAccess("read", "", $this->ref_id)) {
             $executable = $this->object->isExecutable($ilUser->getId(), $allowPassIncrease = TRUE);
             if ($executable["executable"]) {
                 if ($this->object->areObligationsEnabled() && $this->object->hasObligations($this->object->getTestId())) {
                     ilUtil::sendInfo($GLOBALS['lng']->txt('tst_test_contains_obligatory_questions'));
                 }
                 if ($this->object->getTestSession()->getActiveId() > 0) {
                     // resume test
                     $resume_text = $this->lng->txt("tst_resume_test");
                     if ($seq < 1 || $seq == $this->object->getTestSequence()->getFirstSequence()) {
                         $resume_text = $this->object->getStartTestLabel($this->object->getTestSession()->getActiveId());
                     }
                     //$info->addFormButton("resume", $resume_text);
                     $big_button[] = array('resume', $resume_text);
                 } else {
                     // start new test
                     //$info->addFormButton("start", $this->object->getStartTestLabel($this->object->getTestSession()->getActiveId()));
                     $big_button[] = array("start", $this->object->getStartTestLabel($this->object->getTestSession()->getActiveId()));
                 }
             } else {
                 ilUtil::sendInfo($executable["errormessage"]);
             }
             if ($this->object->getTestSession()->getActiveId() > 0) {
                 // test results button
                 if ($this->object->canShowTestResults($ilUser->getId())) {
                     //$info->addFormButton("outUserResultsOverview", $this->lng->txt("tst_show_results"));
                     $big_button[] = array("outUserResultsOverview", $this->lng->txt("tst_show_results"));
                     if ($this->object->getHighscoreEnabled()) {
                         // Can also compare results then
                         $big_button[] = array("outResultsToplist", $this->lng->txt("tst_show_toplist"));
                     }
                 }
             }
         }
         if ($this->object->getTestSession()->getActiveId() > 0) {
             if ($this->object->canShowSolutionPrintview($ilUser->getId())) {
                 //$info->addFormButton("outUserListOfAnswerPasses", $this->lng->txt("tst_list_of_answers_show"));
                 $big_button[] = array("outUserListOfAnswerPasses", $this->lng->txt("tst_list_of_answers_show"));
             }
         }
     }
     if (!$this->object->isOnline()) {
         $message = $this->lng->txt("test_is_offline");
         if ($ilAccess->checkAccess("write", "", $this->ref_id)) {
             $message .= "<br /><a href=\"" . $this->ctrl->getLinkTarget($this, "properties") . "\">" . $this->lng->txt("test_edit_settings") . "</a>";
         }
         ilUtil::sendInfo($message);
     }
     if ($this->object->getShowInfo()) {
         $info->enablePrivateNotes();
     }
     /*
     		if (strlen($this->object->getIntroduction()))
     		{
     			$info->addSection($this->lng->txt("tst_introduction"));
//.........这里部分代码省略.........
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:101,代码来源:class.ilObjTestGUI.php

示例12: infoScreen

 /**
  * show information screen
  */
 function infoScreen()
 {
     global $ilAccess;
     global $ilUser;
     if (!$ilAccess->checkAccess("visible", "", $this->ref_id)) {
         $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"), $this->ilias->error_obj->MESSAGE);
     }
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     include_once "./Modules/Survey/classes/class.ilSurveyExecutionGUI.php";
     $output_gui =& new ilSurveyExecutionGUI($this->object);
     $info->setFormAction($this->ctrl->getFormAction($output_gui, "infoScreen"));
     $info->enablePrivateNotes();
     $anonymize_key = NULL;
     if ($this->object->getAnonymize() == 1) {
         if ($_SESSION["anonymous_id"][$this->object->getId()]) {
             $anonymize_key = $_SESSION["anonymous_id"][$this->object->getId()];
         } else {
             if ($_POST["anonymous_id"]) {
                 $anonymize_key = $_POST["anonymous_id"];
             }
         }
     }
     $canStart = $this->object->canStartSurvey($anonymize_key);
     $showButtons = $canStart["result"];
     if (!$showButtons) {
         if ($canStart["edit_settings"] && $ilAccess->checkAccess("write", "", $this->ref_id)) {
             $canStart["messages"][] = "<a href=\"" . $this->ctrl->getLinkTarget($this, "properties") . "\">&raquo; " . $this->lng->txt("survey_edit_settings") . "</a>";
         }
         ilUtil::sendInfo(implode("<br />", $canStart["messages"]));
     }
     $big_button = false;
     if ($showButtons) {
         // output of start/resume buttons for personalized surveys
         if (!$this->object->getAnonymize()) {
             $survey_started = $this->object->isSurveyStarted($ilUser->getId(), "");
             // Anonymous User tries to start a personalized survey
             if ($_SESSION["AccountId"] == ANONYMOUS_USER_ID) {
                 ilUtil::sendInfo($this->lng->txt("anonymous_with_personalized_survey"));
             } else {
                 if ($survey_started === 1) {
                     ilUtil::sendInfo($this->lng->txt("already_completed_survey"));
                 } elseif ($survey_started === 0) {
                     $big_button = array("resume", $this->lng->txt("resume_survey"));
                 } elseif ($survey_started === FALSE) {
                     $big_button = array("start", $this->lng->txt("start_survey"));
                 }
             }
         } else {
             if ($this->object->getAnonymize() && !$this->object->isAccessibleWithoutCode()) {
                 if (($_SESSION["AccountId"] == ANONYMOUS_USER_ID || $this->object->isAccessibleWithCodeForAll()) && strlen($_POST["anonymous_id"]) == 0 && strlen($_SESSION["anonymous_id"][$this->object->getId()]) == 0) {
                     $info->setFormAction($this->ctrl->getFormAction($this, "infoScreen"));
                     $info->addSection($this->lng->txt("anonymization"));
                     $info->addProperty("", $this->lng->txt("anonymize_anonymous_introduction"));
                     $info->addPropertyTextinput($this->lng->txt("enter_anonymous_id"), "anonymous_id", "", 8, "infoScreen", $this->lng->txt("submit"));
                 } else {
                     if (strlen($_POST["anonymous_id"]) > 0) {
                         if (!$this->object->checkSurveyCode($_POST["anonymous_id"])) {
                             ilUtil::sendInfo($this->lng->txt("wrong_survey_code_used"));
                         } else {
                             $anonymize_key = $_POST["anonymous_id"];
                         }
                     } else {
                         if (strlen($_SESSION["anonymous_id"][$this->object->getId()]) > 0) {
                             if (!$this->object->checkSurveyCode($_SESSION["anonymous_id"][$this->object->getId()])) {
                                 ilUtil::sendInfo($this->lng->txt("wrong_survey_code_used"));
                             } else {
                                 $anonymize_key = $_SESSION["anonymous_id"][$this->object->getId()];
                             }
                         } else {
                             // registered users do not need to know that there is an anonymous key. The data is anonymized automatically
                             $anonymize_key = $this->object->getUserAccessCode($ilUser->getId());
                             if (!strlen($anonymize_key)) {
                                 $anonymize_key = $this->object->createNewAccessCode();
                                 $this->object->saveUserAccessCode($ilUser->getId(), $anonymize_key);
                             }
                         }
                     }
                     $info->addHiddenElement("anonymous_id", $anonymize_key);
                     $survey_started = $this->object->isSurveyStarted($ilUser->getId(), $anonymize_key);
                     if ($survey_started === 1) {
                         ilUtil::sendInfo($this->lng->txt("already_completed_survey"));
                     } elseif ($survey_started === 0) {
                         $big_button = array("resume", $this->lng->txt("resume_survey"));
                     } elseif ($survey_started === FALSE) {
                         $big_button = array("start", $this->lng->txt("start_survey"));
                     }
                 }
             } else {
                 // free access
                 $survey_started = $this->object->isSurveyStarted($ilUser->getId(), "");
                 if ($survey_started === 1) {
                     ilUtil::sendInfo($this->lng->txt("already_completed_survey"));
                 } elseif ($survey_started === 0) {
                     $big_button = array("resume", $this->lng->txt("resume_survey"));
                 } elseif ($survey_started === FALSE) {
                     $big_button = array("start", $this->lng->txt("start_survey"));
//.........这里部分代码省略.........
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:101,代码来源:class.ilObjSurveyGUI.php

示例13: showContent

 public function showContent()
 {
     /*
      * var $ilUser ilUser
      */
     global $ilUser, $tpl, $ilCtrl, $ilAccess;
     $this->pluginObj->includeClass('class.ilAdobeConnectUserUtil.php');
     $this->pluginObj->includeClass('class.ilAdobeConnectServer.php');
     $has_write_permission = $ilAccess->checkAccess("write", "", $this->object->getRefId());
     $settings = ilAdobeConnectServer::_getInstance();
     $this->tabs->setTabActive('contents');
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     $info->removeFormAction();
     $this->pluginObj->includeClass('class.ilAdobeConnectQuota.php');
     $this->pluginObj->includeClass("class.ilObjAdobeConnectAccess.php");
     $is_member = ilObjAdobeConnectAccess::_hasMemberRole($ilUser->getId(), $this->object->getRefId());
     $is_admin = ilObjAdobeConnectAccess::_hasAdminRole($ilUser->getId(), $this->object->getRefId());
     if ($this->access->checkAccess("write", "", $this->object->getRefId()) || $is_member || $is_admin) {
         $presentation_url = $settings->getPresentationUrl();
         $form = new ilPropertyFormGUI();
         $form->setTitle($this->pluginObj->txt('access_meeting_title'));
         $this->object->doRead();
         if ($this->object->getStartDate() != NULL) {
             $ilAdobeConnectUser = new ilAdobeConnectUserUtil($this->user->getId());
             $ilAdobeConnectUser->ensureAccountExistance();
             $xavc_login = $ilAdobeConnectUser->getXAVCLogin();
             $quota = new ilAdobeConnectQuota();
             // show button
             if (($this->object->getPermanentRoom() == 1 || $this->doProvideAccessLink()) && $this->object->isParticipant($xavc_login)) {
                 $this->pluginObj->includeClass('class.ilAdobeConnectRoles.php');
                 $xavcRoles = new ilAdobeConnectRoles($this->object->getRefId());
                 if (!$quota->mayStartScheduledMeeting($this->object->getScoId())) {
                     $href = $this->txt("meeting_not_available_no_slots");
                     $button_disabled = true;
                 } else {
                     if (!$xavcRoles->isAdministrator($this->user->getId()) && count($current_pax = $this->object->getCurrentPax()) > $this->object->getMaxPax() && !in_array($this->object->getPrincipalId($xavc_login), $current_pax)) {
                         $href = $this->txt("meeting_full");
                         $button_disabled = true;
                     } else {
                         $href = '<a href="' . $this->ctrl->getLinkTarget($this, 'performSso') . '" target="_blank" >' . $presentation_url . $this->object->getURL() . '</a>';
                         $button_disabled = false;
                     }
                 }
             } else {
                 $href = $this->txt("meeting_not_available");
                 $button_disabled = true;
             }
             if ($button_disabled == true) {
                 $button_txt = $href;
             } else {
                 $button_txt = $this->pluginObj->txt('enter_vc');
             }
             $button_target = ILIAS_HTTP_PATH . "/" . $this->ctrl->getLinkTarget($this, 'performSso', '', false, false);
             $button_tpl = new ilTemplate($this->pluginObj->getDirectory() . "/templates/default/tpl.bigbutton.html", true, true);
             $button_tpl->setVariable('BUTTON_TARGET', $button_target);
             $button_tpl->setVariable('BUTTON_TEXT', $button_txt);
             $big_button = $button_tpl->get();
             $info->addSection('');
             if ($button_disabled == true) {
                 $info->addProperty('', $href);
             } else {
                 $info->addProperty('', $big_button . "<br />");
             }
             // show instructions
             if (strlen($this->object->getInstructions()) > 1) {
                 $info->addSection($this->lng->txt('exc_instruction'));
                 $info->addProperty('', nl2br($this->object->getInstructions()));
             }
             // show contact info
             if (strlen($this->object->getContactInfo()) > 1) {
                 $info->addSection($this->pluginObj->txt('contact_information'));
                 $info->addProperty('', nl2br($this->object->getContactInfo()));
             }
             //show contents
             if (ilXAVCPermissions::hasAccess($ilUser->getId(), $this->object->getRefId(), AdobeConnectPermissions::PERM_READ_CONTENTS) && $this->object->getReadContents('content') || ilXAVCPermissions::hasAccess($ilUser->getId(), $this->ref_id, AdobeConnectPermissions::PERM_UPLOAD_CONTENT) || $has_write_permission) {
                 $admins_only = '';
                 if (!$this->object->getReadContents('content')) {
                     $admins_only = $this->pluginObj->txt('admins_only');
                 }
                 $info->addSection($this->pluginObj->txt('file_uploads') . ' ' . $admins_only);
                 $info->setFormAction($this->ctrl->getFormAction($this, 'showContent'));
                 $has_access = false;
                 if (ilXAVCPermissions::hasAccess($ilUser->getId(), $this->ref_id, AdobeConnectPermissions::PERM_UPLOAD_CONTENT) || $has_write_permission) {
                     $has_access = true;
                     $tpl_sub_button = new ilTemplate("Services/InfoScreen/templates/default/tpl.submitbuttons.html", true, true);
                     $tpl_sub_button->setVariable('BTN_NAME', $this->txt("add_new_content"));
                     $tpl_sub_button->setVariable('BTN_COMMAND', 'showAddContent');
                     $info->addProperty('', $tpl_sub_button->get());
                 }
                 $info->addProperty('', $this->viewContents($has_access));
             }
             // show records
             if (ilXAVCPermissions::hasAccess($ilUser->getId(), $this->object->getRefId(), AdobeConnectPermissions::PERM_READ_RECORDS) && $this->object->getReadRecords() || ilXAVCPermissions::hasAccess($ilUser->getId(), $this->ref_id, AdobeConnectPermissions::PERM_EDIT_RECORDS) || $has_write_permission) {
                 $has_access = false;
                 $admins_only = '';
                 if (ilXAVCPermissions::hasAccess($ilUser->getId(), $this->ref_id, AdobeConnectPermissions::PERM_EDIT_RECORDS) || $has_write_permission) {
                     $has_access = true;
                     if (!$this->object->getReadRecords()) {
                         $admins_only = $this->pluginObj->txt('admins_only');
//.........这里部分代码省略.........
开发者ID:HochschuleLuzern,项目名称:ILIAS_AdobeConnectPlugin,代码行数:101,代码来源:class.ilObjAdobeConnectGUI.php


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