本文整理汇总了PHP中ilInfoScreenGUI::addMetaDataSections方法的典型用法代码示例。如果您正苦于以下问题:PHP ilInfoScreenGUI::addMetaDataSections方法的具体用法?PHP ilInfoScreenGUI::addMetaDataSections怎么用?PHP ilInfoScreenGUI::addMetaDataSections使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilInfoScreenGUI
的用法示例。
在下文中一共展示了ilInfoScreenGUI::addMetaDataSections方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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;
}
示例2: 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);
}
示例3: outputInfoScreen
/**
* info screen
*/
function outputInfoScreen($a_standard_locator = true)
{
global $ilBench, $ilLocator, $ilAccess, $ilTabs;
$ilTabs->activateTab('id_info');
$this->lng->loadLanguageModule("meta");
include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
$info = new ilInfoScreenGUI($this);
$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"])) {
$info->addButton($this->lng->txt("view"), "ilias.php?baseClass=ilHTLMPresentationGUI&ref_id=" . $this->object->getRefID(), ' target="ilContObj' . $this->object->getId() . '" ');
}
// show standard meta data section
$info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
// forward the command
$this->ctrl->forwardCommand($info);
}
示例4: infoScreenForward
/**
* show information screen
*/
function infoScreenForward()
{
global $ilTabs, $ilErr, $ilToolbar;
$ilTabs->activateTab("id_info");
if (!$this->checkPermissionBool("visible")) {
$ilErr->raiseError($this->lng->txt("msg_no_perm_read"));
}
$this->lng->loadLanguageModule("cntr");
$ilToolbar->addButton($this->lng->txt("prtf_create_portfolio_from_template"), $this->ctrl->getLinkTarget($this, "createfromtemplate"), "", "", "", "", "submit emphsubmit");
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());
$this->ctrl->forwardCommand($info);
}
示例5: 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);
}
示例6: 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);
if ($this->checkPermissionBool("read", "sendfile")) {
// 9876
$this->lng->loadLanguageModule("file");
$info->addButton($this->lng->txt("file_download"), $this->ctrl->getLinkTarget($this, "sendfile"));
}
$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());
$info->addSection($this->lng->txt("file_info"));
$info->addProperty($this->lng->txt("filename"), $this->object->getFileName());
// BEGIN WebDAV Guess file type.
$info->addProperty($this->lng->txt("type"), $this->object->guessFileType());
// END WebDAV Guess file type.
$info->addProperty($this->lng->txt("size"), ilFormat::formatSize(ilObjFile::_lookupFileSize($this->object->getId()), 'long'));
$info->addProperty($this->lng->txt("version"), $this->object->getVersion());
include_once "./Services/History/classes/class.ilHistory.php";
$uploader = ilHistory::_getEntriesForObject($this->object->getId(), $this->object->getType());
$uploader = array_shift($uploader);
$uploader = $uploader["user_id"];
$this->lng->loadLanguageModule("file");
include_once "Services/User/classes/class.ilUserUtil.php";
$info->addProperty($this->lng->txt("file_uploaded_by"), ilUserUtil::getNamePresentation($uploader));
if ($this->id_type == self::WORKSPACE_NODE_ID) {
$info->addProperty($this->lng->txt("perma_link"), $this->getPermanentLinkWidget());
}
// forward the command
// $this->ctrl->setCmd("showSummary");
// $this->ctrl->setCmdClass("ilinfoscreengui");
$this->ctrl->forwardCommand($info);
}
示例7: 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);
}
示例8: 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);
}
示例9: 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);
}
示例10: 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);
}
示例11: showInfoScreen
/**
* Show info screen
*
* @param
* @return
*/
function showInfoScreen()
{
global $ilAccess;
$this->getTemplate();
$this->setTabs();
$this->setLocator();
$this->lng->loadLanguageModule("meta");
include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
$info = new ilInfoScreenGUI($this);
$info->enablePrivateNotes();
$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);
}
}
$info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
ilObjGlossaryGUI::addUsagesToInfo($info, $this->object->getId());
$this->ctrl->forwardCommand($info);
}
示例12: outputInfoScreen
/**
* info screen
*/
function outputInfoScreen($a_standard_locator = false)
{
global $ilBench, $ilLocator, $ilAccess;
$this->renderPageTitle();
// set style sheets
if (!$this->offlineMode()) {
$this->tpl->setStyleSheetLocation(ilUtil::getStyleSheetLocation());
} else {
$style_name = $this->ilias->account->prefs["style"] . ".css";
$this->tpl->setStyleSheetLocation("./" . $style_name);
}
$this->tpl->getStandardTemplate();
$this->tpl->setTitle($this->lm->getTitle());
$this->tpl->setTitleIcon(ilUtil::getImagePath("icon_lm_b.png"));
$this->tpl->setVariable("TABS", $this->lm_gui->setilLMMenu($this->offlineMode(), $this->getExportFormat(), "info", true));
// Full locator, if read permission is given
if ($ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
$this->ilLocator();
} else {
$ilLocator->addRepositoryItems();
$this->tpl->setLocator();
}
$this->lng->loadLanguageModule("meta");
include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
$info = new ilInfoScreenGUI($this->lm_gui);
$info->enablePrivateNotes();
$info->enableLearningProgress();
$info->enableNews();
if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
$news_set = new ilSetting("news");
$enable_internal_rss = $news_set->get("enable_rss_for_internal");
$info->enableNewsEditing();
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->lm->getId(), 0, $this->lm->getType());
if ($this->offlineMode()) {
$this->tpl->setContent($info->getHTML());
return $this->tpl->get();
} else {
// forward the command
$this->ctrl->forwardCommand($info);
//$this->tpl->setContent("aa");
$this->tpl->show();
}
}
示例13: outputInfoScreen
/**
* info screen
*/
function outputInfoScreen()
{
global $ilAccess;
//$this->tpl->setHeaderPageTitle("PAGETITLE", " - ".$this->lm->getTitle());
// set style sheets
/*
if (!$this->offlineMode())
{
$this->tpl->setStyleSheetLocation(ilUtil::getStyleSheetLocation());
}
else
{
$style_name = $this->ilias->account->prefs["style"].".css";;
$this->tpl->setStyleSheetLocation("./".$style_name);
}*/
$this->setInfoTabs("info_short");
$this->lng->loadLanguageModule("meta");
include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
$info = new ilInfoScreenGUI($this->slm_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"])) {
include_once './Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php';
$sahs_obj = new ilObjSAHSLearningModule($_GET["ref_id"]);
$om = $sahs_obj->getOpenMode();
$width = $sahs_obj->getWidth();
$height = $sahs_obj->getHeight();
if ($om != 0) {
$info->addButton($this->lng->txt("view"), "javascript:void(0); onclick=startSAHS('" . $this->ctrl->getLinkTarget($this, "") . "','ilContObj" . $this->slm_gui->object->getId() . "'," . $om . "," . $width . "," . $height . ");", '');
} else {
$info->addButton($this->lng->txt("view"), $this->ctrl->getLinkTarget($this, ""), ' target="ilContObj' . $this->slm_gui->object->getId() . '" ');
}
}
// show standard meta data section
$info->addMetaDataSections($this->slm_gui->object->getId(), 0, $this->slm_gui->object->getType());
/*
if ($this->offlineMode())
{
$this->tpl->setContent($info->getHTML());
return $this->tpl->get();
}
else
{*/
// forward the command
$this->ctrl->forwardCommand($info);
//$this->tpl->setContent("aa");
$this->tpl->show();
//}
}
示例14: 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);
}
示例15: switch
/**
* execute command
*/
function &executeCommand()
{
global $ilAccess, $ilTabs, $ilErr;
if (strtolower($_GET["baseClass"]) == "iladministrationgui" || $this->getCreationMode() == true) {
$this->prepareOutput();
} else {
$this->getTemplate();
$this->setLocator();
$this->setTabs();
}
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
switch ($next_class) {
case 'ilmdeditorgui':
if (!$ilAccess->checkAccess('write', '', $this->object->getRefId())) {
$ilErr->raiseError($this->lng->txt('permission_denied'), $ilErr->WARNING);
}
include_once 'Services/MetaData/classes/class.ilMDEditorGUI.php';
$md_gui =& new ilMDEditorGUI($this->object->getId(), 0, $this->object->getType());
$md_gui->addObserver($this->object, 'MDUpdateListener', 'General');
$this->ctrl->forwardCommand($md_gui);
break;
case 'ilpermissiongui':
include_once "Services/AccessControl/classes/class.ilPermissionGUI.php";
$perm_gui =& new ilPermissionGUI($this);
$ret =& $this->ctrl->forwardCommand($perm_gui);
break;
case "ilfilesystemgui":
$this->fs_gui =& new ilFileSystemGUI($this->object->getDataDirectory());
$this->fs_gui->setTableId("sahsfs" . $this->object->getId());
$ret =& $this->ctrl->forwardCommand($this->fs_gui);
break;
case "ilcertificategui":
include_once "./Services/Certificate/classes/class.ilCertificateGUI.php";
include_once "./Modules/ScormAicc/classes/class.ilSCORMCertificateAdapter.php";
$output_gui = new ilCertificateGUI(new ilSCORMCertificateAdapter($this->object));
$ret =& $this->ctrl->forwardCommand($output_gui);
break;
case "illearningprogressgui":
include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
$new_gui =& new ilLearningProgressGUI(ilLearningProgressGUI::LP_CONTEXT_REPOSITORY, $this->object->getRefId());
$this->ctrl->forwardCommand($new_gui);
break;
case 'illicensegui':
include_once "./Services/License/classes/class.ilLicenseGUI.php";
$license_gui =& new ilLicenseGUI($this);
$ret =& $this->ctrl->forwardCommand($license_gui);
break;
case "ilinfoscreengui":
include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
$info = new ilInfoScreenGUI($this);
$info->enablePrivateNotes();
$info->enableLearningProgress();
// add read / back button
if ($ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
if (!$this->object->getEditable()) {
$info->addButton($this->lng->txt("view"), "ilias.php?baseClass=ilSAHSPresentationGUI&ref_id=" . $this->object->getRefID(), ' target="ilContObj' . $this->object->getId() . '" ');
}
}
$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);
}
}
// show standard meta data section
$info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
// forward the command
$this->ctrl->forwardCommand($info);
break;
case "ilcommonactiondispatchergui":
include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
$gui = ilCommonActionDispatcherGUI::getInstanceFromAjaxCall();
$this->ctrl->forwardCommand($gui);
break;
case "ilobjstylesheetgui":
//$this->addLocations();
$this->ctrl->setReturn($this, "properties");
$ilTabs->clearTargets();
$style_gui =& new ilObjStyleSheetGUI("", $this->object->getStyleSheetId(), false, false);
$style_gui->omitLocator();
if ($cmd == "create" || $_GET["new_type"] == "sty") {
$style_gui->setCreationMode(true);
}
//$ret =& $style_gui->executeCommand();
if ($cmd == "confirmedDelete") {
$this->object->setStyleSheetId(0);
$this->object->update();
}
$ret =& $this->ctrl->forwardCommand($style_gui);
if ($cmd == "save" || $cmd == "copyStyle" || $cmd == "importStyle") {
$style_id = $ret;
$this->object->setStyleSheetId($style_id);
$this->object->update();
//.........这里部分代码省略.........