Exemplo n.º 1
0
 /**
  * View folder
  */
 function viewObject()
 {
     global $tree;
     $this->checkPermission('read');
     if (strtolower($_GET["baseClass"]) == "iladministrationgui") {
         parent::viewObject();
         return true;
     }
     $this->renderObject();
     $this->tabs_gui->setTabActive('view_content');
     return true;
 }
Exemplo n.º 2
0
 function viewObject()
 {
     global $rbacsystem, $ilUser, $ilCtrl;
     // CHECK ACCESS
     $this->checkPermission('read', 'view');
     /*
     if(!$rbacsystem->checkAccess("read",$this->object->getRefId()))
     {
     	$this->ilias->raiseError($this->lng->txt("msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
     }
     */
     if (strtolower($_GET["baseClass"]) == "iladministrationgui") {
         parent::viewObject();
         return true;
     }
     // Fill meta header tags
     include_once 'Services/MetaData/classes/class.ilMDUtils.php';
     ilMDUtils::_fillHTMLMetaTags($this->object->getId(), $this->object->getId(), 'crs');
     // Trac access
     if ($ilCtrl->getNextClass() != "ilcolumngui") {
         include_once 'Services/Tracking/classes/class.ilLearningProgress.php';
         ilLearningProgress::_tracProgress($ilUser->getId(), $this->object->getId(), $this->object->getRefId(), 'crs');
     }
     if (!$this->checkAgreement()) {
         include_once 'Services/Membership/classes/class.ilMemberAgreementGUI.php';
         $this->tabs_gui->clearTargets();
         $this->ctrl->setReturn($this, 'view_content');
         $agreement = new ilMemberAgreementGUI($this->object->getRefId());
         $this->ctrl->setCmdClass(get_class($agreement));
         $this->ctrl->forwardCommand($agreement);
         return true;
     }
     if (!$this->__checkStartObjects()) {
         include_once "Services/Container/classes/class.ilContainerStartObjectsContentGUI.php";
         $stgui = new ilContainerStartObjectsContentGUI($this->object);
         $stgui->enableDesktop($this->object->getAboStatus(), $this);
         return $stgui->getHTML();
     }
     // views handled by general container logic
     if ($this->object->getViewMode() == ilContainer::VIEW_SIMPLE || $this->object->getViewMode() == ilContainer::VIEW_BY_TYPE || $this->object->getViewMode() == ilContainer::VIEW_SESSIONS || $this->object->getViewMode() == ilContainer::VIEW_TIMING || $this->object->getViewMode() == ilContainer::VIEW_OBJECTIVE) {
         $ret = parent::renderObject();
         return $ret;
     } else {
         include_once './Modules/Course/classes/class.ilCourseContentGUI.php';
         $course_content_obj = new ilCourseContentGUI($this);
         $this->ctrl->setCmdClass(get_class($course_content_obj));
         $this->ctrl->forwardCommand($course_content_obj);
     }
     return true;
 }
 public function viewObject()
 {
     global $ilCtrl, $ilNavigationHistory, $ilAccess;
     if (!$ilAccess->checkAccess('read', '', $this->object->getRefId())) {
         $this->ilias->raiseError($this->lng->txt('msg_no_perm_read'), $this->ilias->error_obj->MESSAGE);
     }
     // add entry to navigation history
     if (!$this->getCreationMode() && $ilAccess->checkAccess('read', '', $this->object->getRefId())) {
         $ilNavigationHistory->addItem($this->object->getRefId(), 'ilias.php?baseClass=ilRepositoryGUI&cmd=view&ref_id=' . $this->object->getRefId(), 'icrs');
     }
     if (strtolower($_GET['baseClass']) == 'iladministrationgui') {
         parent::viewObject();
         return true;
     }
     return $this->renderObject();
 }
 function viewObject()
 {
     global $tree, $rbacsystem, $ilUser;
     include_once 'Services/Tracking/classes/class.ilLearningProgress.php';
     ilLearningProgress::_tracProgress($ilUser->getId(), $this->object->getId(), $this->object->getRefId(), 'grp');
     if (strtolower($_GET["baseClass"]) == "iladministrationgui") {
         parent::viewObject();
         return true;
     }
     if (!$this->checkAgreement()) {
         include_once 'Services/Membership/classes/class.ilMemberAgreementGUI.php';
         $this->tabs_gui->setTabActive('view_content');
         $this->ctrl->setReturn($this, 'view');
         $agreement = new ilMemberAgreementGUI($this->object->getRefId());
         $this->ctrl->setCmdClass(get_class($agreement));
         $this->ctrl->forwardCommand($agreement);
         return true;
     }
     $this->tabs_gui->setTabActive('view_content');
     $this->renderObject();
 }