本文整理汇总了PHP中ilInfoScreenGUI类的典型用法代码示例。如果您正苦于以下问题:PHP ilInfoScreenGUI类的具体用法?PHP ilInfoScreenGUI怎么用?PHP ilInfoScreenGUI使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ilInfoScreenGUI类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: executeDefault
/**
* Prepares and displays the info screen.
*
* @global ilAccessHandler $ilAccess
* @global ilCtrl2 $ilCtrl
* @global ilLanguage $lng
* @param string $method
*/
public function executeDefault($method)
{
global $ilAccess, $ilCtrl, $lng;
include_once 'Modules/Chatroom/classes/class.ilChatroom.php';
if (!ilChatroom::checkUserPermissions('read', $this->gui->ref_id)) {
$ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", ROOT_FOLDER_ID);
$ilCtrl->redirectByClass("ilrepositorygui", "");
}
$this->gui->switchToVisibleMode();
if (!$ilAccess->checkAccess("visible", "", $this->gui->ref_id)) {
$this->gui->ilias->raiseError($lng->txt("msg_no_perm_read"), $this->ilias->error_obj->MESSAGE);
}
$info = new ilInfoScreenGUI($this->gui);
$info->enablePrivateNotes();
if ($ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
$info->enableNews();
}
$info->addMetaDataSections($this->gui->object->getId(), 0, $this->gui->object->getType());
if (!$method) {
$ilCtrl->setCmd('showSummary');
} else {
$ilCtrl->setCmd($method);
}
$ilCtrl->forwardCommand($info);
}
示例2: getInfoScreen
/**
* show information screen
*/
public function getInfoScreen(ilObjCloudGUI $gui_class)
{
include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
$this->info = new ilInfoScreenGUI($gui_class);
$this->info->enablePrivateNotes();
$this->info->addMetaDataSections($gui_class->object->getId(), 0, $gui_class->object->getType());
$this->getPluginInfo();
return $this->info;
}
示例3: 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());
}
示例4: 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());
}
示例5: infoScreenForward
/**
* show information screen
*/
function infoScreenForward()
{
global $ilTabs, $ilErr;
$ilTabs->activateTab("id_info");
if (!$this->checkPermissionBool("visible")) {
$ilErr->raiseError($this->lng->txt("msg_no_perm_read"));
}
include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
$info = new ilInfoScreenGUI($this);
$info->enablePrivateNotes();
if ($this->checkPermissionBool("read")) {
$info->enableNews();
}
// no news editing for files, just notifications
$info->enableNewsEditing(false);
if ($this->checkPermissionBool("write")) {
$news_set = new ilSetting("news");
$enable_internal_rss = $news_set->get("enable_rss_for_internal");
if ($enable_internal_rss) {
$info->setBlockProperty("news", "settings", true);
$info->setBlockProperty("news", "public_notifications_option", true);
}
}
// standard meta data
$info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
if ($this->id_type == self::WORKSPACE_NODE_ID) {
$info->addProperty($this->lng->txt("perma_link"), $this->getPermanentLinkWidget());
}
$this->ctrl->forwardCommand($info);
}
示例6: infoScreenForward
/**
* show information screen
*/
public function infoScreenForward()
{
global $ilTabs, $ilErr;
$ilTabs->activateTab("id_info");
if (!$this->checkPermissionBool("visible")) {
$ilErr->raiseError($this->lng->txt("msg_no_perm_read"));
}
include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
$info = new ilInfoScreenGUI($this);
$info->enablePrivateNotes();
$info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
$this->ctrl->forwardCommand($info);
}
示例7: infoScreenForward
/**
* show information screen
*/
function infoScreenForward()
{
global $ilErr, $ilAccess;
if (!$ilAccess->checkAccess("visible", "", $this->ref_id)) {
$ilErr->raiseError($this->lng->txt("msg_no_perm_read"));
}
include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
$info = new ilInfoScreenGUI($this);
$info->enablePrivateNotes();
// standard meta data
$info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
$this->ctrl->forwardCommand($info);
}
示例8: outputInfoScreen
/**
* info screen
*/
function outputInfoScreen()
{
global $ilBench, $ilAccess, $ilTabs;
$this->setTabs();
$ilTabs->activateTab("info");
$this->lng->loadLanguageModule("meta");
include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
$info = new ilInfoScreenGUI($this->glossary_gui);
$info->enablePrivateNotes();
//$info->enableLearningProgress();
$info->enableNews();
if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
$info->enableNewsEditing();
$news_set = new ilSetting("news");
$enable_internal_rss = $news_set->get("enable_rss_for_internal");
if ($enable_internal_rss) {
$info->setBlockProperty("news", "settings", true);
}
}
// add read / back button
if ($ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
/*
if ($_GET["obj_id"] > 0)
{
$this->ctrl->setParameter($this, "obj_id", $_GET["obj_id"]);
$info->addButton($this->lng->txt("back"),
$this->ctrl->getLinkTarget($this, "layout"));
}
else
{
$info->addButton($this->lng->txt("view"),
$this->ctrl->getLinkTarget($this, "layout"));
}*/
}
// show standard meta data section
$info->addMetaDataSections($this->glossary->getId(), 0, $this->glossary->getType());
include_once "./Modules/Glossary/classes/class.ilObjGlossaryGUI.php";
ilObjGlossaryGUI::addUsagesToInfo($info, $this->glossary->getId());
if ($this->offlineMode()) {
$this->tpl->setContent($info->getHTML());
return $this->tpl->get();
} else {
// forward the command
$this->ctrl->forwardCommand($info);
}
}
示例9: infoScreen
/**
* show information screen
*/
function infoScreen()
{
global $ilAccess, $ilUser, $ilTabs, $lng, $tpl;
$ilTabs->activateTab("info");
include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
$info = new ilInfoScreenGUI($this);
$tpl->setDescription($this->object->getDescription());
$info->enablePrivateNotes();
$info->enableNews();
if ($ilAccess->checkAccess("read", "", $this->object->getRefId())) {
$info->enableNewsEditing();
$info->setBlockProperty("news", "settings", true);
}
// standard meta data
//$info->addMetaDataSections($this->object->getId(),0, $this->object->getType());
// instructions
$info->addSection($this->lng->txt("rep_robj_xeph_overview"));
include_once "./Customizing/global/plugins/Services/Repository/RepositoryObject/Ephorus/classes/class.ilEphAssignment.php";
$ass = ilEphAssignment::getAssignmentDataOfEphorus($this->object->getId());
$cnt = 0;
$mcnt = 0;
foreach ($ass as $a) {
$cnt++;
if ($a["mandatory"]) {
$mcnt++;
}
}
$info->addProperty($lng->txt("rep_robj_xeph_assignments"), $cnt);
$info->addProperty($lng->txt("rep_robj_xeph_mandatory"), $mcnt);
if ($this->object->getPassMode() != "nr") {
$info->addProperty($lng->txt("rep_robj_xeph_pass_mode"), $lng->txt("rep_robj_xeph_msg_all_mandatory_ass"));
} else {
$info->addProperty($lng->txt("rep_robj_xeph_pass_mode"), sprintf($lng->txt("rep_robj_xeph_msg_min_number_ass"), $this->object->getPassNr()));
}
// feedback from tutor
include_once "Services/Tracking/classes/class.ilLPMarks.php";
if ($ilAccess->checkAccess("read", "", $this->object->getRefId())) {
$lpcomment = ilLPMarks::_lookupComment($ilUser->getId(), $this->object->getId());
$mark = ilLPMarks::_lookupMark($ilUser->getId(), $this->object->getId());
//$status = ilEphorusMembers::_lookupStatus($this->object->getId(), $ilUser->getId());
$st = $this->object->determineStatusOfUser($ilUser->getId());
$status = $st["overall_status"];
if ($lpcomment != "" || $mark != "" || $status != "notgraded") {
$info->addSection($this->lng->txt("rep_robj_xeph_feedback_from_tutor"));
if ($lpcomment != "") {
$info->addProperty($this->lng->txt("rep_robj_xeph_comment"), $lpcomment);
}
if ($mark != "") {
$info->addProperty($this->lng->txt("rep_robj_xeph_mark"), $mark);
}
//if ($status == "")
//{
// $info->addProperty($this->lng->txt("status"),
// $this->lng->txt("message_no_delivered_files"));
//}
//else
if ($status != "notgraded") {
$img = '<img border="0" src="' . ilUtil::getImagePath("scorm/" . $status . ".png") . '" ' . ' alt="' . $lng->txt("rep_robj_xeph_" . $status) . '" title="' . $lng->txt("rep_robj_xeph_" . $status) . '" style="vertical-align:middle;"/>';
$add = "";
if ($st["failed_a_mandatory"]) {
$add = " (" . $lng->txt("rep_robj_xeph_msg_failed_mandatory") . ")";
} else {
if ($status == "failed") {
$add = " (" . $lng->txt("rep_robj_xeph_msg_missed_minimum_number") . ")";
}
}
$info->addProperty($this->lng->txt("status"), $img . " " . $this->lng->txt("rep_robj_xeph_" . $status) . $add);
}
}
}
// forward the command
$this->ctrl->forwardCommand($info);
}
示例10: infoScreenForward
/**
* show information screen
*/
function infoScreenForward()
{
global $ilTabs;
$this->checkPermission('visible');
$ilTabs->activateTab('id_info');
include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
$info = new ilInfoScreenGUI($this);
$info->enablePrivateNotes();
// standard meta data
$info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
if ($this->id_type == self::WORKSPACE_NODE_ID) {
$info->addProperty($this->lng->txt("perma_link"), $this->getPermanentLinkWidget());
}
// forward the command
$this->ctrl->forwardCommand($info);
}
示例11: 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']));
}
示例12: __showProgressList
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());
}
示例13: infoScreenForward
/**
* show information screen
*/
public function infoScreenForward()
{
global $ilTabs, $ilErr, $lng;
if (!$this->checkPermissionBool("visible")) {
ilUtil::sendFailure($lng->txt("msg_no_perm_read"), true);
$this->ctrl->redirectByClass('ilPersonalDesktopGUI', '');
}
$ilTabs->activateTab("id_info");
include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
$info = new ilInfoScreenGUI($this);
$info->enablePrivateNotes();
$info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
$this->ctrl->forwardCommand($info);
}
示例14: infoScreen
public function infoScreen()
{
/**
* @var $ilAccess ilAccessHandler
*/
global $ilAccess;
if (!$ilAccess->checkAccess('visible', '', $this->object->getRefId())) {
$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);
$info->enablePrivateNotes();
// standard meta data
$info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
// forward the command
$this->ctrl->forwardCommand($info);
}
示例15: getOverviewBody
/**
* Get assignment body for overview
*/
function getOverviewBody($a_data)
{
global $lng, $ilCtrl, $ilUser;
$tpl = new ilTemplate("tpl.assignment_body.html", true, true, "Modules/Exercise");
include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
include_once "./Services/UIComponent/Button/classes/class.ilLinkButton.php";
if (IS_PAYMENT_ENABLED) {
include_once './Services/Payment/classes/class.ilPaymentObject.php';
}
$info = new ilInfoScreenGUI(null);
$info->setTableClass("");
$not_started_yet = false;
if ($a_data["start_time"] > 0 && time() - $a_data["start_time"] <= 0) {
$not_started_yet = true;
}
if (!$not_started_yet) {
// instructions
$info->addSection($lng->txt("exc_instruction"));
$is_html = strlen($a_data["instruction"]) != strlen(strip_tags($a_data["instruction"]));
if (!$is_html) {
$a_data["instruction"] = nl2br(ilUtil::makeClickable($a_data["instruction"], true));
}
$info->addProperty("", $a_data["instruction"]);
}
// schedule
$info->addSection($lng->txt("exc_schedule"));
if ($a_data["start_time"] > 0) {
$info->addProperty($lng->txt("exc_start_time"), ilDatePresentation::formatDate(new ilDateTime($a_data["start_time"], IL_CAL_UNIX)));
}
if ($a_data["deadline"] > 0) {
$info->addProperty($lng->txt("exc_edit_until"), ilDatePresentation::formatDate(new ilDateTime($a_data["deadline"], IL_CAL_UNIX)));
}
$time_str = $this->getTimeString($a_data["deadline"]);
if (!$not_started_yet) {
$info->addProperty($lng->txt("exc_time_to_send"), "<b>" . $time_str . "</b>");
}
// public submissions
if ($this->exc->getShowSubmissions()) {
$ilCtrl->setParameterByClass("ilobjexercisegui", "ass_id", $a_data["id"]);
if ($a_data["deadline"] - time() <= 0) {
$button = ilLinkButton::getInstance();
$button->setCaption("exc_list_submission");
$button->setUrl($ilCtrl->getLinkTargetByClass("ilobjexercisegui", "listPublicSubmissions"));
$info->addProperty($lng->txt("exc_public_submission"), $button->render());
} else {
$info->addProperty($lng->txt("exc_public_submission"), $lng->txt("exc_msg_public_submission"));
}
$ilCtrl->setParameterByClass("ilobjexercisegui", "ass_id", $_GET["ass_id"]);
}
$ilCtrl->setParameterByClass("ilobjexercisegui", "ass_id", $a_data["id"]);
if (!$not_started_yet) {
// download files
$files = ilExAssignment::getFiles($a_data["exc_id"], $a_data["id"]);
if (count($files) > 0) {
$info->addSection($lng->txt("exc_files"));
foreach ($files as $file) {
// if download must be purchased first show a "buy"-button
if (IS_PAYMENT_ENABLED && (ilPaymentObject::_isBuyable($_GET['ref_id'], 'download') && !ilPaymentObject::_hasAccess($_GET['ref_id'], '', 'download'))) {
$info->addProperty($file["name"], $lng->txt("buy"), $ilCtrl->getLinkTargetByClass("ilShopPurchaseGUI", "showDetails"));
} else {
$ilCtrl->setParameterByClass("ilobjexercisegui", "file", urlencode($file["name"]));
$info->addProperty($file["name"], $lng->txt("download"), $ilCtrl->getLinkTargetByClass("ilobjexercisegui", "downloadFile"));
$ilCtrl->setParameterByClass("ilobjexercisegui", "file", "");
}
}
}
// submission
// if submission must be purchased first
if (IS_PAYMENT_ENABLED && (ilPaymentObject::_isBuyable($_GET['ref_id'], 'upload') && !ilPaymentObject::_hasAccess($_GET['ref_id'], '', 'upload'))) {
$info->addSection($lng->txt("exc_your_submission"));
$ilCtrl->clearParameters($this);
$ilCtrl->setParameter($this, "ref_id", $_GET['ref_id']);
$ilCtrl->setParameter($this, 'subtype', 'upload');
$info->addProperty($lng->txt('exc_hand_in'), $lng->txt("buy"), $ilCtrl->getLinkTargetByClass("ilShopPurchaseGUI", "showDetails"));
} else {
$info->addSection($lng->txt("exc_your_submission"));
$delivered_files = ilExAssignment::getDeliveredFiles($a_data["exc_id"], $a_data["id"], $ilUser->getId());
$times_up = false;
if ($a_data["deadline"] > 0 && $a_data["deadline"] - time() < 0) {
$times_up = true;
}
$team_members = null;
switch ($a_data["type"]) {
case ilExAssignment::TYPE_UPLOAD_TEAM:
$no_team_yet = false;
$team_members = ilExAssignment::getTeamMembersByAssignmentId($a_data["id"], $ilUser->getId());
if (sizeof($team_members)) {
$team = array();
foreach ($team_members as $member_id) {
$team[] = ilObjUser::_lookupFullname($member_id);
}
$team = implode(", ", $team);
$button = ilLinkButton::getInstance();
$button->setCaption("exc_manage_team");
$button->setUrl($ilCtrl->getLinkTargetByClass("ilobjexercisegui", "submissionScreenTeam"));
$team .= " " . $button->render();
$info->addProperty($lng->txt("exc_team_members"), $team);
//.........这里部分代码省略.........