本文整理汇总了PHP中ilCommonActionDispatcherGUI::getInstanceFromAjaxCall方法的典型用法代码示例。如果您正苦于以下问题:PHP ilCommonActionDispatcherGUI::getInstanceFromAjaxCall方法的具体用法?PHP ilCommonActionDispatcherGUI::getInstanceFromAjaxCall怎么用?PHP ilCommonActionDispatcherGUI::getInstanceFromAjaxCall使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilCommonActionDispatcherGUI
的用法示例。
在下文中一共展示了ilCommonActionDispatcherGUI::getInstanceFromAjaxCall方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: executeCommand
public function executeCommand()
{
global $ilTabs;
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
$this->prepareOutput();
switch ($next_class) {
case 'ilinfoscreengui':
// forwards command
$this->infoScreen();
break;
case 'ilpermissiongui':
$ilTabs->activateTab('id_permissions');
include_once "Services/AccessControl/classes/class.ilPermissionGUI.php";
$this->ctrl->forwardCommand(new ilPermissionGUI($this));
break;
case "ilcommonactiondispatchergui":
include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
$gui = ilCommonActionDispatcherGUI::getInstanceFromAjaxCall();
$this->ctrl->forwardCommand($gui);
break;
default:
if (!$cmd || $cmd == 'view') {
$cmd = "editSettings";
}
$cmd .= "Object";
$this->{$cmd}();
break;
}
return true;
}
示例2: switch
function &executeCommand()
{
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
switch ($next_class) {
case "ilcommonactiondispatchergui":
include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
$gui = ilCommonActionDispatcherGUI::getInstanceFromAjaxCall();
$this->ctrl->forwardCommand($gui);
break;
case "ilobjectownershipmanagementgui":
$this->prepareOutput();
$this->tabs_gui->activateTab("ownership");
include_once "Services/Object/classes/class.ilObjectOwnershipManagementGUI.php";
$gui = new ilObjectOwnershipManagementGUI();
$this->ctrl->forwardCommand($gui);
break;
default:
$this->prepareOutput();
if ($this->type != "wsrt") {
$this->addHeaderAction();
}
if (!$cmd) {
$cmd = "render";
}
$this->{$cmd}();
break;
}
return true;
}
示例3: performCommand
/**
* Handles all commmands of this class, centralizes permission checks
*/
function performCommand($cmd)
{
$next_class = $this->ctrl->getNextClass($this);
switch ($next_class) {
case 'ilcommonactiondispatchergui':
require_once 'Services/Object/classes/class.ilCommonActionDispatcherGUI.php';
$gui = ilCommonActionDispatcherGUI::getInstanceFromAjaxCall();
return $this->ctrl->forwardCommand($gui);
break;
}
switch ($cmd) {
case "editProperties":
// list all commands that need write permission here
// list all commands that need write permission here
case "updateProperties":
$this->checkPermission("write");
$this->{$cmd}();
break;
case "showContent":
// list all commands that need read permission here
//case "...":
//case "...":
$this->checkPermission("read");
$this->{$cmd}();
break;
}
}
示例4: executeCommand
/**
* execute command
*/
function executeCommand()
{
global $ilTabs, $lng, $ilAccess, $tpl, $ilCtrl, $ilLocator;
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
switch ($next_class) {
case 'ilinfoscreengui':
$this->prepareOutput();
$this->addHeaderAction();
$this->infoScreen();
break;
case 'ilpermissiongui':
$this->prepareOutput();
$ilTabs->activateTab("perm_settings");
$this->addHeaderAction();
include_once "Services/AccessControl/classes/class.ilPermissionGUI.php";
$perm_gui =& new ilPermissionGUI($this);
$ret = $this->ctrl->forwardCommand($perm_gui);
break;
case "ilcommonactiondispatchergui":
include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
$gui = ilCommonActionDispatcherGUI::getInstanceFromAjaxCall();
$this->ctrl->forwardCommand($gui);
break;
default:
$cmd = $this->ctrl->getCmd("listMaterials");
$this->prepareOutput();
$this->addHeaderAction();
$this->{$cmd}();
break;
}
}
示例5: performCommand
/**
* Plugin command execution runpoint.
*
* The performCommand() method is called internally
* by ilias to handle a specific request action.
* The $cmd given as argument is used to identify
* the command to be executed.
*
* @param string $cmd The command (method) to execute.
*/
public function performCommand($cmd)
{
/**
* @var $ilTabs ilTabsGUI
* @var $tpl ilTemplate
*/
global $ilTabs, $tpl;
$tpl->setDescription($this->object->getDescription());
$next_class = $this->ctrl->getNextClass($this);
switch ($next_class) {
case 'ilmdeditorgui':
$this->checkPermission('write');
require_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');
$ilTabs->setTabActive('meta_data');
$this->ctrl->forwardCommand($md_gui);
return;
break;
case 'ilcommonactiondispatchergui':
require_once 'Services/Object/classes/class.ilCommonActionDispatcherGUI.php';
$gui = ilCommonActionDispatcherGUI::getInstanceFromAjaxCall();
$this->ctrl->forwardCommand($gui);
break;
default:
switch ($cmd) {
case 'updateSettings':
case 'updateMemberships':
case 'initSelectTests':
case 'selectTests':
case 'performAddTests':
case 'removeTests':
case 'addMemberships':
case 'removeMemberships':
case 'editSettings':
$this->checkPermission('write');
$this->{$cmd}();
break;
case 'showContent':
case 'applyOverviewFilter':
case 'applyTestsFilter':
case 'applyGroupsFilter':
case 'resetOverviewFilter':
case 'resetTestsFilter':
case 'resetGroupsFilter':
case 'addToDesk':
case 'removeFromDesk':
if (in_array($cmd, array('addToDesk', 'removeFromDesk'))) {
$cmd .= 'Object';
}
$this->checkPermission('read');
$this->{$cmd}();
break;
case 'submitManualScores':
$this->{$cmd}();
}
break;
}
$this->addHeaderAction();
}
示例6: switch
/**
* execute command
*/
function &executeCommand()
{
global $rbacsystem, $tpl, $ilAccess;
// load additional language modules
$this->lng->loadLanguageModule("barometer");
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd("showSummary");
$this->ctrl->setReturn($this, "showSummary");
$this->setTabs();
switch ($next_class) {
case "ilnotegui":
$this->showSummary();
// forwards command
break;
case "ilcolumngui":
$this->showSummary();
break;
case "ilpublicuserprofilegui":
include_once "./Services/User/classes/class.ilPublicUserProfileGUI.php";
$user_profile = new ilPublicUserProfileGUI($_GET["user_id"]);
$user_profile->setBackUrl($this->ctrl->getLinkTarget($this, "showSummary"));
$html = $this->ctrl->forwardCommand($user_profile);
$tpl->setContent($html);
break;
case "ilcommonactiondispatchergui":
include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
$gui = ilCommonActionDispatcherGUI::getInstanceFromAjaxCall();
$this->ctrl->forwardCommand($gui);
break;
default:
return $this->{$cmd}();
break;
}
return true;
}
示例7: executeCommand
/**
* main switch
*/
function executeCommand()
{
global $tpl, $ilTabs, $ilNavigationHistory;
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
if (!$next_class && $cmd == 'render') {
$this->ctrl->setCmdClass('ilBookingObjectGUI');
$next_class = $this->ctrl->getNextClass($this);
}
if (substr($cmd, 0, 4) == 'book') {
$next_class = '';
}
$ilNavigationHistory->addItem($this->ref_id, "./goto.php?target=book_" . $this->ref_id, "book");
$this->prepareOutput();
switch ($next_class) {
case 'ilpermissiongui':
$this->tabs_gui->setTabActive('perm_settings');
include_once "Services/AccessControl/classes/class.ilPermissionGUI.php";
$perm_gui =& new ilPermissionGUI($this);
$ret =& $this->ctrl->forwardCommand($perm_gui);
break;
case 'ilbookingobjectgui':
$this->tabs_gui->setTabActive('render');
include_once "Modules/BookingManager/classes/class.ilBookingObjectGUI.php";
$object_gui =& new ilBookingObjectGUI($this);
$ret =& $this->ctrl->forwardCommand($object_gui);
break;
case 'ilbookingschedulegui':
$this->tabs_gui->setTabActive('schedules');
include_once "Modules/BookingManager/classes/class.ilBookingScheduleGUI.php";
$schedule_gui =& new ilBookingScheduleGUI($this);
$ret =& $this->ctrl->forwardCommand($schedule_gui);
break;
case 'ilpublicuserprofilegui':
$ilTabs->clearTargets();
include_once "Services/User/classes/class.ilPublicUserProfileGUI.php";
$profile = new ilPublicUserProfileGUI((int) $_GET["user_id"]);
$profile->setBackUrl($this->ctrl->getLinkTarget($this, 'log'));
$ret = $this->ctrl->forwardCommand($profile);
$tpl->setContent($ret);
break;
case 'ilinfoscreengui':
$this->infoScreen();
break;
case "ilcommonactiondispatchergui":
include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
$gui = ilCommonActionDispatcherGUI::getInstanceFromAjaxCall();
$this->ctrl->forwardCommand($gui);
break;
default:
$cmd = $this->ctrl->getCmd();
$cmd .= 'Object';
$this->{$cmd}();
break;
}
$this->addHeaderAction();
return true;
}
示例8: executeCommand
/**
* execute command
*
* @access public
* @return
*/
public function executeCommand()
{
global $ilUser, $ilCtrl;
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
$this->prepareOutput();
switch ($next_class) {
case "ilinfoscreengui":
$this->checkPermission("visible");
$this->infoScreen();
// forwards command
break;
case 'ilpermissiongui':
$this->tabs_gui->setTabActive('perm_settings');
include_once "Services/AccessControl/classes/class.ilPermissionGUI.php";
$perm_gui = new ilPermissionGUI($this);
$ret = $this->ctrl->forwardCommand($perm_gui);
break;
case 'ilobjectcopygui':
include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
$cp = new ilObjectCopyGUI($this);
$cp->setType('sess');
$this->ctrl->forwardCommand($cp);
break;
case "ilexportgui":
// $this->prepareOutput();
$this->tabs_gui->setTabActive("export");
include_once "./Services/Export/classes/class.ilExportGUI.php";
$exp_gui = new ilExportGUI($this);
$exp_gui->addFormat("xml");
$ret = $this->ctrl->forwardCommand($exp_gui);
// $this->tpl->show();
break;
case "ilcommonactiondispatchergui":
include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
$gui = ilCommonActionDispatcherGUI::getInstanceFromAjaxCall();
$this->ctrl->forwardCommand($gui);
break;
default:
if (!$cmd) {
$cmd = "infoScreen";
}
$cmd .= "Object";
if ($cmd != "infoScreenObject") {
$this->checkPermission("read");
} else {
$this->checkPermission("visible");
}
$this->{$cmd}();
break;
}
$this->addHeaderAction();
return true;
}
示例9: executeCommand
/**
* executeCommand
*/
public function executeCommand()
{
global $ilCtrl, $ilTabs, $ilNavigationHistory, $tpl, $lng;
// Navigation History
$link = $ilCtrl->getLinkTarget($this, $this->getStandardCmd());
if ($this->object != NULL) {
$ilNavigationHistory->addItem($this->object->getRefId(), $link, "bibl");
}
$next_class = $ilCtrl->getNextClass($this);
$this->cmd = $ilCtrl->getCmd();
switch ($next_class) {
case "ilinfoscreengui":
$this->prepareOutput();
$ilTabs->activateTab("id_info");
$this->infoScreenForward();
break;
case "ilcommonactiondispatchergui":
include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
$gui = ilCommonActionDispatcherGUI::getInstanceFromAjaxCall();
$this->ctrl->forwardCommand($gui);
break;
case "ilpermissiongui":
$this->prepareOutput();
$ilTabs->activateTab("id_permissions");
include_once "Services/AccessControl/classes/class.ilPermissionGUI.php";
$perm_gui = new ilPermissionGUI($this);
$this->ctrl->forwardCommand($perm_gui);
break;
case "ilobjectcopygui":
include_once "./Services/Object/classes/class.ilObjectCopyGUI.php";
$cp = new ilObjectCopyGUI($this);
$cp->setType('bibl');
$tpl->getStandardTemplate();
$this->ctrl->forwardCommand($cp);
break;
case "ilobjfilegui":
$this->prepareOutput();
$ilTabs->setTabActive("id_records");
include_once "./Modules/File/classes/class.ilObjFile.php";
$file_gui = new ilObjFile($this);
$this->ctrl->forwardCommand($file_gui);
break;
case "ilexportgui":
$this->prepareOutput();
$ilTabs->setTabActive("export");
$exp_gui = new ilExportGUI($this);
$exp_gui->addFormat("xml");
$this->ctrl->forwardCommand($exp_gui);
break;
default:
return parent::executeCommand();
}
return true;
}
示例10: switch
/**
* execute command
*/
function &executeCommand()
{
global $ilCtrl, $ilTabs, $ilUser;
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
switch ($next_class) {
case "ilnotegui":
$this->getTabs();
$ilTabs->setTabActive("pg");
return $this->preview();
break;
case "ilratinggui":
// for rating side block
include_once "./Services/Rating/classes/class.ilRatingGUI.php";
$rating_gui = new ilRatingGUI();
$rating_gui->setObject($this->getPageObject()->getParentId(), "wiki", $this->getPageObject()->getId(), "wpg");
$this->ctrl->forwardCommand($rating_gui);
$ilCtrl->redirect($this, "preview");
break;
case "ilpageobjectgui":
die("Deprecated. Wikipage gui forwarding to ilpageobject");
return;
case "ilcommonactiondispatchergui":
include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
$gui = ilCommonActionDispatcherGUI::getInstanceFromAjaxCall();
$gui->enableCommentsSettings(false);
$gui->setRatingCallback($this, "preview");
$this->ctrl->forwardCommand($gui);
break;
default:
if ($_GET["ntf"]) {
include_once "./Services/Notification/classes/class.ilNotification.php";
switch ($_GET["ntf"]) {
case 1:
ilNotification::setNotification(ilNotification::TYPE_WIKI, $ilUser->getId(), $this->getPageObject()->getParentId(), false);
break;
case 2:
// remove all page notifications here?
ilNotification::setNotification(ilNotification::TYPE_WIKI, $ilUser->getId(), $this->getPageObject()->getParentId(), true);
break;
case 3:
ilNotification::setNotification(ilNotification::TYPE_WIKI_PAGE, $ilUser->getId(), $this->getPageObject()->getId(), false);
break;
case 4:
ilNotification::setNotification(ilNotification::TYPE_WIKI_PAGE, $ilUser->getId(), $this->getPageObject()->getId(), true);
break;
}
$ilCtrl->redirect($this, "preview");
}
$this->setPresentationTitle($this->getWikiPage()->getTitle());
return parent::executeCommand();
}
}
示例11: executeCommand
public function executeCommand()
{
global $ilAccess, $ilNavigationHistory, $ilErr, $ilTabs;
$this->external_rater_360 = false;
if (!$this->creation_mode && $this->object->get360Mode() && $_SESSION["anonymous_id"][$this->object->getId()] && ilObjSurvey::validateExternalRaterCode($this->object->getRefId(), $_SESSION["anonymous_id"][$this->object->getId()])) {
$this->external_rater_360 = true;
}
if (!$this->external_rater_360) {
if (!$ilAccess->checkAccess("read", "", $this->ref_id) && !$ilAccess->checkAccess("visible", "", $this->ref_id)) {
$ilErr->raiseError($this->lng->txt("permission_denied"), $ilErr->MESSAGE);
}
// add entry to navigation history
if (!$this->getCreationMode() && $ilAccess->checkAccess("read", "", $this->ref_id)) {
$this->ctrl->setParameterByClass("ilobjsurveygui", "ref_id", $this->ref_id);
$link = $this->ctrl->getLinkTargetByClass("ilobjsurveygui", "");
$ilNavigationHistory->addItem($this->ref_id, $link, "svy");
}
}
$cmd = $this->ctrl->getCmd("properties");
// workaround for bug #6288, needs better solution
if ($cmd == "saveTags") {
$this->ctrl->setCmdClass("ilinfoscreengui");
}
// deep link from repository - "redirect" to page view
if (!$this->ctrl->getCmdClass() && $cmd == "questionsrepo") {
$_REQUEST["pgov"] = 1;
$this->ctrl->setCmd("questions");
$this->ctrl->setCmdClass("ilsurveyeditorgui");
}
$next_class = $this->ctrl->getNextClass($this);
$this->ctrl->setReturn($this, "properties");
$this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "survey.css", "Modules/Survey"), "screen");
$this->prepareOutput();
switch ($next_class) {
case "ilinfoscreengui":
if (!in_array($this->ctrl->getCmdClass(), array('ilpublicuserprofilegui', 'ilobjportfoliogui'))) {
$this->addHeaderAction();
$this->infoScreen();
// forwards command
} else {
// #16891
$ilTabs->clearTargets();
include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
$info = new ilInfoScreenGUI($this);
$this->ctrl->forwardCommand($info);
}
break;
case 'ilmdeditorgui':
$this->handleWriteAccess();
$ilTabs->activateTab("meta_data");
$this->addHeaderAction();
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 "ilsurveyevaluationgui":
$ilTabs->activateTab("svy_results");
$this->addHeaderAction();
include_once "./Modules/Survey/classes/class.ilSurveyEvaluationGUI.php";
$eval_gui = new ilSurveyEvaluationGUI($this->object);
$this->ctrl->forwardCommand($eval_gui);
break;
case "ilsurveyexecutiongui":
$ilTabs->clearTargets();
include_once "./Modules/Survey/classes/class.ilSurveyExecutionGUI.php";
$exec_gui = new ilSurveyExecutionGUI($this->object);
$this->ctrl->forwardCommand($exec_gui);
break;
case 'ilpermissiongui':
$ilTabs->activateTab("perm_settings");
$this->addHeaderAction();
include_once "Services/AccessControl/classes/class.ilPermissionGUI.php";
$perm_gui =& new ilPermissionGUI($this);
$this->ctrl->forwardCommand($perm_gui);
break;
case 'ilobjectcopygui':
include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
$cp = new ilObjectCopyGUI($this);
$cp->setType('svy');
$this->ctrl->forwardCommand($cp);
break;
case "ilcommonactiondispatchergui":
include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
$gui = ilCommonActionDispatcherGUI::getInstanceFromAjaxCall();
$this->ctrl->forwardCommand($gui);
break;
// 360, skill service
// 360, skill service
case 'ilsurveyskillgui':
$ilTabs->activateTab("survey_competences");
include_once "./Modules/Survey/classes/class.ilSurveySkillGUI.php";
$gui = new ilSurveySkillGUI($this->object);
$this->ctrl->forwardCommand($gui);
break;
case 'ilsurveyskilldeterminationgui':
$ilTabs->activateTab("maintenance");
include_once "./Modules/Survey/classes/class.ilSurveySkillDeterminationGUI.php";
$gui = new ilSurveySkillDeterminationGUI($this->object);
$this->ctrl->forwardCommand($gui);
//.........这里部分代码省略.........
示例12: executeCommand
/**
* execute command
*
* @global ilLocatorGUI $ilLocator
* @global ilAccessHandler $ilAccess
* @global ilNavigationHistory $ilNavigationHistory
* @global ilTemplate $tpl
* @global ilCtrl $ilCtrl
* @global ilTabsGUI $ilTabs
* @global ilLanguage $lng
* @global ILIAS $ilias
*/
function executeCommand()
{
global $ilUser, $ilLocator, $ilAccess, $ilNavigationHistory, $tpl, $ilCtrl, $ilErr, $ilTabs, $lng, $ilDB, $ilPluginAdmin;
if (!$ilAccess->checkAccess("read", "", $_GET["ref_id"]) && !$ilAccess->checkAccess("visible", "", $_GET["ref_id"])) {
global $ilias;
$ilias->raiseError($this->lng->txt("permission_denied"), $ilias->error_obj->MESSAGE);
}
// add entry to navigation history
if (!$this->getCreationMode() && $ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
if ('qpl' == $this->object->getType()) {
$ilNavigationHistory->addItem($_GET["ref_id"], "ilias.php?baseClass=ilObjQuestionPoolGUI&cmd=questions&ref_id=" . $_GET["ref_id"], "qpl");
}
}
$cmd = $this->ctrl->getCmd("questions");
$next_class = $this->ctrl->getNextClass($this);
if (in_array($next_class, array('', 'ilobjquestionpoolgui')) && $cmd == 'questions') {
$_GET['q_id'] = '';
}
$this->prepareOutput();
$this->ctrl->setReturn($this, "questions");
$this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "test_print.css", "Modules/Test"), "print");
$this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "ta.css", "Modules/Test"), "screen");
if ($_GET["q_id"] < 1) {
$q_type = $_POST["sel_question_types"] != "" ? $_POST["sel_question_types"] : $_GET["sel_question_types"];
}
if ($cmd != "createQuestion" && $cmd != "createQuestionForTest" && $next_class != "ilassquestionpagegui") {
if ($_GET["test_ref_id"] != "" or $_GET["calling_test"]) {
$ref_id = $_GET["test_ref_id"];
if (!$ref_id) {
$ref_id = $_GET["calling_test"];
}
}
}
switch ($next_class) {
case "ilcommonactiondispatchergui":
include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
$gui = ilCommonActionDispatcherGUI::getInstanceFromAjaxCall();
$this->ctrl->forwardCommand($gui);
break;
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 'ilassquestionpreviewgui':
$this->ctrl->saveParameter($this, "q_id");
require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionPreviewGUI.php';
$gui = new ilAssQuestionPreviewGUI($this->ctrl, $this->tabs_gui, $this->tpl, $this->lng, $ilDB);
$gui->initQuestion((int) $_GET['q_id'], $this->object->getId());
$gui->initPreviewSettings($this->object->getRefId());
$gui->initPreviewSession($ilUser->getId(), (int) $_GET['q_id']);
$gui->initHintTracking();
$gui->initStyleSheets();
global $ilHelp;
$ilHelp->setScreenIdComponent("qpl");
$this->ctrl->forwardCommand($gui);
break;
case "ilassquestionpagegui":
include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
$this->tpl->setCurrentBlock("ContentStyle");
$this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath(0));
$this->tpl->parseCurrentBlock();
// syntax style
$this->tpl->setCurrentBlock("SyntaxStyle");
$this->tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
$this->tpl->parseCurrentBlock();
include_once "./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
$q_gui = assQuestionGUI::_getQuestionGUI("", $_GET["q_id"]);
$q_gui->setQuestionTabs();
$q_gui->outAdditionalOutput();
$q_gui->object->setObjId($this->object->getId());
$q_gui->setTargetGuiClass(null);
$q_gui->setQuestionActionCmd(null);
$question = $q_gui->object;
$this->ctrl->saveParameter($this, "q_id");
include_once "./Modules/TestQuestionPool/classes/class.ilAssQuestionPageGUI.php";
$this->lng->loadLanguageModule("content");
$this->ctrl->setReturnByClass("ilAssQuestionPageGUI", "view");
$this->ctrl->setReturn($this, "questions");
$page_gui = new ilAssQuestionPageGUI($_GET["q_id"]);
$page_gui->setEditPreview(true);
$page_gui->setEnabledTabs(false);
if (strlen($this->ctrl->getCmd()) == 0 && !isset($_POST["editImagemapForward_x"])) {
$this->ctrl->setCmdClass(get_class($page_gui));
//.........这里部分代码省略.........
示例13: 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();
//.........这里部分代码省略.........
示例14: executeCommand
//.........这里部分代码省略.........
$ilTabs->activateTab('id_list_files');
$fs_gui = new ilFileSystemGUI($this->object->getDataDirectory());
$fs_gui->activateLabels(true, $this->lng->txt("cont_purpose"));
$fs_gui->setUseUploadDirectory(true);
$fs_gui->setTableId("htlmfs" . $this->object->getId());
if ($this->object->getStartFile() != "") {
$fs_gui->labelFile($this->object->getStartFile(), $this->lng->txt("cont_startfile"));
}
$fs_gui->addCommand($this, "setStartFile", $this->lng->txt("cont_set_start_file"));
$this->ctrl->forwardCommand($fs_gui);
// try to set start file automatically
require_once "./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php";
if (!ilObjFileBasedLMAccess::_determineStartUrl($this->object->getId())) {
$do_update = false;
$pcommand = $fs_gui->getLastPerformedCommand();
if (is_array($pcommand)) {
$valid = array("index.htm", "index.html", "start.htm", "start.html");
if ($pcommand["cmd"] == "create_file") {
$file = strtolower(basename($pcommand["name"]));
if (in_array($file, $valid)) {
$this->object->setStartFile($pcommand["name"]);
$do_update = $pcommand["name"];
}
} else {
if ($pcommand["cmd"] == "unzip_file") {
$zip_file = strtolower(basename($pcommand["name"]));
$suffix = strrpos($zip_file, ".");
if ($suffix) {
$zip_file = substr($zip_file, 0, $suffix);
}
foreach ($pcommand["added"] as $file) {
$chk_file = null;
if (stristr($file, ".htm")) {
$chk_file = strtolower(basename($file));
$suffix = strrpos($chk_file, ".");
if ($suffix) {
$chk_file = substr($chk_file, 0, $suffix);
}
}
if (in_array(basename($file), $valid) || $zip_file && $chk_file && $chk_file == $zip_file) {
$this->object->setStartFile($file);
$do_update = $file;
break;
}
}
}
}
}
if ($do_update) {
ilUtil::sendInfo(sprintf($this->lng->txt("cont_start_file_set_to"), $do_update), true);
$this->object->update();
$this->ctrl->redirectByClass("ilfilesystemgui", "listFiles");
}
}
break;
case "ilinfoscreengui":
$ret =& $this->outputInfoScreen();
break;
case "illearningprogressgui":
$ilTabs->activateTab('id_learning_progress');
include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
$new_gui =& new ilLearningProgressGUI(ilLearningProgressGUI::LP_CONTEXT_REPOSITORY, $this->object->getRefId(), $_GET['user_id'] ? $_GET['user_id'] : $ilUser->getId());
$this->ctrl->forwardCommand($new_gui);
break;
case 'ilpermissiongui':
$ilTabs->activateTab('id_permissions');
include_once "Services/AccessControl/classes/class.ilPermissionGUI.php";
$perm_gui =& new ilPermissionGUI($this);
$ret =& $this->ctrl->forwardCommand($perm_gui);
break;
case 'illicensegui':
$ilTabs->activateTab('id_license');
include_once "./Services/License/classes/class.ilLicenseGUI.php";
$license_gui =& new ilLicenseGUI($this);
$ret =& $this->ctrl->forwardCommand($license_gui);
break;
case "ilexportgui":
$ilTabs->activateTab("export");
include_once "./Services/Export/classes/class.ilExportGUI.php";
$exp_gui = new ilExportGUI($this);
$exp_gui->addFormat("xml");
$exp_gui->addFormat("html", "", $this, "exportHTML");
$ret = $this->ctrl->forwardCommand($exp_gui);
// $this->tpl->show();
break;
case "ilcommonactiondispatchergui":
include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
$gui = ilCommonActionDispatcherGUI::getInstanceFromAjaxCall();
$this->ctrl->forwardCommand($gui);
break;
default:
$cmd = $this->ctrl->getCmd("frameset");
if (strtolower($_GET["baseClass"]) == "iladministrationgui" || $this->getCreationMode() == true) {
$cmd .= "Object";
}
$ret =& $this->{$cmd}();
break;
}
$this->addHeaderAction();
}
示例15: executeCommand
//.........这里部分代码省略.........
$ret = $this->ctrl->forwardCommand($fs_gui);
}
}
break;
case "ilinfoscreengui":
$ilTabs->activateTab("info");
$this->infoScreen();
// forwards command
break;
case 'ilpermissiongui':
$ilTabs->activateTab("permissions");
include_once "Services/AccessControl/classes/class.ilPermissionGUI.php";
$perm_gui =& new ilPermissionGUI($this);
$ret =& $this->ctrl->forwardCommand($perm_gui);
break;
case "illearningprogressgui":
$ilTabs->activateTab("learning_progress");
include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
$new_gui =& new ilLearningProgressGUI(ilLearningProgressGUI::LP_CONTEXT_REPOSITORY, $this->object->getRefId(), $_GET['user_id'] ? $_GET['user_id'] : $ilUser->getId());
$this->ctrl->forwardCommand($new_gui);
$this->tabs_gui->setTabActive('learning_progress');
break;
case 'ilrepositorysearchgui':
$ilTabs->activateTab("grades");
include_once './Services/Search/classes/class.ilRepositorySearchGUI.php';
$rep_search = new ilRepositorySearchGUI();
if (!$_REQUEST["ctx"]) {
$rep_search->setTitle($this->lng->txt("exc_add_participant"));
$rep_search->setCallback($this, 'addMembersObject');
// Set tabs
$this->tabs_gui->setTabActive('members');
$this->ctrl->setReturn($this, 'members');
#$this->__setSubTabs('members');
#$this->tabs_gui->setSubTabActive('members');
} else {
$this->ctrl->saveParameterByClass('ilRepositorySearchGUI', 'ctx', 1);
$rep_search->setTitle($this->lng->txt("exc_team_member_add"));
$rep_search->setCallback($this, 'addTeamMemberActionObject');
// Set tabs
$this->initTeamSubmission("submissionScreenTeam");
$this->ctrl->setReturn($this, 'submissionScreenTeam');
}
$ret =& $this->ctrl->forwardCommand($rep_search);
break;
case 'ilobjectcopygui':
$ilCtrl->saveParameter($this, 'new_type');
$ilCtrl->setReturnByClass(get_class($this), 'create');
include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
$cp = new ilObjectCopyGUI($this);
$cp->setType('exc');
$this->ctrl->forwardCommand($cp);
break;
case "ilexportgui":
$ilTabs->activateTab("export");
include_once "./Services/Export/classes/class.ilExportGUI.php";
$exp_gui = new ilExportGUI($this);
$exp_gui->addFormat("xml");
$ret = $this->ctrl->forwardCommand($exp_gui);
// $this->tpl->show();
break;
case 'ilshoppurchasegui':
include_once './Services/Payment/classes/class.ilShopPurchaseGUI.php';
$sp = new ilShopPurchaseGUI($_GET['ref_id']);
$this->ctrl->forwardCommand($sp);
break;
case "ilcommonactiondispatchergui":
include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
$gui = ilCommonActionDispatcherGUI::getInstanceFromAjaxCall();
$this->ctrl->forwardCommand($gui);
break;
case "ilcertificategui":
$this->setSettingsSubTabs();
$this->tabs_gui->activateTab("settings");
$this->tabs_gui->activateSubTab("certificate");
include_once "./Services/Certificate/classes/class.ilCertificateGUI.php";
include_once "./Modules/Exercise/classes/class.ilExerciseCertificateAdapter.php";
$output_gui = new ilCertificateGUI(new ilExerciseCertificateAdapter($this->object));
$this->ctrl->forwardCommand($output_gui);
break;
case "ilratinggui":
$this->ass->updatePeerReviewTimestamp((int) $_REQUEST["peer_id"]);
include_once "./Services/Rating/classes/class.ilRatingGUI.php";
$rating_gui = new ilRatingGUI();
$rating_gui->setObject($this->ass->getId(), "ass", (int) $_REQUEST["peer_id"], "peer");
$this->ctrl->forwardCommand($rating_gui);
$ilCtrl->redirect($this, "editPeerReview");
break;
default:
$this->ctrl->setParameter($this, "fsmode", "");
// #15115
if (!$cmd) {
$cmd = "infoScreen";
}
$cmd .= "Object";
$this->{$cmd}();
break;
}
$this->addHeaderAction();
return true;
}