コード例 #1
0
 /**
  * Get item properties
  *
  * @return	array		array of property arrays:
  *						"alert" (boolean) => display as an alert property (usually in red)
  *						"property" (string) => property name
  *						"value" (string) => property value
  */
 function getProperties()
 {
     global $lng, $ilUser;
     $props = parent::getProperties();
     // offline
     include_once 'Modules/Course/classes/class.ilObjCourseAccess.php';
     if (ilObjCourseAccess::_isOffline($this->obj_id)) {
         $showRegistrationInfo = false;
         $props[] = array("alert" => true, "property" => $lng->txt("status"), "value" => $lng->txt("offline"));
     }
     // blocked
     include_once 'Modules/Course/classes/class.ilCourseParticipant.php';
     $members = ilCourseParticipant::_getInstanceByObjId($this->obj_id, $ilUser->getId());
     if ($members->isBlocked($ilUser->getId()) and $members->isAssigned($ilUser->getId())) {
         $props[] = array("alert" => true, "property" => $lng->txt("member_status"), "value" => $lng->txt("crs_status_blocked"));
     }
     // pending subscription
     include_once 'Modules/Course/classes/class.ilCourseParticipants.php';
     if (ilCourseParticipants::_isSubscriber($this->obj_id, $ilUser->getId())) {
         $props[] = array("alert" => true, "property" => $lng->txt("member_status"), "value" => $lng->txt("crs_status_pending"));
     }
     include_once './Modules/Course/classes/class.ilObjCourseAccess.php';
     $info = ilObjCourseAccess::lookupRegistrationInfo($this->obj_id);
     if ($info['reg_info_list_prop']) {
         $props[] = array('alert' => false, 'newline' => true, 'property' => $info['reg_info_list_prop']['property'], 'value' => $info['reg_info_list_prop']['value']);
     }
     if ($info['reg_info_list_prop_limit']) {
         $props[] = array('alert' => false, 'newline' => false, 'property' => $info['reg_info_list_prop_limit']['property'], 'propertyNameVisible' => strlen($info['reg_info_list_prop_limit']['property']) ? true : false, 'value' => $info['reg_info_list_prop_limit']['value']);
     }
     // waiting list
     include_once './Modules/Course/classes/class.ilCourseWaitingList.php';
     if (ilCourseWaitingList::_isOnList($ilUser->getId(), $this->obj_id)) {
         $props[] = array("alert" => true, "property" => $lng->txt('member_status'), "value" => $lng->txt('on_waiting_list'));
     }
     // check for certificates
     include_once "./Modules/Course/classes/class.ilCourseCertificateAdapter.php";
     if (ilCourseCertificateAdapter::_hasUserCertificate($ilUser->getId(), $this->obj_id)) {
         $lng->loadLanguageModule('certificate');
         $cmd_link = "ilias.php?baseClass=ilRepositoryGUI&ref_id=" . $this->ref_id . "&cmd=deliverCertificate";
         $props[] = array("alert" => false, "property" => $lng->txt("passed"), "value" => '<a href="' . $cmd_link . '">' . $lng->txt("download_certificate") . '</a>');
     }
     return $props;
 }
コード例 #2
0
 /**
  * Init course member object
  * @global ilObjUser $ilUser
  * @return <type>
  */
 protected function initCourseMemberObject()
 {
     global $ilUser;
     include_once "./Modules/Course/classes/class.ilCourseParticipant.php";
     $this->member_obj = ilCourseParticipant::_getInstanceByObjId($this->getId(), $ilUser->getId());
     return true;
 }
コード例 #3
0
 function _checkGoto($a_target)
 {
     global $objDefinition, $ilPluginAdmin, $ilUser;
     if (is_object($ilPluginAdmin)) {
         // get user interface plugins
         $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
         // search
         foreach ($pl_names as $pl) {
             $ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
             $gui_class = $ui_plugin->getUIClassInstance();
             $resp = $gui_class->checkGotoHook($a_target);
             if ($resp["target"] !== false) {
                 $a_target = $resp["target"];
                 break;
             }
         }
     }
     if ($a_target == "") {
         return false;
     }
     $t_arr = explode("_", $a_target);
     $type = $t_arr[0];
     if ($type == "git") {
         $type = "glo";
     }
     if ($type == "pg" | $type == "st") {
         $type = "lm";
     }
     $class = $objDefinition->getClassName($type);
     if ($class == "") {
         return false;
     }
     $location = $objDefinition->getLocation($type);
     $full_class = "ilObj" . $class . "Access";
     include_once $location . "/class." . $full_class . ".php";
     $ret = call_user_func(array($full_class, "_checkGoto"), $a_target);
     // if no access and repository object => check for parent course/group
     if (!$ret && !stristr($a_target, "_wsp") && $ilUser->getId() != ANONYMOUS_USER_ID && !$objDefinition->isAdministrationObject($type) && $objDefinition->isRBACObject($type) && $t_arr[1]) {
         global $tree, $rbacsystem, $ilAccess;
         // original type "pg" => pg_<page_id>[_<ref_id>]
         if ($t_arr[0] == "pg") {
             if (isset($t_arr[2])) {
                 $ref_id = $t_arr[2];
             } else {
                 $lm_id = ilLMObject::_lookupContObjID($t_arr[1]);
                 $ref_id = ilObject::_getAllReferences($lm_id);
                 if ($ref_id) {
                     $ref_id = array_shift($ref_id);
                 }
             }
         } else {
             $ref_id = $t_arr[1];
         }
         include_once "Services/Membership/classes/class.ilParticipants.php";
         $block_obj = array();
         // walk path to find parent container
         $path = $tree->getPathId($ref_id);
         array_pop($path);
         foreach ($path as $path_ref_id) {
             $redirect_infopage = false;
             $add_member_role = false;
             $ptype = ilObject::_lookupType($path_ref_id, true);
             $pobj_id = ilObject::_lookupObjId($path_ref_id);
             // core checks: timings/object-specific
             if (!$ilAccess->doActivationCheck("read", "", $path_ref_id, $ilUser->getId(), $pobj_id, $ptype) || !$ilAccess->doStatusCheck("read", "", $path_ref_id, $ilUser->getId(), $pobj_id, $ptype)) {
                 // object in path is inaccessible - aborting
                 return false;
             } else {
                 if ($ptype == "crs") {
                     // check if already participant
                     include_once "Modules/Course/classes/class.ilCourseParticipant.php";
                     $participants = new ilCourseParticipant($pobj_id, $ilUser->getId());
                     if (!$participants->isAssigned()) {
                         // subscription currently possible?
                         include_once "Modules/Course/classes/class.ilObjCourse.php";
                         if (ilObjCourse::_isActivated($pobj_id) && ilObjCourse::_registrationEnabled($pobj_id)) {
                             $block_obj[] = $path_ref_id;
                             $add_member_role = true;
                         } else {
                             $redirect_infopage = true;
                         }
                     }
                 } else {
                     if ($ptype == "grp") {
                         // check if already participant
                         include_once "Modules/Group/classes/class.ilGroupParticipants.php";
                         if (!ilGroupParticipants::_isParticipant($path_ref_id, $ilUser->getId())) {
                             // subscription currently possible?
                             include_once "Modules/Group/classes/class.ilObjGroup.php";
                             $group_obj = new ilObjGroup($path_ref_id);
                             if ($group_obj->isRegistrationEnabled()) {
                                 $block_obj[] = $path_ref_id;
                                 $add_member_role = true;
                             } else {
                                 $redirect_infopage = true;
                             }
                         }
                     }
                 }
             }
             // add members roles for all "blocking" objects
             if ($add_member_role) {
                 // cannot join? goto will never work, so redirect to current object
                 $rbacsystem->resetPACache($ilUser->getId(), $path_ref_id);
                 if (!$rbacsystem->checkAccess("join", $path_ref_id)) {
                     $redirect_infopage = true;
                 } else {
                     $rbacsystem->addTemporaryRole($ilUser->getId(), ilParticipants::getDefaultMemberRole($path_ref_id));
                 }
             }
             // redirect to infopage of 1st blocking object in path
             if ($redirect_infopage) {
                 if ($rbacsystem->checkAccess("visible", $path_ref_id)) {
                     ilUtil::redirect("ilias.php?baseClass=ilRepositoryGUI" . "&ref_id=" . $path_ref_id . "&cmd=infoScreen");
                 } else {
                     return false;
                 }
             }
         }
         // check if access will be possible with all (possible) member roles added
         $rbacsystem->resetPACache($ilUser->getId(), $ref_id);
         if ($rbacsystem->checkAccess("read", $ref_id) && sizeof($block_obj)) {
             // this won't work with lm-pages (see above)
             // include_once "Services/Link/classes/class.ilLink.php";
             // $_SESSION["pending_goto"] = ilLink::_getStaticLink($ref_id, $type);
             // keep original target
             $_SESSION["pending_goto"] = "goto.php?target=" . $a_target;
             // redirect to 1st non-member object in path
             ilUtil::redirect("ilias.php?baseClass=ilRepositoryGUI" . "&ref_id=" . array_shift($block_obj));
         }
     }
     return $ret;
 }
コード例 #4
0
 /**
  * Lookup registration info
  * @global ilDB $ilDB
  * @global ilObjUser $ilUser
  * @global ilLanguage $lng
  * @param int $a_obj_id
  * @return array
  */
 public static function lookupRegistrationInfo($a_obj_id)
 {
     global $ilDB, $ilUser, $lng;
     $query = 'SELECT sub_limitation_type, sub_start, sub_end, sub_mem_limit, sub_max_members FROM crs_settings ' . 'WHERE obj_id = ' . $ilDB->quote($a_obj_id);
     $res = $ilDB->query($query);
     $info = array();
     while ($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) {
         $info['reg_info_start'] = new ilDateTime($row->sub_start, IL_CAL_UNIX);
         $info['reg_info_end'] = new ilDateTime($row->sub_end, IL_CAL_UNIX);
         $info['reg_info_type'] = $row->sub_limitation_type;
         $info['reg_info_max_members'] = $row->sub_max_members;
         $info['reg_info_mem_limit'] = $row->sub_mem_limit;
     }
     $registration_possible = true;
     // Limited registration
     if ($info['reg_info_type'] == ilCourseConstants::SUBSCRIPTION_LIMITED) {
         $dt = new ilDateTime(time(), IL_CAL_UNIX);
         if (ilDateTime::_before($dt, $info['reg_info_start'])) {
             $info['reg_info_list_prop']['property'] = $lng->txt('crs_list_reg_start');
             $info['reg_info_list_prop']['value'] = ilDatePresentation::formatDate($info['reg_info_start']);
         } elseif (ilDateTime::_before($dt, $info['reg_info_end'])) {
             $info['reg_info_list_prop']['property'] = $lng->txt('crs_list_reg_end');
             $info['reg_info_list_prop']['value'] = ilDatePresentation::formatDate($info['reg_info_end']);
         } else {
             $registration_possible = false;
             $info['reg_info_list_prop']['property'] = $lng->txt('crs_list_reg_period');
             $info['reg_info_list_prop']['value'] = $lng->txt('crs_list_reg_noreg');
         }
     } else {
         if ($info['reg_info_type'] == ilCourseConstants::SUBSCRIPTION_UNLIMITED) {
             $registration_possible = true;
         } else {
             $registration_possible = false;
             $info['reg_info_list_prop']['property'] = $lng->txt('crs_list_reg_period');
             $info['reg_info_list_prop']['value'] = $lng->txt('crs_list_reg_noreg');
         }
     }
     if ($info['reg_info_mem_limit'] && $registration_possible) {
         // Check if users are on waiting list
         // @todo
         // Check for free places
         $part = ilCourseParticipant::_getInstanceByObjId($a_obj_id, $ilUser->getId());
         if ($part->getNumberOfMembers() <= $info['reg_info_max_members']) {
             $info['reg_info_list_prop_limit']['property'] = $lng->txt('crs_list_reg_limit_places');
             $info['reg_info_list_prop_limit']['value'] = max(0, $info['reg_info_max_members'] - $part->getNumberOfMembers());
         } else {
             $info['reg_info_list_prop_limit']['property'] = '';
             $info['reg_info_list_prop_limit']['value'] = $lng->txt('crs_list_reg_limit_full');
         }
     }
     return $info;
 }
コード例 #5
0
 /**
  * check if a certain user has already answerd a certain barometer
  */
 function canVote($a_user_id, $a_fb_id)
 {
     global $ilDB, $ilUser;
     $q = "SELECT * FROM feedback_results WHERE " . "fb_id = " . $ilDB->quote($a_fb_id, "integer") . " AND " . "user_id = " . $ilDB->quote($a_user_id, "integer") . " ORDER BY votetime DESC";
     $res = $ilDB->query($q);
     $row_results = $ilDB->fetchAssoc($res);
     $q = "SELECT * FROM feedback_items WHERE " . "fb_id = " . $ilDB->quote($a_fb_id, "integer");
     $res1 = $ilDB->query($q);
     $row_items = $ilDB->fetchAssoc($res1);
     // check end time
     if (!($row_items["starttime"] <= time() && $row_items["endtime"] >= time())) {
         return 0;
     }
     include_once 'Modules/Course/classes/class.ilCourseParticipant.php';
     $members_obj = ilCourseParticipant::_getInstanceByObjId($row_items['obj_id'], $ilUser->getId());
     //Check if the user is Member of that course, otherwise its not necessary that he votes
     if ($res->numRows() == 0 && $members_obj->isAssigned()) {
         return 1;
     }
     if ($members_obj->isAssigned()) {
         if ($row_items['repeat_interval'] > 0) {
             $interval = $this->interval2seconds($row_items['repeat_interval'], $row_items['interval_unit']);
             if (time() - $row_results['votetime'] >= $interval) {
                 return 1;
             }
         }
     }
     return 0;
 }
コード例 #6
0
 /**
  * Group assignmnents
  * @param type $a_parameter
  * @return boolean
  */
 protected function handleGroupAssignMember($a_parameter)
 {
     ilLoggerFactory::getLogger('fhoevevent')->debug('Listening to event add participant from group!');
     $ref_id = $this->lookupRefId($a_parameter['obj_id']);
     $parent_course_ref = $GLOBALS['tree']->checkForParentType($ref_id, 'crs');
     if (!$parent_course_ref) {
         ilLoggerFactory::getLogger('fhoevevent')->debug('No parent course found.');
         return FALSE;
     }
     if (!$this->isMainCourse($parent_course_ref)) {
         return FALSE;
     }
     include_once './Modules/Course/classes/class.ilCourseParticipant.php';
     $part = ilCourseParticipant::_getInstanceByObjId(ilObject::_lookupObjId($parent_course_ref), $a_parameter['usr_id']);
     if ($part->isParticipant()) {
         ilLoggerFactory::getLogger('fhoevevent')->debug('User is already assigned to main course.');
         return false;
     }
     // Assign to dtpl local role
     foreach ($GLOBALS['rbacreview']->getRolesOfObject($parent_course_ref, TRUE) as $role_id) {
         // assign as course member
         $role_title = ilObject::_lookupTitle($role_id);
         if (substr($role_title, 0, 7) !== 'il_crs_') {
             $GLOBALS['rbacreview']->clearCaches();
             if (!$GLOBALS['rbacreview']->isAssigned($a_parameter['usr_id'], $role_id)) {
                 $GLOBALS['rbacadmin']->assignUser($role_id, $a_parameter['usr_id']);
                 ilLoggerFactory::getLogger('fhoevevent')->info('Assigning user ' . $a_parameter['usr_id'] . 'to course ' . ilObject::_lookupTitle(ilObject::_lookupObjId($parent_course_ref, true)));
             }
         }
     }
 }
コード例 #7
0
 function _isRequiredFeedbackOnLogin()
 {
     global $ilUser;
     include_once 'Services/Feedback/classes/class.ilFeedback.php';
     include_once 'Modules/Course/classes/class.ilCourseParticipant.php';
     $feedback = new ilFeedback();
     $feedback->getFeedback();
     $members_obj = ilCourseParticipant::_getInstanceByObjId($feedback->getObjId(), $ilUser->getId());
     if ($feedback->getId() && $members_obj->isAssigned()) {
         return $feedback->getRefId();
     } else {
         return 0;
     }
 }
コード例 #8
0
 /**
  * user has admin permission or "edit permission" permission on this course
  * @return bool
  */
 protected function hasAdminPermission()
 {
     global $ilUser;
     return ilCourseParticipant::_getInstanceByObjId($this->object->getId(), $ilUser->getId())->isAdmin() or $this->checkPermissionBool('edit_permission');
 }
コード例 #9
0
 function executeCommand()
 {
     global $rbacsystem, $ilUser, $ilAccess, $ilErr, $ilTabs, $ilNavigationHistory, $ilCtrl;
     $next_class = $this->ctrl->getNextClass($this);
     $cmd = $this->ctrl->getCmd();
     $this->prepareOutput();
     // add entry to navigation history
     if (!$this->getCreationMode() && $ilAccess->checkAccess('read', '', $_GET['ref_id'])) {
         $link = $ilCtrl->getLinkTargetByClass("ilrepositorygui", "frameset");
         $ilNavigationHistory->addItem($_GET['ref_id'], $link, 'crs');
     }
     if (!$this->getCreationMode()) {
         if (IS_PAYMENT_ENABLED) {
             include_once 'Services/Payment/classes/class.ilPaymentObject.php';
             if (ilPaymentObject::_requiresPurchaseToAccess($this->object->getRefId(), $type = isset($_GET['purchasetype']) ? $_GET['purchasetype'] : NULL)) {
                 $ilTabs->setTabActive('info_short');
                 include_once 'Services/Payment/classes/class.ilShopPurchaseGUI.php';
                 $this->ctrl->setReturn($this, '');
                 $pp_gui = new ilShopPurchaseGUI($this->object->getRefId());
                 $this->ctrl->forwardCommand($pp_gui);
                 return true;
             }
         }
     }
     switch ($next_class) {
         case "ilinfoscreengui":
             $this->infoScreen();
             // forwards command
             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);
             $this->tabs_gui->setTabActive('meta_data');
             break;
         case 'ilcourseregistrationgui':
             $this->ctrl->setReturn($this, '');
             $this->tabs_gui->setTabActive('join');
             include_once './Modules/Course/classes/class.ilCourseRegistrationGUI.php';
             $registration = new ilCourseRegistrationGUI($this->object);
             $this->ctrl->forwardCommand($registration);
             break;
         case 'ilobjectcustomuserfieldsgui':
             include_once './Services/Membership/classes/class.ilObjectCustomUserFieldsGUI.php';
             $cdf_gui = new ilObjectCustomUserFieldsGUI($this->object->getId());
             $this->setSubTabs('properties');
             $this->tabs_gui->setTabActive('settings');
             $this->ctrl->forwardCommand($cdf_gui);
             break;
         case "ilcourseobjectivesgui":
             include_once './Modules/Course/classes/class.ilCourseObjectivesGUI.php';
             $this->ctrl->setReturn($this, "");
             $reg_gui =& new ilCourseObjectivesGUI($this->object->getRefId());
             $ret =& $this->ctrl->forwardCommand($reg_gui);
             break;
         case 'ilobjcoursegroupinggui':
             include_once './Modules/Course/classes/class.ilObjCourseGroupingGUI.php';
             $this->ctrl->setReturn($this, 'edit');
             $this->setSubTabs('properties');
             $crs_grp_gui =& new ilObjCourseGroupingGUI($this->object, (int) $_GET['obj_id']);
             $this->ctrl->forwardCommand($crs_grp_gui);
             $this->tabs_gui->setTabActive('settings');
             $this->tabs_gui->setSubTabActive('groupings');
             break;
         case "ilcolumngui":
             $this->tabs_gui->setTabActive('none');
             $this->checkPermission("read");
             //$this->prepareOutput();
             //include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
             //$this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
             //	ilObjStyleSheet::getContentStylePath(0));
             //$this->renderObject();
             $this->viewObject();
             break;
         case "ilconditionhandlerinterface":
             include_once './Services/AccessControl/classes/class.ilConditionHandlerInterface.php';
             // preconditions for whole course
             $this->setSubTabs("properties");
             $this->tabs_gui->setTabActive('settings');
             $new_gui =& new ilConditionHandlerInterface($this);
             $this->ctrl->forwardCommand($new_gui);
             break;
         case "illearningprogressgui":
             include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
             $new_gui =& new ilLearningProgressGUI(LP_MODE_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 'illicenseoverviewgui':
             include_once "./Services/License/classes/class.ilLicenseOverviewGUI.php";
             $license_gui =& new ilLicenseOverviewGUI($this, LIC_MODE_REPOSITORY);
             $ret =& $this->ctrl->forwardCommand($license_gui);
             $this->tabs_gui->setTabActive('licenses');
             break;
         case 'ilpermissiongui':
             include_once "Services/AccessControl/classes/class.ilPermissionGUI.php";
             $this->tabs_gui->setTabActive('perm_settings');
             $perm_gui =& new ilPermissionGUI($this);
             $ret =& $this->ctrl->forwardCommand($perm_gui);
             break;
         case 'ilrepositorysearchgui':
             include_once './Services/Search/classes/class.ilRepositorySearchGUI.php';
             $rep_search =& new ilRepositorySearchGUI();
             if (ilCourseParticipant::_getInstanceByObjId($this->object->getId(), $GLOBALS['ilUser']->getId())->isAdmin() or $this->checkPermissionBool('edit_permission')) {
                 $rep_search->setCallback($this, 'assignMembersObject', array(ilCourseConstants::CRS_MEMBER => $this->lng->txt('crs_member'), ilCourseConstants::CRS_TUTOR => $this->lng->txt('crs_tutor'), ilCourseConstants::CRS_ADMIN => $this->lng->txt('crs_admin')));
             } else {
                 $rep_search->setCallback($this, 'assignMembersObject', array(ilCourseConstants::CRS_MEMBER => $this->lng->txt('crs_member'), ilCourseConstants::CRS_TUTOR => $this->lng->txt('crs_tutor')));
             }
             $this->checkLicenses();
             // Set tabs
             $this->ctrl->setReturn($this, 'members');
             $ret =& $this->ctrl->forwardCommand($rep_search);
             $this->setSubTabs('members');
             $this->tabs_gui->setTabActive('members');
             $this->tabs_gui->setSubTabActive('crs_member_administration');
             break;
         case 'ilcoursecontentinterface':
             $this->initCourseContentInterface();
             $this->cci_obj->cci_setContainer($this);
             $this->ctrl->forwardCommand($this->cci_obj);
             $this->setSubTabs('content');
             $this->tabs_gui->setTabActive('content');
             break;
         case 'ilcoursecontentgui':
             $this->ctrl->setReturn($this, 'members');
             include_once './Modules/Course/classes/class.ilCourseContentGUI.php';
             $course_content_obj = new ilCourseContentGUI($this);
             $this->ctrl->forwardCommand($course_content_obj);
             break;
         case 'ilpublicuserprofilegui':
             require_once './Services/User/classes/class.ilPublicUserProfileGUI.php';
             $profile_gui = new ilPublicUserProfileGUI($_GET["user"]);
             $this->setSubTabs('members');
             $this->tabs_gui->setTabActive('members');
             $profile_gui->setBackUrl($ilCtrl->getLinkTarget($this, "membersGallery"));
             $this->tabs_gui->setSubTabActive('crs_members_gallery');
             $html = $this->ctrl->forwardCommand($profile_gui);
             $this->tpl->setVariable("ADM_CONTENT", $html);
             break;
         case 'ilmemberexportgui':
             include_once './Services/Membership/classes/Export/class.ilMemberExportGUI.php';
             $this->setSubTabs('members');
             $this->tabs_gui->setTabActive('members');
             $this->tabs_gui->setSubTabActive('export_members');
             $export = new ilMemberExportGUI($this->object->getRefId());
             $this->ctrl->forwardCommand($export);
             break;
         case 'ilmemberagreementgui':
             include_once 'Services/Membership/classes/class.ilMemberAgreementGUI.php';
             $this->ctrl->setReturn($this, '');
             $agreement = new ilMemberAgreementGUI($this->object->getRefId());
             $this->ctrl->forwardCommand($agreement);
             break;
         case 'ilsessionoverviewgui':
             $this->setSubTabs('members');
             $this->tabs_gui->setTabActive('members');
             $this->tabs_gui->setSubTabActive('events');
             include_once './Modules/Course/classes/class.ilCourseParticipants.php';
             $prt = ilCourseParticipants::_getInstanceByObjId($this->object->getId());
             include_once './Modules/Session/classes/class.ilSessionOverviewGUI.php';
             $overview = new ilSessionOverviewGUI($this->object->getRefId(), $prt);
             $this->ctrl->forwardCommand($overview);
             break;
             // container page editing
         // container page editing
         case "ilpageobjectgui":
             $ret = $this->forwardToPageObject();
             if ($ret != "") {
                 $this->tpl->setContent($ret);
             }
             break;
         case 'ilobjectcopygui':
             include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
             $cp = new ilObjectCopyGUI($this);
             $cp->setType('crs');
             $this->ctrl->forwardCommand($cp);
             break;
         case "ilobjstylesheetgui":
             $this->forwardToStyleSheet();
             break;
         case 'ilcourseparticipantsgroupsgui':
             include_once './Modules/Course/classes/class.ilCourseParticipantsGroupsGUI.php';
             $cmg_gui = new ilCourseParticipantsGroupsGUI($this->object->getRefId());
             $this->setSubTabs('members');
             $this->tabs_gui->setTabActive('members');
             $this->ctrl->forwardCommand($cmg_gui);
             break;
         case 'ilexportgui':
             $this->tabs_gui->setTabActive('export');
             include_once './Services/Export/classes/class.ilExportGUI.php';
             $exp = new ilExportGUI($this);
             $exp->addFormat('xml');
             $this->ctrl->forwardCommand($exp);
             break;
         case "ilcommonactiondispatchergui":
             include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
             $gui = ilCommonActionDispatcherGUI::getInstanceFromAjaxCall();
             $this->ctrl->forwardCommand($gui);
             break;
         case 'ildidactictemplategui':
             $this->ctrl->setReturn($this, 'edit');
             include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateGUI.php';
             $did = new ilDidacticTemplateGUI($this);
             $this->ctrl->forwardCommand($did);
             break;
         case "ilcertificategui":
             $this->tabs_gui->activateTab("settings");
             $this->setSubTabs("properties");
             include_once "./Services/Certificate/classes/class.ilCertificateGUI.php";
             include_once "./Modules/Course/classes/class.ilCourseCertificateAdapter.php";
             $output_gui = new ilCertificateGUI(new ilCourseCertificateAdapter($this->object));
             $this->ctrl->forwardCommand($output_gui);
             break;
         case 'ilobjectservicesettingsgui':
             $this->ctrl->setReturn($this, 'edit');
             $this->setSubTabs("properties");
             $this->tabs_gui->activateTab('settings');
             $this->tabs_gui->activateSubTab('tool_settings');
             include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
             $service = new ilObjectServiceSettingsGUI($this, $this->object->getId(), array(ilObjectServiceSettingsGUI::CALENDAR_VISIBILITY));
             $this->ctrl->forwardCommand($service);
             break;
         default:
             if (!$this->creation_mode) {
                 $this->checkPermission('visible');
             }
             /*
             if(!$this->creation_mode and !$ilAccess->checkAccess('visible','',$this->object->getRefId(),'crs'))
             {
             	$ilErr->raiseError($this->lng->txt("msg_no_perm_read"),$ilErr->MESSAGE);
             }
             */
             // #9401 - see also ilStartupGUI::_checkGoto()
             if ($cmd == 'infoScreenGoto') {
                 if (ilObjCourse::_isActivated($this->object->getId()) && ilObjCourse::_registrationEnabled($this->object->getId())) {
                     $cmd = 'join';
                 } else {
                     $cmd = 'infoScreen';
                 }
             }
             if (!$this->creation_mode && $cmd != 'infoScreen' && $cmd != 'sendfile' && $cmd != 'unsubscribe' && $cmd != 'performUnsubscribe' && !$ilAccess->checkAccess("read", '', $this->object->getRefId()) || $cmd == 'join' || $cmd == 'subscribe') {
                 include_once './Modules/Course/classes/class.ilCourseParticipants.php';
                 if ($rbacsystem->checkAccess('join', $this->object->getRefId()) && !ilCourseParticipants::_isParticipant($this->object->getRefId(), $ilUser->getId())) {
                     include_once './Modules/Course/classes/class.ilCourseRegistrationGUI.php';
                     $this->ctrl->redirectByClass("ilCourseRegistrationGUI");
                 } else {
                     $this->infoScreenObject();
                     break;
                 }
             }
             if ($cmd == 'listObjectives') {
                 include_once './Modules/Course/classes/class.ilCourseObjectivesGUI.php';
                 $this->ctrl->setReturn($this, "");
                 $obj_gui =& new ilCourseObjectivesGUI($this->object->getRefId());
                 $ret =& $this->ctrl->forwardCommand($obj_gui);
                 break;
             }
             // Dirty hack for course timings view
             if ($this->forwardToTimingsView()) {
                 break;
             }
             if (!$cmd) {
                 $cmd = 'view';
             }
             $cmd .= 'Object';
             $this->{$cmd}();
             break;
     }
     $this->addHeaderAction();
     return true;
 }