/** * 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; }
function executeCommand() { global $ilTabs, $tpl; $next_class = $this->ctrl->getNextClass($this); $cmd = $this->ctrl->getCmd(); switch ($next_class) { case "ilmailsearchcoursesgui": $ilTabs->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this, "share")); include_once 'Services/Contact/classes/class.ilMailSearchCoursesGUI.php'; $csearch = new ilMailSearchCoursesGUI($this->access_handler, $this->node_id); $this->ctrl->setReturn($this, 'share'); $this->ctrl->forwardCommand($csearch); $this->setObjectTitle(); break; case "ilmailsearchgroupsgui": $ilTabs->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this, "share")); include_once 'Services/Contact/classes/class.ilMailSearchGroupsGUI.php'; $gsearch = new ilMailSearchGroupsGUI($this->access_handler, $this->node_id); $this->ctrl->setReturn($this, 'share'); $this->ctrl->forwardCommand($gsearch); $this->setObjectTitle(); break; case "ilmailsearchgui": $ilTabs->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this, "share")); include_once 'Services/Contact/classes/class.ilMailSearchGUI.php'; $usearch = new ilMailSearchGUI($this->access_handler, $this->node_id); $this->ctrl->setReturn($this, 'share'); $this->ctrl->forwardCommand($usearch); $this->setObjectTitle(); break; case "ilpublicuserprofilegui": $ilTabs->clearTargets(); $ilTabs->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this, "share")); include_once './Services/User/classes/class.ilPublicUserProfileGUI.php'; $prof = new ilPublicUserProfileGUI($_REQUEST["user"]); $prof->setBackUrl($this->ctrl->getLinkTarget($this, "share")); $tpl->setContent($prof->getHTML()); break; default: // $this->prepareOutput(); if (!$cmd) { $cmd = "share"; } return $this->{$cmd}(); } return true; }
/** * execute command */ function &executeCommand() { global $ilCtrl, $tpl; $next_class = $ilCtrl->getNextClass(); $cmd = $ilCtrl->getCmd("getHTML"); switch ($next_class) { // profile case "ilpublicuserprofilegui": include_once './Services/User/classes/class.ilPublicUserProfileGUI.php'; $profile_gui = new ilPublicUserProfileGUI($_GET["user"]); $profile_gui->setBackUrl($ilCtrl->getParentReturn($this)); return $ilCtrl->forwardCommand($profile_gui); break; default: return $this->{$cmd}(); } }
/** * Execute Command */ public function executeCommand() { global $ilBench, $ilCtrl; $next_class = $this->ctrl->getNextClass($this); $cmd = $this->ctrl->getCmd(); $this->prepareOutput(); switch ($next_class) { case "ilpublicuserprofilegui": include_once './Services/User/classes/class.ilPublicUserProfileGUI.php'; $profile = new ilPublicUserProfileGUI((int) $_REQUEST['user']); $profile->setBackUrl($this->ctrl->getLinkTarget($this, 'showSavedResults')); $ret = $ilCtrl->forwardCommand($profile); $GLOBALS['tpl']->setContent($ret); break; default: $this->initStandardSearchForm(ilSearchBaseGUI::SEARCH_FORM_USER); if (!$cmd) { $cmd = "showSavedResults"; } $this->handleCommand($cmd); break; } return true; }
/** * Used to show the user profile information. * * @global type $tpl * @global type $ilCtrl */ public function showProfile() { global $tpl, $ilCtrl; $this->tabs_gui->clearTargets(); $user_id = (int) $_GET['user_id']; $last_cmd = empty($_GET['last_cmd']) ? "showBookings" : (string) $_GET['last_cmd']; include_once 'Services/User/classes/class.ilPublicUserProfileGUI.php'; $profile = new ilPublicUserProfileGUI($user_id); $profile->setBackUrl($this->ctrl->getLinkTargetByClass('ilroomsharingappointmentsgui', $last_cmd)); $tpl->setContent($ilCtrl->getHTML($profile)); }
/** * show public profile of given user */ public function showProfile() { global $tpl, $ilTabs, $ilCtrl; $ilTabs->clearTargets(); $user_id = (int) $_GET['user']; include_once 'Services/User/classes/class.ilPublicUserProfileGUI.php'; $profile = new ilPublicUserProfileGUI($user_id); $profile->setBackUrl($this->getProfileBackUrl()); $tpl->setContent($ilCtrl->getHTML($profile)); }
public function showUser() { global $ilCtrl, $ilToolbar; $this->ctrl->setParameter($this, "mail_id", $_GET["mail_id"]); $this->tpl->setTitle($this->lng->txt("mail")); //$ilToolbar->addButton($this->lng->txt("back"), $this->ctrl->getLinkTarget($this, "showMail")); $this->tpl->setVariable("TBL_TITLE", $this->lng->txt("profile_of") . " " . ilObjUser::_lookupLogin($_GET["user"])); $this->tpl->setVariable("TBL_TITLE_IMG", ilUtil::getImagePath("icon_usr.svg")); $this->tpl->setVariable("TBL_TITLE_IMG_ALT", $this->lng->txt("public_profile")); include_once './Services/User/classes/class.ilPublicUserProfileGUI.php'; $profile_gui = new ilPublicUserProfileGUI($_GET["user"]); $profile_gui->setBackUrl($this->ctrl->getLinkTarget($this, "showMail")); $this->tpl->setContent($ilCtrl->getHTML($profile_gui)); $this->tpl->show(); return true; }
/** * Public profile form */ function showPublicProfile($a_no_init = false) { global $ilUser, $lng, $ilSetting, $ilTabs; $ilTabs->activateTab("public_profile"); $this->setHeader(); if (!$a_no_init) { $this->initPublicProfileForm(); } $ptpl = new ilTemplate("tpl.edit_personal_profile.html", true, true, "Services/User"); $ptpl->setVariable("FORM", $this->form->getHTML()); include_once "./Services/User/classes/class.ilPublicUserProfileGUI.php"; $pub_profile = new ilPublicUserProfileGUI($ilUser->getId()); $ptpl->setVariable("PREVIEW", $pub_profile->getEmbeddable()); $this->tpl->setContent($ptpl->get()); $this->tpl->show(); }
protected function renderProfile($a_user_id, $a_type, array $a_fields = null) { global $ilCtrl; include_once "./Services/User/classes/class.ilPublicUserProfileGUI.php"; $pub_profile = new ilPublicUserProfileGUI($a_user_id); $pub_profile->setEmbedded(true, $this->getOutputMode() == "offline"); // full circle: additional was set in the original public user profile call $pub_profile->setAdditional($this->getAdditional()); if ($a_type == "manual" && sizeof($a_fields)) { $prefs = array(); foreach ($a_fields as $field) { $field = trim($field); if ($field) { $prefs["public_" . $field] = "y"; } } $pub_profile->setCustomPrefs($prefs); } if ($this->getOutputMode() != "offline") { return $ilCtrl->getHTML($pub_profile); } else { return $pub_profile->getEmbeddable(); } }
public function showUserObject() { /** * @var $tpl ilTemplate */ global $tpl; // we could actually call ilpublicuserprofilegui directly, this method // is not needed - but sadly used throughout the forum code // see above in execute command include_once 'Services/User/classes/class.ilPublicUserProfileGUI.php'; $profile_gui = new ilPublicUserProfileGUI($_GET['user']); $add = $this->getUserProfileAdditional($_GET['ref_id'], $_GET['user']); $profile_gui->setAdditional($add); $profile_gui->setBackUrl($_GET['backurl']); $tpl->setContent($this->ctrl->getHTML($profile_gui)); }
/** * Handles all commmands of this class, centralizes permission checks * * @param String $cmd */ public function performCommand($cmd) { $next_class = $this->ctrl->getNextClass($this); switch ($next_class) { case 'ilpublicuserprofilegui': require_once './Services/User/classes/class.ilPublicUserProfileGUI.php'; $profile_gui = new ilPublicUserProfileGUI($_GET["user"]); $profile_gui->setBackUrl($this->ctrl->getLinkTarget($this, "showMembersGallery")); $this->tabs->activateTab('participants'); $this->__setSubTabs('participants'); $this->tabs->activateSubTab("editParticipants"); $html = $this->ctrl->forwardCommand($profile_gui); $this->tpl->setVariable("ADM_CONTENT", $html); break; case 'ilcommonactiondispatchergui': require_once 'Services/Object/classes/class.ilCommonActionDispatcherGUI.php'; $gui = ilCommonActionDispatcherGUI::getInstanceFromAjaxCall(); $this->ctrl->forwardCommand($gui); break; case 'ilrepositorysearchgui': $this->tabs->setTabActive('participants'); $rep_search = new ilRepositorySearchGUI(); $rep_search->setCallback($this, 'addAsMember', array('add_member' => $this->lng->txt('member'), 'add_admin' => $this->lng->txt('administrator'))); $this->ctrl->setReturn($this, 'editParticipants'); $this->ctrl->forwardCommand($rep_search); break; default: switch ($cmd) { // case "editContents": case "editProperties": // list all commands that need write permission here // list all commands that need write permission here case "updateProperties": case "assignRolesAfterCreate": $this->checkPermission("write"); $this->{$cmd}(); break; // list all commands that need read permission here // list all commands that need read permission here case "addParticipant": case "detachParticipant": case "searchContentFile": case 'cancelSearchContentFile': case "showFileSearchResult": case "addContentFromILIAS": case "askDeleteContents": case "deleteContents": case "uploadFile": case "showUploadFile": case "editItem": case "editRecord": case "updateContent": case "updateRecord": case "showAddContent": case "addContent": case "assignAdmin": case "performDetachAdmin": case "performDetachMember": case "performAddCrsGrpMembers": case "addAsMember": case "detachMember": case "detachAdmin": case "addCrsGrpMembers": case 'showContent': case "editParticipants": case "updateParticipants": case 'performSso': case 'requestAdobeConnectContent': case "viewContents": case "viewRecords": case "showMembersGallery": case "performCrsGrpTrigger": $this->checkPermission("read"); $this->{$cmd}(); break; case "join": case "leave": $this->checkPermission("visible"); $this->{$cmd}(); break; default: $this->showContent(); break; } break; } }
function executeCommand() { global $rbacsystem, $ilUser, $ilAccess, $ilErr, $ilTabs, $ilNavigationHistory, $ilCtrl; $next_class = $this->ctrl->getNextClass($this); $cmd = $this->ctrl->getCmd(); $this->prepareOutput(); // show repository tree $this->showRepTree(true); // 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, 'infoScreen'); $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'; if (isset($_REQUEST['member_id'])) { $this->ctrl->setReturn($this, 'members'); } $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 "ilconditionhandlergui": include_once './Services/AccessControl/classes/class.ilConditionHandlerGUI.php'; // preconditions for whole course $this->setSubTabs("properties"); $this->tabs_gui->setTabActive('settings'); $new_gui =& new ilConditionHandlerGUI($this); $this->ctrl->forwardCommand($new_gui); break; case "illearningprogressgui": 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 'illicenseoverviewgui': include_once "./Services/License/classes/class.ilLicenseOverviewGUI.php"; $license_gui =& new ilLicenseOverviewGUI($this, ilLicenseOverviewGUI::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', $this->getLocalRoles()); } 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': $this->tpl->enableDragDropFileUpload(null); 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->tabs_gui->clearTargets(); $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 "ilcontainerpagegui": $ret = $this->forwardToPageObject(); if ($ret != "") { $this->tpl->setContent($ret); } break; case "ilcontainerstartobjectspagegui": // file downloads, etc. (currently not active) include_once "Services/Container/classes/class.ilContainerStartObjectsPageGUI.php"; $pgui = new ilContainerStartObjectsPageGUI($this->object->getId()); $ret = $this->ctrl->forwardCommand($pgui); 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->acltivateSubTab('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; case 'illoeditorgui': #$this->tabs_gui->clearTargets(); #$this->tabs_gui->setBackTarget($this->lng->txt('back'),$this->ctrl->getLinkTarget($this,'')); $this->tabs_gui->activateTab('crs_objectives'); include_once './Modules/Course/classes/Objectives/class.ilLOEditorGUI.php'; $editor = new ilLOEditorGUI($this->object); $this->ctrl->forwardCommand($editor); break; case 'ilcontainerstartobjectsgui': $this->ctrl->setReturn($this, 'edit'); $this->tabs_gui->clearTargets(); $this->tabs_gui->setBackTarget($this->lng->txt("back_to_crs_content"), $this->ctrl->getLinkTarget($this, "edit")); $this->tabs_gui->addTab("start", $this->lng->txt("crs_start_objects"), $this->ctrl->getLinkTargetByClass("ilcontainerstartobjectsgui", "listStructure")); include_once './Services/Container/classes/class.ilContainerStartObjectsGUI.php'; $stgui = new ilContainerStartObjectsGUI($this->object); $this->ctrl->forwardCommand($stgui); break; case 'illomembertestresultgui': include_once './Modules/Course/classes/Objectives/class.ilLOMemberTestResultGUI.php'; $GLOBALS['ilCtrl']->setReturn($this, 'members'); $GLOBALS['ilTabs']->clearTargets(); $GLOBALS['ilTabs']->setBackTarget($GLOBALS['lng']->txt('back'), $GLOBALS['ilCtrl']->getLinkTarget($this, 'members')); $result_view = new ilLOMemberTestResultGUI($this, $this->object, (int) $_REQUEST['uid']); $this->ctrl->forwardCommand($result_view); 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) { if ($cmd == "infoScreen") { $this->checkPermission("visible"); } else { // $this->checkPermission("read"); } } 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; }
protected function doProfileAutoComplete() { $field_id = (string) $_REQUEST["f"]; $term = (string) $_REQUEST["term"]; include_once "Services/User/classes/class.ilPublicUserProfileGUI.php"; $result = ilPublicUserProfileGUI::getAutocompleteResult($field_id, $term); if (sizeof($result)) { include_once 'Services/JSON/classes/class.ilJsonUtil.php'; echo ilJsonUtil::encode($result); } exit; }
function showProfileObject() { global $tpl, $ilCtrl; $this->tabs_gui->clearTargets(); $user_id = (int) $_GET['user_id']; include_once 'Services/User/classes/class.ilPublicUserProfileGUI.php'; $profile = new ilPublicUserProfileGUI($user_id); $profile->setBackUrl($this->ctrl->getLinkTarget($this, 'log')); $tpl->setContent($ilCtrl->getHTML($profile)); }
protected function renderProfile($a_user_id, $a_type, array $a_fields = null) { global $ilCtrl; $user_id = $this->getPageContentUserId($a_user_id); if ($this->getOutputMode() == "offline") { // profile picture is done in ilPortfolioHTMLExport $this->export_material["js"][] = "http://maps.google.com/maps/api/js?sensor=false"; $this->export_material["js"][] = "./Services/Maps/js/ServiceGoogleMaps.js"; $this->export_material["js"][] = "./Services/Maps/js/OpenLayers.js"; $this->export_material["js"][] = "./Services/Maps/js/ServiceOpenLayers.js"; } include_once "./Services/User/classes/class.ilPublicUserProfileGUI.php"; $pub_profile = new ilPublicUserProfileGUI($user_id); $pub_profile->setEmbedded(true, $this->getOutputMode() == "offline"); // full circle: additional was set in the original public user profile call $pub_profile->setAdditional($this->getAdditional()); if ($a_type == "manual" && sizeof($a_fields)) { $prefs = array(); foreach ($a_fields as $field) { $field = trim($field); if ($field) { $prefs["public_" . $field] = "y"; } } $pub_profile->setCustomPrefs($prefs); } if ($this->getOutputMode() != "offline") { return $ilCtrl->getHTML($pub_profile); } else { return $pub_profile->getEmbeddable(); } }
function &executeCommand() { global $ilUser, $rbacsystem, $ilAccess, $ilNavigationHistory, $ilErr, $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"])) { $ilNavigationHistory->addItem($_GET["ref_id"], $ilCtrl->getLinkTargetByClass("ilrepositorygui", "frameset"), "grp"); } switch ($next_class) { case 'ilgroupregistrationgui': $this->ctrl->setReturn($this, ''); $this->tabs_gui->setTabActive('join'); include_once './Modules/Group/classes/class.ilGroupRegistrationGUI.php'; $registration = new ilGroupRegistrationGUI($this->object); $this->ctrl->forwardCommand($registration); 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 'ilrepositorysearchgui': include_once './Services/Search/classes/class.ilRepositorySearchGUI.php'; $rep_search =& new ilRepositorySearchGUI(); $rep_search->setCallback($this, 'addUserObject', array(ilObjGroup::GRP_MEMBER => $this->lng->txt('il_grp_member'), ilObjGroup::GRP_ADMIN => $this->lng->txt('il_grp_admin'))); // Set tabs $this->tabs_gui->setTabActive('members'); $this->ctrl->setReturn($this, 'members'); $ret =& $this->ctrl->forwardCommand($rep_search); $this->setSubTabs('members'); $this->tabs_gui->setSubTabActive('members'); break; case "ilinfoscreengui": $ret =& $this->infoScreen(); 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 'ilobjcoursegroupinggui': $this->setSubTabs('settings'); include_once './Modules/Course/classes/class.ilObjCourseGroupingGUI.php'; $this->ctrl->setReturn($this, 'edit'); $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 'ilcoursecontentgui': 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'; $this->setSubTabs('members'); $this->tabs_gui->setTabActive('group_members'); $this->tabs_gui->setSubTabActive('grp_members_gallery'); $profile_gui = new ilPublicUserProfileGUI($_GET["user"]); $profile_gui->setBackUrl($ilCtrl->getLinkTarget($this, "membersGallery")); $html = $this->ctrl->forwardCommand($profile_gui); $this->tpl->setVariable("ADM_CONTENT", $html); break; case "ilcolumngui": $this->tabs_gui->setTabActive('none'); $this->checkPermission("read"); include_once "./Services/Style/classes/class.ilObjStyleSheet.php"; $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId())); $this->renderObject(); 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('grp'); $this->ctrl->forwardCommand($cp); break; case "ilobjstylesheetgui": $this->forwardToStyleSheet(); break; case 'ilobjectcustomuserfieldsgui': include_once './Services/Membership/classes/class.ilObjectCustomUserFieldsGUI.php'; $cdf_gui = new ilObjectCustomUserFieldsGUI($this->object->getId()); $this->setSubTabs('settings'); $this->tabs_gui->setTabActive('settings'); $this->ctrl->forwardCommand($cdf_gui); break; case 'ilmemberagreementgui': include_once 'Services/Membership/classes/class.ilMemberAgreementGUI.php'; $this->ctrl->setReturn($this, ''); $this->tabs_gui->setTabActive('view_content'); $agreement = new ilMemberAgreementGUI($this->object->getRefId()); $this->ctrl->forwardCommand($agreement); 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 '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 "ilcommonactiondispatchergui": include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php"; $gui = ilCommonActionDispatcherGUI::getInstanceFromAjaxCall(); $this->ctrl->forwardCommand($gui); break; case 'ilobjectservicesettingsgui': $this->ctrl->setReturn($this, 'edit'); $this->setSubTabs("settings"); $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; case 'ilsessionoverviewgui': $this->setSubTabs('members'); $this->tabs_gui->setTabActive('members'); $this->tabs_gui->setSubTabActive('events'); include_once './Modules/Group/classes/class.ilGroupParticipants.php'; $prt = ilGroupParticipants::_getInstanceByObjId($this->object->getId()); include_once './Modules/Session/classes/class.ilSessionOverviewGUI.php'; $overview = new ilSessionOverviewGUI($this->object->getRefId(), $prt); $this->ctrl->forwardCommand($overview); break; default: // check visible permission if (!$this->getCreationMode() and !$ilAccess->checkAccess('visible', '', $this->object->getRefId(), 'grp')) { $ilErr->raiseError($this->lng->txt("msg_no_perm_read"), $ilErr->MESSAGE); } // #9401 - see also ilStartupGUI::_checkGoto() if ($cmd == 'infoScreenGoto') { if ($this->object->isRegistrationEnabled()) { $cmd = 'join'; } else { $cmd = 'infoScreen'; } } // check read permission if (!$this->getCreationMode() && !$rbacsystem->checkAccess('read', $this->object->getRefId()) && $cmd != 'infoScreen' || $cmd == 'join') { // no join permission -> redirect to info screen if (!$rbacsystem->checkAccess('join', $this->object->getRefId())) { $this->ctrl->redirect($this, "infoScreen"); } else { include_once './Modules/Group/classes/class.ilGroupRegistrationGUI.php'; $this->ctrl->redirectByClass("ilGroupRegistrationGUI", "show"); } } if (!$cmd) { $cmd = 'view'; } $cmd .= 'Object'; $this->{$cmd}(); break; } $this->addHeaderAction(); }