/**
  * execute command
  */
 function &executeCommand()
 {
     global $ilCtrl;
     $next_class = $this->ctrl->getNextClass($this);
     $cmd = $this->ctrl->getCmd();
     switch ($next_class) {
         case "ilobjbloggui":
             include_once "Modules/Blog/classes/class.ilObjBlogGUI.php";
             $blog_gui = new ilObjBlogGUI((int) $this->getPageObject()->getTitle(), ilObjBlogGUI::WORKSPACE_OBJECT_ID);
             $blog_gui->disableNotes(!$this->enable_comments);
             return $ilCtrl->forwardCommand($blog_gui);
         case "ilcalendarmonthgui":
             // booking action
             if ($cmd && $cmd != "preview") {
                 include_once './Services/Calendar/classes/class.ilCalendarMonthGUI.php';
                 $month_gui = new ilCalendarMonthGUI(new ilDate());
                 return $ilCtrl->forwardCommand($month_gui);
             } else {
                 $ilCtrl->setParameter($this, "cmd", "preview");
                 return self::EMBEDDED_NO_OUTPUT;
             }
         case "ilpageobjectgui":
             die("Deprecated. ilPortfolioPage gui forwarding to ilpageobject");
             return;
         default:
             $this->setPresentationTitle($this->getPageObject()->getTitle());
             return parent::executeCommand();
     }
 }
Пример #2
0
 /**
  * execute command
  */
 function &executeCommand()
 {
     global $ilCtrl, $ilUser;
     $next_class = $this->ctrl->getNextClass($this);
     $cmd = $this->ctrl->getCmd();
     switch ($next_class) {
         case "ilobjbloggui":
             // #12879 - we need the wsp-id for the keywords
             include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
             $wsp_tree = new ilWorkspaceTree($ilUser->getId());
             $blog_obj_id = (int) $this->getPageObject()->getTitle();
             $blog_node_id = $wsp_tree->lookupNodeId($blog_obj_id);
             include_once "Modules/Blog/classes/class.ilObjBlogGUI.php";
             $blog_gui = new ilObjBlogGUI($blog_node_id, ilObjBlogGUI::WORKSPACE_NODE_ID);
             $blog_gui->disableNotes(!$this->enable_comments);
             return $ilCtrl->forwardCommand($blog_gui);
         case "ilcalendarmonthgui":
             // booking action
             if ($cmd && $cmd != "preview") {
                 include_once './Services/Calendar/classes/class.ilCalendarMonthGUI.php';
                 $month_gui = new ilCalendarMonthGUI(new ilDate());
                 return $ilCtrl->forwardCommand($month_gui);
             } else {
                 $ilCtrl->setParameter($this, "cmd", "preview");
                 return self::EMBEDDED_NO_OUTPUT;
             }
         case "ilpageobjectgui":
             die("Deprecated. ilPortfolioPage gui forwarding to ilpageobject");
             return;
         default:
             $this->setPresentationTitle($this->getPageObject()->getTitle());
             return parent::executeCommand();
     }
 }
 /**
  * execute command
  */
 function &executeCommand()
 {
     global $ilCtrl, $ilTabs;
     $next_class = $this->ctrl->getNextClass($this);
     $cmd = $this->ctrl->getCmd();
     switch ($next_class) {
         default:
             return parent::executeCommand();
     }
 }
 /**
  * execute command
  */
 function &executeCommand()
 {
     global $ilCtrl, $ilTabs;
     $next_class = $this->ctrl->getNextClass($this);
     $cmd = $this->ctrl->getCmd();
     switch ($next_class) {
         case "ilpageobjectgui":
             $page_gui = new ilPageObjectGUI("wpg", $this->getPageObject()->getId(), $this->getPageObject()->old_nr);
             return $ilCtrl->forwardCommand($page_gui);
         default:
             return parent::executeCommand();
     }
 }
 /**
  * execute command
  */
 function &executeCommand()
 {
     global $ilCtrl;
     $next_class = $this->ctrl->getNextClass($this);
     $cmd = $this->ctrl->getCmd();
     switch ($next_class) {
         case 'ilmdeditorgui':
             return parent::executeCommand();
             break;
         case "ilpageobjectgui":
             die("ilPageLayoutGUI forward to ilpageobjectgui error.");
             return;
         default:
             $html = parent::executeCommand();
             return $html;
     }
 }
Пример #6
0
 /**
  * execute command
  */
 function executeCommand()
 {
     global $ilCtrl, $ilLocator, $lng;
     if ($_REQUEST["baseClass"] == "ilImprintGUI") {
         $this->renderFullscreen();
     }
     $next_class = $ilCtrl->getNextClass($this);
     $title = $lng->txt("adm_imprint");
     switch ($next_class) {
         case "ilpageobjectgui":
             die("Deprecated. ilImprintGUI gui forwarding to ilpageobject");
             return;
         default:
             $this->setPresentationTitle($title);
             $ilLocator->addItem($title, $ilCtrl->getLinkTarget($this, "preview"));
             return parent::executeCommand();
     }
 }
 /**
  * execute command
  */
 function executeCommand()
 {
     global $ilCtrl, $ilLocator, $lng;
     if ($_REQUEST["baseClass"] == "ilImprintGUI") {
         $this->renderFullscreen();
     }
     $next_class = $ilCtrl->getNextClass($this);
     $title = $lng->txt("adm_imprint");
     switch ($next_class) {
         case "ilpageobjectgui":
             $page_gui = new ilPageObjectGUI("impr", $this->getPageObject()->getId(), $this->getPageObject()->old_nr);
             $this->setPresentationTitle($title);
             return $ilCtrl->forwardCommand($page_gui);
         default:
             $this->setPresentationTitle($title);
             $ilLocator->addItem($title, $ilCtrl->getLinkTarget($this, "preview"));
             return parent::executeCommand();
     }
 }
 /**
  * execute command
  */
 public function executeCommand()
 {
     global $ilLocator, $lng;
     $next_class = $this->ctrl->getNextClass($this);
     $viewdef = $this->getPageObject();
     if ($viewdef) {
         $this->ctrl->setParameter($this, "dclv", $viewdef->getId());
         $title = $lng->txt("dcl_view_viewdefinition");
     }
     switch ($next_class) {
         case "ilpageobjectgui":
             throw new ilCOPageException("Deprecated. ilDataCollectionRecordViewViewdefinitionGUI gui forwarding to ilpageobject");
         default:
             if ($viewdef) {
                 $this->setPresentationTitle($title);
                 $ilLocator->addItem($title, $this->ctrl->getLinkTarget($this, "preview"));
             }
             return parent::executeCommand();
     }
 }
 /**
  * execute command
  */
 function &executeCommand()
 {
     global $ilCtrl;
     $next_class = $this->ctrl->getNextClass($this);
     $cmd = $this->ctrl->getCmd();
     switch ($next_class) {
         case 'ilmdeditorgui':
             return parent::executeCommand();
             break;
         case "ilpageobjectgui":
             // "stys" was "sahs" before
             $page_gui = new ilPageObjectGUI("stys", $this->getPageObject()->getId(), $this->getPageObject()->old_nr);
             $page_gui->setStyleId($this->getStyleId());
             $html = $ilCtrl->forwardCommand($page_gui);
             return $html;
         default:
             $html = parent::executeCommand();
             return $html;
     }
 }
Пример #10
0
 /**
  * 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();
     }
 }
 /**
  * execute command
  */
 public function executeCommand()
 {
     global $ilCtrl, $ilLocator, $tpl, $lng;
     $next_class = $ilCtrl->getNextClass($this);
     $cmd = $ilCtrl->getCmd();
     $viewdef = $this->getPageObject();
     if ($viewdef) {
         $ilCtrl->setParameter($this, "dclv", $viewdef->getId());
         $title = $lng->txt("dcl_view_viewdefinition");
     }
     switch ($next_class) {
         case "ilpageobjectgui":
             $page_gui = new ilPageObjectGUI("dclf", $this->getPageObject()->getId(), $this->getPageObject()->old_nr);
             if ($viewdef) {
                 $this->setPresentationTitle($title);
             }
             return $ilCtrl->forwardCommand($page_gui);
         default:
             if ($viewdef) {
                 $this->setPresentationTitle($title);
                 // $tpl->setTitle($title);
                 $ilLocator->addItem($title, $ilCtrl->getLinkTarget($this, "preview"));
             }
             return parent::executeCommand();
     }
 }
Пример #12
0
 /**
  * execute command
  */
 function executeCommand()
 {
     global $ilCtrl, $ilTabs, $ilLocator, $tpl;
     $next_class = $ilCtrl->getNextClass($this);
     $cmd = $ilCtrl->getCmd();
     $posting = $this->getBlogPosting();
     $ilCtrl->setParameter($this, "blpg", $posting->getId());
     switch ($next_class) {
         case "ilnotegui":
             // $this->getTabs();
             // $ilTabs->setTabActive("pg");
             return $this->previewFullscreen();
             /*
             case "ilratinggui":
             	include_once("./Services/Rating/classes/class.ilRatingGUI.php");
             	$rating_gui = new ilRatingGUI();
             	$rating_gui->setObject($this->getBlogPosting()->getParentId(), "blog",
             		$this->getBlogPosting()->getId(), "blp");
             	$this->ctrl->forwardCommand($rating_gui);
             	$ilCtrl->redirect($this, "preview");
             	break;
             */
         /*
         case "ilratinggui":
         	include_once("./Services/Rating/classes/class.ilRatingGUI.php");
         	$rating_gui = new ilRatingGUI();
         	$rating_gui->setObject($this->getBlogPosting()->getParentId(), "blog",
         		$this->getBlogPosting()->getId(), "blp");
         	$this->ctrl->forwardCommand($rating_gui);
         	$ilCtrl->redirect($this, "preview");
         	break;
         */
         case "ilpageobjectgui":
             die("Deprecated. Blog Posting gui forwarding to ilpageobject");
             return;
         default:
             if ($posting) {
                 $this->setPresentationTitle($posting->getTitle());
                 $tpl->setTitle(ilObject::_lookupTitle($this->getBlogPosting()->getBlogId()) . ": " . $posting->getTitle());
                 $tpl->setTitleIcon(ilUtil::getImagePath("icon_blog.svg"), $this->lng->txt("obj_blog"));
                 // #12879
                 $ilLocator->addItem($posting->getTitle(), $ilCtrl->getLinkTarget($this, "preview"));
             }
             return parent::executeCommand();
     }
 }
 function &executeCommand()
 {
     global $ilCtrl, $ilTabs, $ilUser, $lng;
     $next_class = $this->ctrl->getNextClass($this);
     $cmd = $this->ctrl->getCmd();
     switch ($next_class) {
         case 'ilobjquestionpoolgui':
             $nodeParts = explode(':', $_GET['cmdNode']);
             $params = array('ref_id' => $_GET['ref_id'], 'calling_test' => $_GET['ref_id'], 'q_id' => $_GET['q_id'], 'cmd' => $_GET['cmd'], 'cmdClass' => $_GET['cmdClass'], 'cmdNode' => $nodeParts[count($nodeParts) - 2] . ':' . $nodeParts[count($nodeParts) - 1], 'baseClass' => 'ilObjQuestionPoolGUI', 'test_express_mode' => '1');
             ilUtil::redirect('ilias.php?' . http_build_query($params, null, '&'));
             break;
         case "ilpageeditorgui":
             if (!$this->getEnableEditing()) {
                 ilUtil::sendFailure($lng->txt("permission_denied"), true);
                 $ilCtrl->redirect($this, "preview");
             }
             $page_editor =& new ilPageEditorGUI($this->getPageObject(), $this);
             $page_editor->setLocator($this->locator);
             $page_editor->setHeader($this->getHeader());
             $page_editor->setPageBackTitle($this->page_back_title);
             $page_editor->setEnableInternalLinks($this->getEnabledInternalLinks());
             $page_editor->setEnableKeywords($this->getEnableKeywords());
             $page_editor->setIntLinkHelpDefault($this->int_link_def_type, $this->int_link_def_id);
             $page_editor->setIntLinkReturn($this->int_link_return);
             $this->ctrl->saveParameterByClass('ilpageeditorgui', 'q_mode');
             $ret =& $this->ctrl->forwardCommand($page_editor);
             break;
         case '':
         case 'iltestexpresspageobjectgui':
             include_once 'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
             if ($cmd == 'view') {
                 $cmd = 'showPage';
             }
             $q_gui =& assQuestionGUI::_getQuestionGUI('', $_REQUEST["q_id"]);
             if ($q_gui->object) {
                 $obj = ilObjectFactory::getInstanceByRefId($_REQUEST['ref_id']);
                 $q_gui->object->setObjId($obj->getId());
             }
             if (in_array($cmd, array('handleToolbarCommand', 'addQuestion', 'questions', 'insertQuestions', 'browseForQuestions', 'filterAvailableQuestions', 'resetfilterAvailableQuestions'))) {
                 return $this->{$cmd}();
             } else {
                 if ($q_gui->object) {
                     $total = $this->test_object->evalTotalPersons();
                     $this->setOutputMode($total == 0 ? IL_PAGE_EDIT : IL_PAGE_PREVIEW);
                     if ($total != 0) {
                         $link = $ilCtrl->getLinkTargetByClass('ilobjtestgui', "participants");
                         $link = "<a href=\"" . $link . "\">" . $lng->txt("test_has_datasets_warning_page_view_link") . "</a>";
                         ilUtil::sendInfo($lng->txt("test_has_datasets_warning_page_view") . " " . $link);
                     }
                     if (in_array($cmd, array('view', 'showPage')) || $cmd == 'edit' && $this->test_object->evalTotalPersons()) {
                         return $this->showPage();
                     }
                     return parent::executeCommand();
                 }
             }
             break;
         default:
             $qtype = $_REQUEST['qtype'];
             $type = ilObjQuestionPool::getQuestionTypeByTypeId($qtype);
             if (!$_GET['q_id']) {
                 $q_gui = $this->addPageOfQuestions(preg_replace('/(.*?)gui/i', '$1', $_GET['sel_question_types']));
                 $q_gui->setQuestionTabs();
                 $ret = $this->ctrl->forwardCommand($q_gui);
                 break;
             } else {
             }
             $this->ctrl->setReturn($this, "questions");
             include_once "./Modules/TestQuestionPool/classes/class.assQuestionGUI.php";
             $q_gui =& assQuestionGUI::_getQuestionGUI($type, $_GET["q_id"]);
             if ($q_gui->object) {
                 $obj = ilObjectFactory::getInstanceByRefId($_GET['ref_id']);
                 $q_gui->object->setObjId($obj->getId());
             }
             $this->ctrl->saveParameterByClass('ilpageeditorgui', 'q_id');
             $this->ctrl->saveParameterByClass('ilpageeditorgui', 'q_mode');
             $q_gui->setQuestionTabs();
             $ret =& $this->ctrl->forwardCommand($q_gui);
             break;
     }
 }
 /**
  * execute command
  */
 function &executeCommand()
 {
     global $ilCtrl, $ilTabs, $ilUser;
     $next_class = $this->ctrl->getNextClass($this);
     $cmd = $this->ctrl->getCmd();
     switch ($next_class) {
         case "ilobjbloggui":
             include_once "Modules/Blog/classes/class.ilObjBlogGUI.php";
             $blog_gui = new ilObjBlogGUI((int) $this->getPageObject()->getTitle(), ilObjBlogGUI::WORKSPACE_OBJECT_ID);
             $blog_gui->disableNotes(!$this->enable_comments);
             return $ilCtrl->forwardCommand($blog_gui);
         case "ilpageobjectgui":
             $page_gui = new ilPageObjectGUI("prtf", $this->getPageObject()->getId(), $this->getPageObject()->old_nr);
             $page_gui->setPresentationTitle($this->getPageObject()->getTitle());
             return $ilCtrl->forwardCommand($page_gui);
         default:
             $this->setPresentationTitle($this->getPageObject()->getTitle());
             return parent::executeCommand();
     }
 }
Пример #15
0
 /**
  * execute command
  */
 function &executeCommand()
 {
     global $ilCtrl, $ilTabs, $ilUser, $ilAccess;
     $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");
             $rating_gui->setUpdateCallback(array($this, "updateStatsRating"));
             $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;
         case "ilwikistatgui":
             if ($ilAccess->checkAccess("statistics_read", "", $this->wiki_ref_id)) {
                 $this->tabs_gui->clearTargets();
                 // see ilObjWikiGUI::getTabs()
                 $this->getTabs("statistics");
                 include_once "Modules/Wiki/classes/class.ilWikiStatGUI.php";
                 $gui = new ilWikiStatGUI($this->getPageObject()->getParentId(), $this->getPageObject()->getId());
                 $this->ctrl->forwardCommand($gui);
             }
             break;
         default:
             if (strtolower($ilCtrl->getNextClass()) == "ilpageeditorgui") {
                 self::initEditingJS($this->tpl);
             }
             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();
     }
 }
 /**
  * execute command
  */
 function executeCommand()
 {
     global $ilCtrl, $ilTabs, $ilLocator, $tpl;
     $next_class = $ilCtrl->getNextClass($this);
     $cmd = $ilCtrl->getCmd();
     $posting = $this->getBlogPosting();
     $ilCtrl->setParameter($this, "blpg", $posting->getId());
     switch ($next_class) {
         case "ilnotegui":
             // $this->getTabs();
             // $ilTabs->setTabActive("pg");
             return $this->previewFullscreen();
             /*
             case "ilratinggui":
             	include_once("./Services/Rating/classes/class.ilRatingGUI.php");
             	$rating_gui = new ilRatingGUI();
             	$rating_gui->setObject($this->getBlogPosting()->getParentId(), "blog",
             		$this->getBlogPosting()->getId(), "blp");
             	$this->ctrl->forwardCommand($rating_gui);
             	$ilCtrl->redirect($this, "preview");
             	break;
             */
         /*
         case "ilratinggui":
         	include_once("./Services/Rating/classes/class.ilRatingGUI.php");
         	$rating_gui = new ilRatingGUI();
         	$rating_gui->setObject($this->getBlogPosting()->getParentId(), "blog",
         		$this->getBlogPosting()->getId(), "blp");
         	$this->ctrl->forwardCommand($rating_gui);
         	$ilCtrl->redirect($this, "preview");
         	break;
         */
         case "ilpageobjectgui":
             $page_gui = new ilPageObjectGUI("blp", $this->getPageObject()->getId(), $this->getPageObject()->old_nr);
             if ($posting) {
                 $this->setPresentationTitle($posting->getTitle());
             }
             return $ilCtrl->forwardCommand($page_gui);
         default:
             if ($posting) {
                 $this->setPresentationTitle($posting->getTitle());
                 $tpl->setTitle(ilObject::_lookupTitle($this->getBlogPosting()->getBlogId()) . " - " . $posting->getTitle());
                 $ilLocator->addItem($posting->getTitle(), $ilCtrl->getLinkTarget($this, "preview"));
             }
             return parent::executeCommand();
     }
 }