Example #1
0
 /**
  * constructor
  */
 public function __construct(cs_environment $environment)
 {
     // call parent
     parent::__construct($environment);
     // deativate debug information
     global $c_show_debug_infos;
     $c_show_debug_infos = false;
     // set output mode
     $this->_environment->setOutputMode('JSON');
 }
Example #2
0
 protected function processTemplate()
 {
     // rubric information for room navigation
     $this->assign('room', 'rubric_information', $this->getRubricInformation());
     // TODO: implement old commsy check - calling rubrics not set as active
     $params = $this->_environment->getCurrentParameterArray();
     if (!empty($params['with_modifying_actions'])) {
         $this->_with_modifying_actions = $params['with_modifying_actions'];
     }
     $current_context = $this->_environment->getCurrentContextItem();
     $current_user = $this->_environment->getCurrentUserItem();
     if ($current_context->isClosed() || $current_user->isOnlyReadUser() or $current_context->isLocked()) {
         $this->_with_modifying_actions = false;
     }
     // check room context
     if (!$this->_environment->inProjectRoom() && !$this->_environment->inCommunityRoom() && !$this->_environment->inPrivateRoom() && !$this->_environment->inGroupRoom()) {
         die('you are not in room context, so no room template should be processed');
     }
     // call parent
     parent::processTemplate();
     // room information
     $this->assign('room', 'room_information', $this->getRoomInformation());
     // sidebar information
     $this->setupSidebarInformation();
     // addon information
     $this->assign('room', 'addon_information', $this->getAddonInformation());
     // second navigation information
     $this->assign('room', 'second_navigation', $this->getSecondNavigationInformation());
     // set assessment status
     $this->assign('room', 'assessment', $current_context->isAssessmentActive());
     // set workflow status
     $this->assign('room', 'workflow', $current_context->withWorkflow());
     $this->assign('room', 'usage_info_content', $this->getUsageInfoContent());
     $current_user = $this->_environment->getCurrentUserItem();
     $current_context_id = $this->_environment->getCurrentContextID();
     $own_room_item = $current_user->getOwnRoom();
     if ($own_room_item != null) {
         // sonst kommt der root-user nicht mehr in den Raum.
         if ($own_room_item->getCSBarShowOldRoomSwitcher() === '1') {
             $this->assign('room', 'room_switcher_select_box', $this->_getUserPersonalAreaAsHTML());
             $this->assign('room', 'old_room_switcher', 'yes');
         }
     }
 }
 public function processTemplate()
 {
     // call parent
     parent::processTemplate();
 }