本文整理汇总了PHP中ilInfoScreenGUI::hideFurtherSections方法的典型用法代码示例。如果您正苦于以下问题:PHP ilInfoScreenGUI::hideFurtherSections方法的具体用法?PHP ilInfoScreenGUI::hideFurtherSections怎么用?PHP ilInfoScreenGUI::hideFurtherSections使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilInfoScreenGUI
的用法示例。
在下文中一共展示了ilInfoScreenGUI::hideFurtherSections方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: infoScreen
//.........这里部分代码省略.........
// registered user
// if an auto-code was generated, we still have to check for the original user id
if (!$appr_ids && $ilUser->getId() != ANONYMOUS_USER_ID) {
$appr_ids = $this->object->getAppraiseesToRate($ilUser->getId());
}
if (sizeof($appr_ids)) {
// map existing runs to appraisees
$active_appraisees = array();
if ($participant_status) {
foreach ($participant_status as $item) {
$active_appraisees[$item["appr_id"]] = $item["finished"];
}
}
$list = array();
foreach ($appr_ids as $appr_id) {
if ($this->object->isAppraiseeClosed($appr_id)) {
// closed
$list[$appr_id] = $this->lng->txt("survey_360_appraisee_is_closed");
} else {
if (array_key_exists($appr_id, $active_appraisees)) {
// already done
if ($active_appraisees[$appr_id]) {
$list[$appr_id] = $this->lng->txt("already_completed_survey");
} else {
$list[$appr_id] = array("resume", $this->lng->txt("resume_survey"));
}
} else {
// start
$list[$appr_id] = array("start", $this->lng->txt("start_survey"));
}
}
}
$info->addSection($this->lng->txt("survey_360_rate_other_appraisees"));
include_once "Services/User/classes/class.ilUserUtil.php";
foreach ($list as $appr_id => $item) {
$appr_name = ilUserUtil::getNamePresentation($appr_id, false, false, "", true);
if (!is_array($item)) {
$info->addProperty($appr_name, $item);
} else {
$this->ctrl->setParameter($output_gui, "appr_id", $appr_id);
$href = $this->ctrl->getLinkTarget($output_gui, $item[0]);
$this->ctrl->setParameter($output_gui, "appr_id", "");
include_once "Services/UIComponent/Button/classes/class.ilLinkButton.php";
$button = ilLinkButton::getInstance();
$button->setCaption($item[1], false);
$button->setUrl($href);
$big_button_360 = '<div>' . $button->render() . '</div>';
$info->addProperty($appr_name, $big_button_360);
}
}
} else {
if (!$is_appraisee) {
ilUtil::sendFailure($this->lng->txt("survey_360_no_appraisees"));
}
}
}
}
if ($this->object->get360Mode() && $this->object->get360SelfAppraisee() && !$this->object->isAppraisee($ilUser->getId()) && $ilUser->getId() != ANONYMOUS_USER_ID) {
$link = $this->ctrl->getLinkTargetByClass("ilsurveyparticipantsgui", "addSelfAppraisee");
$link = '<a href="' . $link . '">' . $this->lng->txt("survey_360_add_self_appraisee") . '</a>';
$info->addProperty(" ", $link);
}
}
if ($big_button) {
$ilToolbar->setFormAction($this->ctrl->getFormAction($output_gui, "infoScreen"));
include_once "Services/UIComponent/Button/classes/class.ilSubmitButton.php";
$button = ilSubmitButton::getInstance();
$button->setCaption($big_button[1], false);
$button->setCommand($big_button[0]);
$button->setPrimary(true);
$ilToolbar->addButtonInstance($button);
$ilToolbar->setCloseFormTag(false);
$info->setOpenFormTag(false);
}
/* #12016
else
{
$info->setFormAction($this->ctrl->getFormAction($output_gui, "infoScreen"));
}
*/
if (strlen($this->object->getIntroduction())) {
$introduction = $this->object->getIntroduction();
$info->addSection($this->lng->txt("introduction"));
$info->addProperty("", $this->object->prepareTextareaOutput($introduction) . "<br />" . $info->getHiddenToggleButton());
} else {
$info->addSection("");
$info->addProperty("", $info->getHiddenToggleButton());
}
$info->hideFurtherSections(false);
if (!$this->object->get360Mode()) {
$info->addSection($this->lng->txt("svy_general_properties"));
$info->addProperty($this->lng->txt("survey_results_anonymization"), !$this->object->hasAnonymizedResults() ? $this->lng->txt("survey_results_personalized_info") : $this->lng->txt("survey_results_anonymized_info"));
include_once "./Modules/Survey/classes/class.ilObjSurveyAccess.php";
if ($ilAccess->checkAccess("write", "", $this->ref_id) || ilObjSurveyAccess::_hasEvaluationAccess($this->object->getId(), $ilUser->getId())) {
$info->addProperty($this->lng->txt("evaluation_access"), $this->lng->txt("evaluation_access_info"));
}
}
$info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
$this->ctrl->forwardCommand($info);
}
示例2: infoScreen
//.........这里部分代码省略.........
$ilToolbar->setCloseFormTag(false);
$info->setOpenFormTag(false);
}
if (strlen($this->object->getIntroduction())) {
$info->addSection($this->lng->txt("tst_introduction"));
$info->addProperty("", $this->object->prepareTextareaOutput($this->object->getIntroduction(), true) . $info->getHiddenToggleButton());
} else {
$info->addSection("");
$info->addProperty("", $info->getHiddenToggleButton());
}
$info->addSection($this->lng->txt("tst_general_properties"));
if ($this->object->getShowInfo()) {
$info->addProperty($this->lng->txt("author"), $this->object->getAuthor());
$info->addProperty($this->lng->txt("title"), $this->object->getTitle());
}
if ($this->object->isOnline() && $this->object->isComplete($this->testQuestionSetConfigFactory->getQuestionSetConfig())) {
if ((!$this->object->getFixedParticipants() || $online_access) && $ilAccess->checkAccess("read", "", $this->ref_id)) {
if ($this->object->getShowInfo() || !$this->object->getForceJS()) {
// use javascript
$checked_javascript = false;
if ($this->object->getJavaScriptOutput()) {
$checked_javascript = true;
}
}
// hide previous results
if (!$this->object->isRandomTest() && !$this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()) {
if ($this->object->getNrOfTries() != 1) {
if ($this->object->getUsePreviousAnswers() == 0) {
if ($this->object->getShowInfo()) {
$info->addProperty($this->lng->txt("tst_use_previous_answers"), $this->lng->txt("tst_dont_use_previous_answers"));
}
} else {
$use_previous_answers = FALSE;
if ($ilUser->prefs["tst_use_previous_answers"]) {
$checked_previous_answers = TRUE;
}
$info->addPropertyCheckbox($this->lng->txt("tst_use_previous_answers"), "chb_use_previous_answers", 1, $this->lng->txt("tst_use_previous_answers_user"), $checked_previous_answers);
}
}
}
}
}
$info->hideFurtherSections(false);
if ($this->object->getShowInfo()) {
$info->addSection($this->lng->txt("tst_sequence_properties"));
$info->addProperty($this->lng->txt("tst_sequence"), $this->lng->txt($this->object->getSequenceSettings() == TEST_FIXED_SEQUENCE ? "tst_sequence_fixed" : "tst_sequence_postpone"));
$info->addSection($this->lng->txt("tst_heading_scoring"));
$info->addProperty($this->lng->txt("tst_text_count_system"), $this->lng->txt($this->object->getCountSystem() == COUNT_PARTIAL_SOLUTIONS ? "tst_count_partial_solutions" : "tst_count_correct_solutions"));
$info->addProperty($this->lng->txt("tst_score_mcmr_questions"), $this->lng->txt($this->object->getMCScoring() == SCORE_ZERO_POINTS_WHEN_UNANSWERED ? "tst_score_mcmr_zero_points_when_unanswered" : "tst_score_mcmr_use_scoring_system"));
if ($this->object->isRandomTest()) {
$info->addProperty($this->lng->txt("tst_pass_scoring"), $this->lng->txt($this->object->getPassScoring() == SCORE_BEST_PASS ? "tst_pass_best_pass" : "tst_pass_last_pass"));
}
$info->addSection($this->lng->txt("tst_score_reporting"));
$score_reporting_text = "";
switch ($this->object->getScoreReporting()) {
case REPORT_AFTER_TEST:
$score_reporting_text = $this->lng->txt("tst_report_after_test");
break;
case REPORT_ALWAYS:
$score_reporting_text = $this->lng->txt("tst_report_after_first_question");
break;
case REPORT_AFTER_DATE:
$score_reporting_text = $this->lng->txt("tst_report_after_date");
break;
case 4:
$score_reporting_text = $this->lng->txt("tst_report_never");
break;
}
$info->addProperty($this->lng->txt("tst_score_reporting"), $score_reporting_text);
$reporting_date = $this->object->getReportingDate();
if ($reporting_date) {
#preg_match("/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/", $reporting_date, $matches);
#$txt_reporting_date = date($this->lng->text["lang_dateformat"] . " " . $this->lng->text["lang_timeformat"], mktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]));
#$info->addProperty($this->lng->txt("tst_score_reporting_date"), $txt_reporting_date);
$info->addProperty($this->lng->txt('tst_score_reporting_date'), ilDatePresentation::formatDate(new ilDateTime($reporting_date, IL_CAL_TIMESTAMP)));
}
$info->addSection($this->lng->txt("tst_session_settings"));
$info->addProperty($this->lng->txt("tst_nr_of_tries"), $this->object->getNrOfTries() == 0 ? $this->lng->txt("unlimited") : $this->object->getNrOfTries());
if ($this->object->getNrOfTries() != 1) {
$info->addProperty($this->lng->txt("tst_nr_of_tries_of_user"), $testSession->getPass() == false ? $this->lng->txt("tst_no_tries") : $testSession->getPass());
}
if ($this->object->getEnableProcessingTime()) {
$info->addProperty($this->lng->txt("tst_processing_time"), $this->object->getProcessingTime());
}
if (strlen($this->object->getAllowedUsers()) && $this->object->getAllowedUsersTimeGap()) {
$info->addProperty($this->lng->txt("tst_allowed_users"), $this->object->getAllowedUsers());
}
$starting_time = $this->object->getStartingTime();
if ($starting_time) {
$info->addProperty($this->lng->txt("tst_starting_time"), ilDatePresentation::formatDate(new ilDateTime($starting_time, IL_CAL_TIMESTAMP)));
}
$ending_time = $this->object->getEndingTime();
if ($ending_time) {
$info->addProperty($this->lng->txt("tst_ending_time"), ilDatePresentation::formatDate(new ilDateTime($ending_time, IL_CAL_TIMESTAMP)));
}
$info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
// forward the command
}
$this->ctrl->forwardCommand($info);
}
示例3: showContent
//.........这里部分代码省略.........
$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());
}
$info->addProperty('', $this->viewContents($has_access));
}
// show records
if (ilXAVCPermissions::hasAccess($ilUser->getId(), $this->object->getRefId(), AdobeConnectPermissions::PERM_READ_RECORDS) && $this->object->getReadRecords()) {
$has_access = false;
if (ilXAVCPermissions::hasAccess($ilUser->getId(), $this->ref_id, AdobeConnectPermissions::PERM_EDIT_RECORDS) || $has_write_permission) {
$has_access = true;
}
$info->addSection($this->pluginObj->txt('records'));
$info->addProperty('', $this->viewRecords($has_access, 'record'));
}
} else {
ilUtil::sendFailure($this->txt('error_connect_ac_server'));
}
}
$info->hideFurtherSections();
$tpl->setContent($info->getHTML() . $this->getPerformTriggerHtml());
$tpl->setPermanentLink('xavc', $this->object->getRefId());
$tpl->addILIASFooter();
}
示例4: infoScreen
//.........这里部分代码省略.........
if ($this->object->getShowInfo()) {
$info->addProperty($this->lng->txt("author"), $this->object->getAuthor());
$info->addProperty($this->lng->txt("title"), $this->object->getTitle());
}
if ($this->object->isOnline() && $this->object->isComplete()) {
if ((!$this->object->getFixedParticipants() || $online_access) && $ilAccess->checkAccess("read", "", $this->ref_id)) {
if ($this->object->getShowInfo() || !$this->object->getForceJS()) {
// use javascript
$checked_javascript = false;
if ($this->object->getJavaScriptOutput()) {
$checked_javascript = true;
}
if ($this->object->getForceJS()) {
$info->addProperty($this->lng->txt("tst_test_output"), $this->lng->txt("tst_use_javascript"));
} else {
$info->addPropertyCheckbox($this->lng->txt("tst_test_output"), "chb_javascript", 1, $this->lng->txt("tst_use_javascript"), $checked_javascript);
}
}
// hide previous results
if (!$this->object->isRandomTest()) {
if ($this->object->getNrOfTries() != 1) {
if ($this->object->getUsePreviousAnswers() == 0) {
if ($this->object->getShowInfo()) {
$info->addProperty($this->lng->txt("tst_use_previous_answers"), $this->lng->txt("tst_dont_use_previous_answers"));
}
} else {
$use_previous_answers = FALSE;
if ($ilUser->prefs["tst_use_previous_answers"]) {
$checked_previous_answers = TRUE;
}
$info->addPropertyCheckbox($this->lng->txt("tst_use_previous_answers"), "chb_use_previous_answers", 1, $this->lng->txt("tst_use_previous_answers_user"), $checked_previous_answers);
}
}
}
if ($_SESSION["AccountId"] == ANONYMOUS_USER_ID) {
$info->addPropertyTextinput($this->lng->txt("enter_anonymous_code"), "anonymous_id", "", 8, "setAnonymousId", $this->lng->txt("submit"));
}
}
}
$info->hideFurtherSections(false);
if ($this->object->getShowInfo()) {
$info->addSection($this->lng->txt("tst_sequence_properties"));
$info->addProperty($this->lng->txt("tst_sequence"), $this->lng->txt($this->object->getSequenceSettings() == TEST_FIXED_SEQUENCE ? "tst_sequence_fixed" : "tst_sequence_postpone"));
$info->addSection($this->lng->txt("tst_heading_scoring"));
$info->addProperty($this->lng->txt("tst_text_count_system"), $this->lng->txt($this->object->getCountSystem() == COUNT_PARTIAL_SOLUTIONS ? "tst_count_partial_solutions" : "tst_count_correct_solutions"));
$info->addProperty($this->lng->txt("tst_score_mcmr_questions"), $this->lng->txt($this->object->getMCScoring() == SCORE_ZERO_POINTS_WHEN_UNANSWERED ? "tst_score_mcmr_zero_points_when_unanswered" : "tst_score_mcmr_use_scoring_system"));
if ($this->object->isRandomTest()) {
$info->addProperty($this->lng->txt("tst_pass_scoring"), $this->lng->txt($this->object->getPassScoring() == SCORE_BEST_PASS ? "tst_pass_best_pass" : "tst_pass_last_pass"));
}
$info->addSection($this->lng->txt("tst_score_reporting"));
$score_reporting_text = "";
switch ($this->object->getScoreReporting()) {
case REPORT_AFTER_TEST:
$score_reporting_text = $this->lng->txt("tst_report_after_test");
break;
case REPORT_ALWAYS:
$score_reporting_text = $this->lng->txt("tst_report_after_first_question");
break;
case REPORT_AFTER_DATE:
$score_reporting_text = $this->lng->txt("tst_report_after_date");
break;
case 4:
$score_reporting_text = $this->lng->txt("tst_report_never");
break;
}
$info->addProperty($this->lng->txt("tst_score_reporting"), $score_reporting_text);
$reporting_date = $this->object->getReportingDate();
if ($reporting_date) {
#preg_match("/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/", $reporting_date, $matches);
#$txt_reporting_date = date($this->lng->text["lang_dateformat"] . " " . $this->lng->text["lang_timeformat"], mktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]));
#$info->addProperty($this->lng->txt("tst_score_reporting_date"), $txt_reporting_date);
$info->addProperty($this->lng->txt('tst_score_reporting_date'), ilDatePresentation::formatDate(new ilDateTime($reporting_date, IL_CAL_TIMESTAMP)));
}
$info->addSection($this->lng->txt("tst_session_settings"));
$info->addProperty($this->lng->txt("tst_nr_of_tries"), $this->object->getNrOfTries() == 0 ? $this->lng->txt("unlimited") : $this->object->getNrOfTries());
if ($this->object->getNrOfTries() != 1) {
$info->addProperty($this->lng->txt("tst_nr_of_tries_of_user"), $this->object->getTestSession()->getPass() == false ? $this->lng->txt("tst_no_tries") : $this->object->getTestSession()->getPass());
}
if ($this->object->getEnableProcessingTime()) {
$info->addProperty($this->lng->txt("tst_processing_time"), $this->object->getProcessingTime());
}
if (strlen($this->object->getAllowedUsers()) && $this->object->getAllowedUsersTimeGap()) {
$info->addProperty($this->lng->txt("tst_allowed_users"), $this->object->getAllowedUsers());
}
$starting_time = $this->object->getStartingTime();
if ($starting_time) {
$info->addProperty($this->lng->txt("tst_starting_time"), ilDatePresentation::formatDate(new ilDateTime($starting_time, IL_CAL_TIMESTAMP)));
}
$ending_time = $this->object->getEndingTime();
if ($ending_time) {
$info->addProperty($this->lng->txt("tst_ending_time"), ilDatePresentation::formatDate(new ilDateTime($ending_time, IL_CAL_TIMESTAMP)));
}
$info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
// forward the command
if ($_GET['crs_show_result'] and !$this->object->getTestSequence()->getFirstSequence()) {
#ilUtil::sendInfo($this->lng->txt('crs_all_questions_answered_successfully'));
}
}
$this->ctrl->forwardCommand($info);
}
示例5: infoScreen
//.........这里部分代码省略.........
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"));
}
}
}
}
if ($big_button) {
$big_button = '<div class="il_ButtonGroup il_BigButton">' . '<input type="submit" class="submit il_BigButton" name="cmd[' . $big_button[0] . ']" value="' . $big_button[1] . '" /></div>';
}
if (strlen($this->object->getIntroduction())) {
$introduction = $this->object->getIntroduction();
$info->addSection($this->lng->txt("introduction"));
$info->addProperty("", $this->object->prepareTextareaOutput($introduction) . $big_button . "<br />" . $info->getHiddenToggleButton());
} else {
$info->addSection("");
$info->addProperty("", $big_button . $info->getHiddenToggleButton());
}
$info->hideFurtherSections(false);
$info->addSection($this->lng->txt("svy_general_properties"));
if (strlen($this->object->getAuthor())) {
$info->addProperty($this->lng->txt("author"), $this->object->getAuthor());
}
$info->addProperty($this->lng->txt("title"), $this->object->getTitle());
switch ($this->object->getAnonymize()) {
case ANONYMIZE_OFF:
$info->addProperty($this->lng->txt("anonymization"), $this->lng->txt("anonymize_personalized"));
break;
case ANONYMIZE_ON:
if ($_SESSION["AccountId"] == ANONYMOUS_USER_ID) {
$info->addProperty($this->lng->txt("anonymization"), $this->lng->txt("info_anonymize_with_code"));
} else {
$info->addProperty($this->lng->txt("anonymization"), $this->lng->txt("info_anonymize_registered_user"));
}
break;
case ANONYMIZE_FREEACCESS:
$info->addProperty($this->lng->txt("anonymization"), $this->lng->txt("info_anonymize_without_code"));
break;
}
include_once "./Modules/Survey/classes/class.ilObjSurveyAccess.php";
if ($ilAccess->checkAccess("write", "", $this->ref_id) || ilObjSurveyAccess::_hasEvaluationAccess($this->object->getId(), $ilUser->getId())) {
$info->addProperty($this->lng->txt("evaluation_access"), $this->lng->txt("evaluation_access_info"));
}
$info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
$this->ctrl->forwardCommand($info);
}
示例6: showContent
//.........这里部分代码省略.........
$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');
}
}
$info->addSection($this->pluginObj->txt('records') . ' ' . $admins_only);
$info->addProperty('', $this->viewRecords($has_access, 'record'));
}
} else {
ilUtil::sendFailure($this->txt('error_connect_ac_server'));
}
}
$info->hideFurtherSections('', true);
$tpl->setContent($info->getHTML() . $this->getPerformTriggerHtml());
$tpl->setPermanentLink('xavc', $this->object->getRefId());
$tpl->addILIASFooter();
}