當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ilCourseParticipants::lookupSubscribers方法代碼示例

本文整理匯總了PHP中ilCourseParticipants::lookupSubscribers方法的典型用法代碼示例。如果您正苦於以下問題:PHP ilCourseParticipants::lookupSubscribers方法的具體用法?PHP ilCourseParticipants::lookupSubscribers怎麽用?PHP ilCourseParticipants::lookupSubscribers使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ilCourseParticipants的用法示例。


在下文中一共展示了ilCourseParticipants::lookupSubscribers方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: membersObject

 /**
  * Member administration
  *
  * @global ilRbacReview $rbacreview
  * @access protected
  * @return
  */
 protected function membersObject()
 {
     global $ilUser, $ilAccess, $ilToolbar, $lng, $ilCtrl, $tpl, $rbacreview;
     include_once './Modules/Course/classes/class.ilCourseParticipants.php';
     include_once './Modules/Course/classes/class.ilCourseParticipantsTableGUI.php';
     if (isset($_GET['member_table_nav'])) {
         list($_SESSION['crs_print_sort'], $_SESSION['crs_print_order'], $tmp) = explode(':', $_GET['member_table_nav']);
     }
     $this->checkPermission('write');
     include_once './Services/Tracking/classes/class.ilObjUserTracking.php';
     $this->show_tracking = (ilObjUserTracking::_enabledLearningProgress() and ilObjUserTracking::_enabledUserRelatedData());
     if ($this->show_tracking) {
         include_once './Services/Object/classes/class.ilObjectLP.php';
         $olp = ilObjectLP::getInstance($this->object->getId());
         $this->show_tracking = $olp->isActive();
     }
     include_once './Services/Object/classes/class.ilObjectActivation.php';
     $this->timings_enabled = (ilObjectActivation::hasTimings($this->object->getRefId()) and $this->object->getViewMode() == IL_CRS_VIEW_TIMING);
     $this->setSubTabs('members');
     $this->tabs_gui->setTabActive('members');
     $this->tabs_gui->setSubTabActive('crs_member_administration');
     $this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.crs_edit_members.html', 'Modules/Course');
     $this->tpl->setVariable('FORMACTION', $this->ctrl->getFormAction($this));
     // add members
     include_once './Services/Search/classes/class.ilRepositorySearchGUI.php';
     ilRepositorySearchGUI::fillAutoCompleteToolbar($this, $ilToolbar, array('auto_complete_name' => $lng->txt('user'), 'user_type' => $this->getLocalRoles(), 'submit_name' => $lng->txt('add')));
     // spacer
     $ilToolbar->addSeparator();
     // search button
     $ilToolbar->addButton($this->lng->txt("crs_search_users"), $this->ctrl->getLinkTargetByClass('ilRepositorySearchGUI', 'start'));
     // separator
     $ilToolbar->addSeparator();
     // print button
     $ilToolbar->addButton($this->lng->txt("crs_print_list"), $this->ctrl->getLinkTarget($this, 'printMembers'));
     /* attendance list button
     		$ilToolbar->addButton($this->lng->txt("sess_gen_attendance_list"),
     			$this->ctrl->getLinkTarget($this, 'attendanceList'));
     		*/
     $this->setShowHidePrefs();
     // Waiting list table
     include_once './Modules/Course/classes/class.ilCourseWaitingList.php';
     $waiting_list = new ilCourseWaitingList($this->object->getId());
     if (count($wait = $waiting_list->getAllUsers())) {
         include_once './Services/Membership/classes/class.ilWaitingListTableGUI.php';
         if ($ilUser->getPref('crs_wait_hide')) {
             $table_gui = new ilWaitingListTableGUI($this, $waiting_list, false);
             $this->ctrl->setParameter($this, 'wait_hide', 0);
             $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this, 'members'), $this->lng->txt('show'));
             $this->ctrl->clearParameters($this);
         } else {
             $table_gui = new ilWaitingListTableGUI($this, $waiting_list, true);
             $this->ctrl->setParameter($this, 'wait_hide', 1);
             $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this, 'members'), $this->lng->txt('hide'));
             $this->ctrl->clearParameters($this);
         }
         $table_gui->setUsers($wait);
         $table_gui->setTitle($this->lng->txt('crs_waiting_list'), 'icon_usr.svg', $this->lng->txt('crs_waiting_list'));
         $this->tpl->setVariable('TABLE_WAIT', $table_gui->getHTML());
     }
     // Subscriber table
     if ($subscribers = ilCourseParticipants::lookupSubscribers($this->object->getId())) {
         include_once './Services/Membership/classes/class.ilSubscriberTableGUI.php';
         if ($ilUser->getPref('crs_subscriber_hide')) {
             $table_gui = new ilSubscriberTableGUI($this, false);
             $this->ctrl->setParameter($this, 'subscriber_hide', 0);
             $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this, 'members'), $this->lng->txt('show'));
             $this->ctrl->clearParameters($this);
         } else {
             $table_gui = new ilSubscriberTableGUI($this, true);
             $this->ctrl->setParameter($this, 'subscriber_hide', 1);
             $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this, 'members'), $this->lng->txt('hide'));
             $this->ctrl->clearParameters($this);
         }
         $table_gui->readSubscriberData();
         $table_gui->setTitle($this->lng->txt('group_new_registrations'), 'icon_usr.svg', $this->lng->txt('group_new_registrations'));
         $this->tpl->setVariable('TABLE_SUB', $table_gui->getHTML());
     }
     if ($rbacreview->getNumberOfAssignedUsers(array($this->object->getDefaultAdminRole()))) {
         // Security: display the list of course administrators read-only,
         // if the user doesn't have the 'edit_permission' permission.
         $showEditLink = ($ilAccess->checkAccess("edit_permission", '', $this->object->getRefId()) or ilCourseParticipants::_getInstanceByObjId($this->object->getId())->isAdmin($ilUser->getId()));
         if ($ilUser->getPref('crs_admin_hide')) {
             $table_gui = new ilCourseParticipantsTableGUI($this, 'admin', false, false, $this->timings_enabled, $showEditLink, $this->object->getDefaultAdminRole(), $this->object->getStatusDetermination() == ilObjCourse::STATUS_DETERMINATION_LP);
             $this->ctrl->setParameter($this, 'admin_hide', 0);
             $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this, 'members'), $this->lng->txt('show'));
             $this->ctrl->clearParameters($this);
         } else {
             $table_gui = new ilCourseParticipantsTableGUI($this, 'admin', true, false, $this->timings_enabled, $showEditLink, $this->object->getDefaultAdminRole(), $this->object->getStatusDetermination() == ilObjCourse::STATUS_DETERMINATION_LP);
             $this->ctrl->setParameter($this, 'admin_hide', 1);
             $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this, 'members'), $this->lng->txt('hide'));
             $this->ctrl->clearParameters($this);
         }
         $table_gui->setTitle($this->lng->txt('crs_administrators'), 'icon_usr.svg', $this->lng->txt('crs_administrators'));
//.........這裏部分代碼省略.........
開發者ID:bheyser,項目名稱:qplskl,代碼行數:101,代碼來源:class.ilObjCourseGUI.php


注:本文中的ilCourseParticipants::lookupSubscribers方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。