本文整理汇总了PHP中ilInfoScreenGUI::setOpenFormTag方法的典型用法代码示例。如果您正苦于以下问题:PHP ilInfoScreenGUI::setOpenFormTag方法的具体用法?PHP ilInfoScreenGUI::setOpenFormTag怎么用?PHP ilInfoScreenGUI::setOpenFormTag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilInfoScreenGUI
的用法示例。
在下文中一共展示了ilInfoScreenGUI::setOpenFormTag方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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
//.........这里部分代码省略.........
$testQuestionSetConfig = $this->testQuestionSetConfigFactory->getQuestionSetConfig();
if ($testQuestionSetConfig->areDepenciesBroken()) {
ilUtil::sendFailure($testQuestionSetConfig->getDepenciesBrokenMessage($this->lng));
$big_button = array();
$enter_anonymous_code = false;
} elseif ($testQuestionSetConfig->areDepenciesInVulnerableState()) {
ilUtil::sendInfo($testQuestionSetConfig->getDepenciesInVulnerableStateMessage($this->lng));
}
}
if ($this->object->getShowInfo()) {
$info->enablePrivateNotes();
}
if ($big_button || $enter_anonymous_code) {
$ilToolbar->setFormAction($this->ctrl->getFormAction($testPlayerGUI));
foreach ($big_button as $button) {
if (is_array($button[0])) {
$link = $this->ctrl->getLinkTargetByClass($button[0][0], $button[0][1]);
$ilToolbar->addButton($button[1], $link, '', '', '', '', $button[2] ? 'submit emphSubmit' : 'submit');
} else {
$ilToolbar->addFormButton($button[1], $button[0], "", $button[2]);
}
}
if ($enter_anonymous_code) {
if ($big_button) {
$ilToolbar->addSeparator();
}
require_once 'Services/Form/classes/class.ilTextInputGUI.php';
$anonymous_id = new ilTextInputGUI($this->lng->txt('enter_anonymous_code'), 'anonymous_id');
$anonymous_id->setSize(8);
$ilToolbar->addInputItem($anonymous_id, true);
$ilToolbar->addFormButton($this->lng->txt('submit'), 'setAnonymousId');
}
$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"]) {