/** * Execute command * @return */ public function executeCommand() { global $ilUser, $ilCtrl, $tpl, $ilHelp, $ilTabs; $ilHelp->setScreenIdComponent("cal"); switch ($this->ctrl->getNextClass()) { case "ilpublicuserprofilegui": include_once './Services/User/classes/class.ilPublicUserProfileGUI.php'; $profile = new ilPublicUserProfileGUI($this->user_id); $profile->setBackUrl($this->getProfileBackUrl()); $ret = $ilCtrl->forwardCommand($profile); $tpl->setContent($ret); break; case 'ilrepositorysearchgui': include_once './Services/Search/classes/class.ilRepositorySearchGUI.php'; $rep_search = new ilRepositorySearchGUI(); if (isset($_REQUEST['assignM'])) { $rep_search->setCallback($this, 'assignUsersToAppointments', array()); $ilCtrl->setParameter($this, 'assignM', 1); $ilCtrl->setReturn($this, 'appointmentList'); $ilTabs->activateSubTab('cal_ch_app_list'); } elseif (isset($_REQUEST['grp_id'])) { $rep_search->setCallback($this, 'assignUsersToGroup', array()); $ilCtrl->saveParameter($this, 'grp_id'); $ilCtrl->setReturn($this, 'groupList'); $ilTabs->activateSubTab('cal_ch_app_grp'); } elseif (isset($_REQUEST['apps'])) { $rep_search->setCallback($this, 'assignUsersToAppointment', array()); $ilCtrl->saveParameter($this, 'apps'); $ilCtrl->setReturn($this, 'appointmentList'); $ilTabs->activateSubTab('cal_ch_app_list'); } $ilCtrl->forwardCommand($rep_search); break; default: $tpl->setTitle($this->lng->txt("cal_ch_form_header")); // #12220 $this->setTabs(); if ($ilUser->getId() != $this->user_id) { $ilCtrl->setParameter($this, 'user_id', $this->user_id); } $cmd = $this->ctrl->getCmd('appointmentList'); $this->{$cmd}(); } }
public function executeCommand() { $next_class = $this->ctrl->getNextClass($this); $cmd = $this->ctrl->getCmd(); switch ($next_class) { case 'ilrepositorysearchgui': include_once './Services/Search/classes/class.ilRepositorySearchGUI.php'; $rep_search = new ilRepositorySearchGUI(); $rep_search->setCallback($this, 'addModerator'); // Set tabs $this->ctrl->setReturn($this, 'showModerators'); $this->ctrl->forwardCommand($rep_search); break; default: if (!$cmd) { $cmd = 'showModerators'; } $this->{$cmd}(); break; } return true; }
/** * Creates the output of the test participants * * @access public */ function participantsObject() { global $ilAccess, $ilToolbar, $lng; $this->getParticipantsSubTabs(); if (!$ilAccess->checkAccess("write", "", $this->ref_id)) { // allow only write access ilUtil::sendInfo($this->lng->txt("cannot_edit_test"), true); $this->ctrl->redirect($this, "infoScreen"); } if ($this->testQuestionSetConfigFactory->getQuestionSetConfig()->areDepenciesBroken($this->tree)) { ilUtil::sendFailure($this->testQuestionSetConfigFactory->getQuestionSetConfig()->getDepenciesBrokenMessage($this->lng)); } elseif ($this->testQuestionSetConfigFactory->getQuestionSetConfig()->areDepenciesInVulnerableState($this->tree)) { ilUtil::sendInfo($this->questionSetConfig->getDepenciesInVulnerableStateMessage($this->lng)); } if ($this->object->getFixedParticipants()) { // search button include_once './Services/Search/classes/class.ilRepositorySearchGUI.php'; ilRepositorySearchGUI::fillAutoCompleteToolbar($this, $tb, array('auto_complete_name' => $lng->txt('user'), 'submit_name' => $lng->txt('add'))); // search button $ilToolbar->addButton($this->lng->txt("tst_search_users"), $this->ctrl->getLinkTargetByClass('ilRepositorySearchGUI', 'start')); $participants =& $this->object->getInvitedUsers(); $rows = array(); foreach ($participants as $data) { $maxpass = $this->object->_getMaxPass($data["active_id"]); if (!is_null($maxpass)) { $maxpass += 1; } $access = ""; if (strlen($data["active_id"])) { $last_access = $this->object->_getLastAccess($data["active_id"]); $access = $last_access; } $this->ctrl->setParameterByClass('iltestevaluationgui', 'active_id', $data['active_id']); if ($data['active_id'] == null) { if (strlen($data["firstname"] . $data["lastname"]) == 0) { $fullname = $lng->txt("deleted_user"); } else { if ($this->object->getAnonymity()) { $fullname = $lng->txt('anonymous'); } else { $fullname = trim($data["lastname"] . ", " . $data["firstname"] . " " . $data["title"]); } } } else { include_once "./Modules/Test/classes/class.ilObjTestAccess.php"; $fullname = ilObjTestAccess::_getParticipantData($data['active_id']); } array_push($rows, array('usr_id' => $data["usr_id"], 'active_id' => $data['active_id'], 'login' => $data["login"], 'clientip' => $data["clientip"], 'firstname' => $data["firstname"], 'lastname' => $data["lastname"], 'name' => $fullname, 'started' => $data["active_id"] > 0 ? 1 : 0, 'finished' => $data["test_finished"] == 1 ? 1 : 0, 'access' => $access, 'maxpass' => $maxpass, 'result' => $this->ctrl->getLinkTargetByClass('iltestevaluationgui', 'outParticipantsResultsOverview'))); } include_once "./Modules/Test/classes/tables/class.ilTestFixedParticipantsTableGUI.php"; $table_gui = new ilTestFixedParticipantsTableGUI($this, 'participants', $this->testQuestionSetConfigFactory->getQuestionSetConfig()->areDepenciesBroken(), $this->object->getAnonymity(), count($rows)); $table_gui->setFilterCommand('fpSetFilter'); $table_gui->setResetCommand('fpResetFiler'); $rows = $this->applyFilterCriteria($rows); $table_gui->setData($rows); $this->tpl->setVariable('ADM_CONTENT', $table_gui->getHTML()); } else { $participants =& $this->object->getTestParticipants(); $rows = array(); foreach ($participants as $data) { $maxpass = $this->object->_getMaxPass($data["active_id"]); if (!is_null($maxpass)) { $maxpass += 1; } $access = ""; if (strlen($data["active_id"])) { $last_access = $this->object->_getLastAccess($data["active_id"]); $access = $last_access; } $this->ctrl->setParameterByClass('iltestevaluationgui', 'active_id', $data['active_id']); include_once "./Modules/Test/classes/class.ilObjTestAccess.php"; $fullname = ilObjTestAccess::_getParticipantData($data['active_id']); array_push($rows, array('usr_id' => $data["active_id"], 'active_id' => $data['active_id'], 'login' => $data["login"], 'name' => $fullname, 'firstname' => $data["firstname"], 'lastname' => $data["lastname"], 'started' => $data["active_id"] > 0 ? 1 : 0, 'finished' => $data["test_finished"] == 1 ? 1 : 0, 'access' => $access, 'maxpass' => $maxpass, 'result' => $this->ctrl->getLinkTargetByClass('iltestevaluationgui', 'outParticipantsResultsOverview'))); } include_once "./Modules/Test/classes/tables/class.ilTestParticipantsTableGUI.php"; $table_gui = new ilTestParticipantsTableGUI($this, 'participants', $this->testQuestionSetConfigFactory->getQuestionSetConfig()->areDepenciesBroken(), $this->object->getAnonymity(), count($rows)); $table_gui->setFilterCommand('npSetFilter'); $table_gui->setResetCommand('npResetFilter'); $rows = $this->applyFilterCriteria($rows); $table_gui->setData($rows); $this->tpl->setVariable('ADM_CONTENT', $table_gui->getHTML()); } }
/** * Show submissions */ function showSubmissions() { global $tpl, $ilTabs, $tree, $ilToolbar, $ilCtrl, $lng; $ilTabs->activateTab("submissions"); $this->addSubmissionSubTabs("submissions"); include_once 'Services/Tracking/classes/class.ilLPMarks.php'; // assignment selection include_once "./Customizing/global/plugins/Services/Repository/RepositoryObject/Ephorus/classes/class.ilEphAssignment.php"; $ass = ilEphAssignment::getAssignmentDataOfEphorus($this->object->getId()); if ($_GET["ass_id"] == "") { $a = current($ass); $_GET["ass_id"] = $a["id"]; } reset($ass); if (count($ass) > 1) { $options = array(); foreach ($ass as $a) { $options[$a["id"]] = $a["title"]; } include_once "./Services/Form/classes/class.ilSelectInputGUI.php"; $si = new ilSelectInputGUI($this->lng->txt(""), "ass_id"); $si->setOptions($options); $si->setValue($_GET["ass_id"]); $ilToolbar->addInputItem($si); $ilToolbar->setFormAction($ilCtrl->getFormAction($this)); $ilToolbar->addFormButton($this->lng->txt("rep_robj_xeph_select_ass"), "selectAssignment"); $ilToolbar->addSeparator(); } // add member include_once './Services/Search/classes/class.ilRepositorySearchGUI.php'; ilRepositorySearchGUI::fillAutoCompleteToolbar($this, $ilToolbar, array('auto_complete_name' => $lng->txt('user'), 'submit_name' => $lng->txt('add'))); $ilToolbar->addSpacer(); $ilToolbar->addButton($lng->txt("rep_robj_xeph_search_users"), $this->ctrl->getLinkTargetByClass('ilRepositorySearchGUI', 'showSearch')); $ilToolbar->setFormAction($ilCtrl->getFormAction($this)); // add course members button, in case the ephorus is inside a course $parent_id = $tree->getParentId($_GET["ref_id"]); $parent_obj_id = ilObject::_lookupObjId($parent_id); $type = ilObject::_lookupType($parent_obj_id); while ($parent_id != 1 && $type != "crs") { $parent_id = $tree->getParentId($parent_id); $parent_obj_id = ilObject::_lookupObjId($parent_id); $type = ilObject::_lookupType($parent_obj_id); } if ($type == "crs") { $this->ctrl->setParameterByClass('ilRepositorySearchGUI', "list_obj", $parent_obj_id); $ilToolbar->addButton($this->lng->txt("rep_robj_xeph_crs_add_members"), $this->ctrl->getLinkTargetByClass('ilRepositorySearchGUI', 'listUsers')); } if (count($ass) > 0) { include_once "./Customizing/global/plugins/Services/Repository/RepositoryObject/Ephorus/classes/class.ilEphorusMemberTableGUI.php"; $eph_tab = new ilEphorusMemberTableGUI($this, "showSubmissions", $this->object, $_GET["ass_id"]); $tpl->setContent($eph_tab->getHTML()); } else { ilUtil::sendInfo($lng->txt("rep_robj_xeph_no_assignments_available")); } return; }
protected function addSearchToolbar() { global $ilToolbar, $lng; $lng->loadLanguageModule('crs'); // add members include_once './Services/Search/classes/class.ilRepositorySearchGUI.php'; ilRepositorySearchGUI::fillAutoCompleteToolbar($this, $ilToolbar, array('auto_complete_name' => $lng->txt('user'), 'user_type' => array(ilObjVitero::MEMBER => ilViteroPlugin::getInstance()->txt('member'), ilObjVitero::ADMIN => ilViteroPlugin::getInstance()->txt('admin')), 'submit_name' => $lng->txt('add'))); // spacer $ilToolbar->addSeparator(); // search button $ilToolbar->addButton($this->lng->txt("crs_search_users"), $this->ctrl->getLinkTargetByClass('ilRepositorySearchGUI', 'start')); return true; }
/** * Displays a form which allows members to manage team uploads * * @access public */ function submissionScreenTeamObject() { global $ilToolbar; $team_id = $this->initTeamSubmission("showOverview"); // $this->tabs_gui->setTabActive("content"); // $this->addContentSubTabs("content"); if (mktime() > $this->ass->getDeadline() && $this->ass->getDeadline() != 0) { ilUtil::sendInfo($this->lng->txt("exercise_time_over")); } else { $this->ctrl->setParameterByClass('ilRepositorySearchGUI', 'ctx', 1); $this->ctrl->setParameter($this, 'ctx', 1); // add member include_once './Services/Search/classes/class.ilRepositorySearchGUI.php'; ilRepositorySearchGUI::fillAutoCompleteToolbar($this, $ilToolbar, array('auto_complete_name' => $this->lng->txt('user'), 'submit_name' => $this->lng->txt('add'))); $ilToolbar->addSpacer(); $ilToolbar->addButton($this->lng->txt("exc_search_users"), $this->ctrl->getLinkTargetByClass('ilRepositorySearchGUI', '')); $ilToolbar->setFormAction($this->ctrl->getFormAction($this)); $parent_container_id = $this->object->getParentContainerId(); if ($parent_container_id) { $this->ctrl->setParameterByClass('ilRepositorySearchGUI', "list_obj", $parent_container_id); $this->lng->loadLanguageModule("exercise"); $ilToolbar->addSpacer(); /* $ilToolbar->addButton($this->lng->txt("exc_crs_add_members"), $this->ctrl->getLinkTargetByClass('ilRepositorySearchGUI','listUsers')); */ $ilToolbar->addButton($this->lng->txt("exc_team_member_container_add"), $this->ctrl->getLinkTarget($this, "addTeamMemberContainer")); } } include_once "Modules/Exercise/classes/class.ilExAssignmentTeamTableGUI.php"; $tbl = new ilExAssignmentTeamTableGUI($this, "submissionScreenTeam", ilExAssignmentTeamTableGUI::MODE_EDIT, $team_id, $this->ass); $this->tpl->setContent($tbl->getHTML()); }
/** * edit members * * @access public * @return */ public function membersObject() { global $ilUser, $ilToolbar, $lng, $ilCtrl; include_once './Modules/Group/classes/class.ilGroupParticipants.php'; include_once './Modules/Group/classes/class.ilGroupParticipantsTableGUI.php'; $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(); } $part = ilGroupParticipants::_getInstanceByObjId($this->object->getId()); $this->setSubTabs('members'); $this->tabs_gui->setTabActive('members'); $this->tabs_gui->setSubTabActive('grp_edit_members'); $this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.grp_edit_members.html', 'Modules/Group'); $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("grp_search_users"), $this->ctrl->getLinkTargetByClass('ilRepositorySearchGUI', 'start')); $ilToolbar->addSeparator(); // print button $ilToolbar->addButton($this->lng->txt("grp_print_list"), $this->ctrl->getLinkTarget($this, 'printMembers')); $this->setShowHidePrefs(); // Waiting list table include_once './Modules/Group/classes/class.ilGroupWaitingList.php'; $waiting_list = new ilGroupWaitingList($this->object->getId()); if (count($wait = $waiting_list->getAllUsers())) { include_once './Services/Membership/classes/class.ilWaitingListTableGUI.php'; if ($ilUser->getPref('grp_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('grp_header_waiting_list'), 'icon_usr.svg', $this->lng->txt('group_new_registrations')); $this->tpl->setVariable('TABLE_SUB', $table_gui->getHTML()); } // Subscriber table if ($part->getSubscribers()) { include_once './Services/Membership/classes/class.ilSubscriberTableGUI.php'; if ($ilUser->getPref('grp_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 (count($part->getAdmins())) { if ($ilUser->getPref('grp_admin_hide')) { $table_gui = new ilGroupParticipantsTableGUI($this, 'admin', false, false); $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 ilGroupParticipantsTableGUI($this, 'admin', true, false); $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('grp_admins'), 'icon_usr.svg', $this->lng->txt('grp_admins')); $table_gui->parse($this->readMemberData($part->getAdmins())); $this->tpl->setVariable('ADMINS', $table_gui->getHTML()); } if ($GLOBALS['rbacreview']->getNumberOfAssignedUsers(array($this->object->getDefaultMemberRole()))) { if ($ilUser->getPref('grp_member_hide')) { $table_gui = new ilGroupParticipantsTableGUI($this, 'member', false, $this->show_tracking, $this->object->getDEfaultMemberRole()); $this->ctrl->setParameter($this, 'member_hide', 0); $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this, 'members'), $this->lng->txt('show')); $this->ctrl->clearParameters($this); } else { $table_gui = new ilGroupParticipantsTableGUI($this, 'member', true, $this->show_tracking, $this->object->getDefaultMemberRole()); $this->ctrl->setParameter($this, 'member_hide', 1); $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this, 'members'), $this->lng->txt('hide')); $this->ctrl->clearParameters($this); } $table_gui->setTitle($this->lng->txt('grp_members'), 'icon_usr.svg', $this->lng->txt('grp_members')); $table_gui->parse($this->readMemberData($GLOBALS['rbacreview']->assignedUsers($this->object->getDefaultMemberRole()), null, $table_gui->getSelectedColumns())); $this->tpl->setCurrentBlock('member_block'); $this->tpl->setVariable('MEMBERS', $table_gui->getHTML()); $this->tpl->parseCurrentBlock(); } foreach (ilGroupParticipants::getMemberRoles($this->object->getRefId()) as $role_id) { // Do not show table if no user is assigned if (!$GLOBALS['rbacreview']->getNumberOfAssignedUsers(array($role_id))) { continue; } if ($ilUser->getPref('grp_role_hide' . $role_id)) { $table_gui = new ilGroupParticipantsTableGUI($this, 'role', false, $this->show_tracking, $role_id); $this->ctrl->setParameter($this, 'role_hide_' . $role_id, 0); $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this, 'members'), $this->lng->txt('show')); $this->ctrl->clearParameters($this); } else { $table_gui = new ilGroupParticipantsTableGUI($this, 'role', true, $this->show_tracking, $role_id); $this->ctrl->setParameter($this, 'role_hide_' . $role_id, 1); $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this, 'members'), $this->lng->txt('hide')); $this->ctrl->clearParameters($this); } $table_gui->setTitle(ilObject::_lookupTitle($role_id), 'icon_usr.gif', ilObject::_lookupTitle($role_id)); $table_gui->parse($this->readMemberData($GLOBALS['rbacreview']->assignedUsers($role_id))); $this->tpl->setCurrentBlock('member_block'); $this->tpl->setVariable('MEMBERS', $table_gui->getHTML()); $this->tpl->parseCurrentBlock(); } $this->tpl->setVariable('TXT_SELECTED_USER', $this->lng->txt('grp_selected_users')); $this->tpl->setVariable('BTN_FOOTER_EDIT', $this->lng->txt('edit')); $this->tpl->setVariable('BTN_FOOTER_VAL', $this->lng->txt('remove')); $this->tpl->setVariable('BTN_FOOTER_MAIL', $this->lng->txt('grp_mem_send_mail')); $this->tpl->setVariable('ARROW_DOWN', ilUtil::getImagePath('arrow_downright.svg')); }
public function editRatersObject() { global $ilTabs, $ilToolbar, $ilAccess; $appr_id = $_REQUEST["appr_id"] = $this->handleRatersAccess(); $has_write = $ilAccess->checkAccess("write", "", $this->ref_id); if ($has_write) { $ilTabs->clearTargets(); $ilTabs->setBackTarget($this->lng->txt("btn_back"), $this->ctrl->getLinkTarget($this, "listAppraisees")); } $this->ctrl->setParameter($this, "appr_id", $appr_id); $this->ctrl->setParameter($this, "rate360", 1); include_once './Services/Search/classes/class.ilRepositorySearchGUI.php'; ilRepositorySearchGUI::fillAutoCompleteToolbar($this, $ilToolbar, array('auto_complete_name' => $this->lng->txt('user'), 'submit_name' => $this->lng->txt('add'), 'add_search' => true, 'add_from_container' => $this->ref_id)); $this->ctrl->setParameter($this, "rate360", ""); $ilToolbar->addSeparator(); $ilToolbar->addButton($this->lng->txt("survey_360_add_external_rater"), $this->ctrl->getLinkTarget($this, "addExternalRaterForm")); // #13320 require_once "Services/Link/classes/class.ilLink.php"; $url = ilLink::_getStaticLink($this->object->getRefId()); include_once "Modules/Survey/classes/tables/class.ilSurveyAppraiseesTableGUI.php"; $tbl = new ilSurveyAppraiseesTableGUI($this, "editRaters", true, !$this->object->isAppraiseeClosed($appr_id), $url); // #11285 $tbl->setData($this->object->getRatersData($appr_id)); $this->tpl->setContent($tbl->getHTML()); }
public function editParticipants() { /** * @var $ilCtrl ilCtrl * @var $ilToolbar ilToolbarGUI * @var $lng $lng */ global $ilCtrl, $lng, $ilUser; $this->pluginObj->includeClass('class.ilXAVCMembers.php'); $this->pluginObj->includeClass('class.ilXAVCTableGUI.php'); $this->tabs->activateTab('participants'); $this->__setSubTabs('participants'); $this->tabs->activateSubTab("editParticipants"); $my_tpl = new ilTemplate($this->pluginObj->getDirectory() . "/templates/default/tpl.meeting_participant_table.html", true, true); $has_access = ilXAVCPermissions::hasAccess($ilUser->getId(), $this->object->getRefId(), AdobeConnectPermissions::PERM_ADD_PARTICIPANTS); if (count($this->object->getParticipantsObject()->getParticipants()) == 0 && $has_access) { global $ilToolbar; // add members include_once 'Services/Search/classes/class.ilRepositorySearchGUI.php'; $types = array('add_member' => $this->lng->txt('member'), 'add_admin' => $this->lng->txt('administrator')); ilRepositorySearchGUI::fillAutoCompleteToolbar($this, $ilToolbar, array('auto_complete_name' => $lng->txt('user'), 'user_type' => $types, 'submit_name' => $lng->txt('add'))); // add separator $ilToolbar->addSeparator(); // search button $ilToolbar->addButton($this->lng->txt("crs_search_members"), $ilCtrl->getLinkTargetByClass('ilRepositorySearchGUI', 'start')); } $this->pluginObj->includeClass('class.ilXAVCParticipantsTableGUI.php'); $this->pluginObj->includeClass('class.ilXAVCParticipantsDataProvider.php'); $table = new ilXAVCParticipantsTableGUI($this, "editParticipants"); global $ilDB; $table->setProvider(new ilXAVCParticipantsDataProvider($ilDB, $this)); $table->populate(); $my_tpl->setVariable('FORM', $table->getHTML() . $this->getPerformTriggerHtml()); $this->tpl->setContent($my_tpl->get()); }
/** * Displays a form which allows members to manage team uploads * * @access public */ function submissionScreenTeamObject() { global $ilToolbar; $team_id = $this->initTeamSubmission("showOverview"); // $this->tabs_gui->setTabActive("content"); // $this->addContentSubTabs("content"); // #13414 $read_only = mktime() > $this->ass->getDeadline() && $this->ass->getDeadline() != 0; if ($read_only) { ilUtil::sendInfo($this->lng->txt("exercise_time_over")); } else { $this->ctrl->setParameterByClass('ilRepositorySearchGUI', 'ctx', 1); $this->ctrl->setParameter($this, 'ctx', 1); // add member include_once './Services/Search/classes/class.ilRepositorySearchGUI.php'; ilRepositorySearchGUI::fillAutoCompleteToolbar($this, $ilToolbar, array('auto_complete_name' => $this->lng->txt('user'), 'submit_name' => $this->lng->txt('add'), 'add_search' => true, 'add_from_container' => $this->object->getRefId())); } include_once "Modules/Exercise/classes/class.ilExAssignmentTeamTableGUI.php"; $tbl = new ilExAssignmentTeamTableGUI($this, "submissionScreenTeam", ilExAssignmentTeamTableGUI::MODE_EDIT, $team_id, $this->ass, null, $read_only); $this->tpl->setContent($tbl->getHTML()); }
/** * Creates the toolbar for assigning users. The Toolbar consists of an autocompletion text input * for ILIAS-Users and a button for assigning them to the class. Furthermore a button for * an extended search (groups, courses, ...) is added. * * @return \ilToolbarGUI */ private function createUserAssignmentToolbar() { $toolbar = new ilToolbarGUI(); ilRepositorySearchGUI::fillAutoCompleteToolbar($this, $toolbar, array("auto_complete_name" => $this->lng->txt('user'), "submit_name" => $this->lng->txt("add"))); $toolbar->addSpacer(); $toolbar->addButton($this->lng->txt("search_user"), $this->ctrl->getLinkTargetByClass("ilRepositorySearchGUI", "start")); return $toolbar; }
/** * 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')); $table_gui->parse(); $this->tpl->setVariable('ADMINS', $table_gui->getHTML()); } if ($rbacreview->getNumberOfAssignedUsers(array($this->object->getDefaultTutorRole()))) { if ($ilUser->getPref('crs_tutor_hide')) { $table_gui = new ilCourseParticipantsTableGUI($this, 'tutor', false, false, $this->timings_enabled, true, $this->object->getDefaultTutorRole(), $this->object->getStatusDetermination() == ilObjCourse::STATUS_DETERMINATION_LP); $this->ctrl->setParameter($this, 'tutor_hide', 0); $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this, 'members'), $this->lng->txt('show')); $this->ctrl->clearParameters($this); } else { $table_gui = new ilCourseParticipantsTableGUI($this, 'tutor', true, false, $this->timings_enabled, true, $this->object->getDefaultTutorRole(), $this->object->getStatusDetermination() == ilObjCourse::STATUS_DETERMINATION_LP); $this->ctrl->setParameter($this, 'tutor_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_tutors'), 'icon_usr.svg', $this->lng->txt('crs_tutors')); $table_gui->parse(); $this->tpl->setVariable('TUTORS', $table_gui->getHTML()); } if ($rbacreview->getNumberOfAssignedUsers(array($this->object->getDefaultMemberRole()))) { if ($ilUser->getPref('crs_member_hide')) { $table_gui = new ilCourseParticipantsTableGUI($this, 'member', false, $this->show_tracking, $this->timings_enabled, true, $this->object->getDefaultMemberRole(), $this->object->getStatusDetermination() == ilObjCourse::STATUS_DETERMINATION_LP); $this->ctrl->setParameter($this, 'member_hide', 0); $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this, 'members'), $this->lng->txt('show')); $this->ctrl->clearParameters($this); } else { $table_gui = new ilCourseParticipantsTableGUI($this, 'member', true, $this->show_tracking, $this->timings_enabled, true, $this->object->getDefaultMemberRole(), $this->object->getStatusDetermination() == ilObjCourse::STATUS_DETERMINATION_LP); $this->ctrl->setParameter($this, 'member_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_members'), 'icon_usr.svg', $this->lng->txt('crs_members')); $table_gui->parse(); $this->tpl->setCurrentBlock('member_block'); $this->tpl->setVariable('MEMBERS', $table_gui->getHTML()); $this->tpl->parseCurrentBlock(); } foreach (ilCourseParticipants::getMemberRoles($this->object->getRefId()) as $role_id) { // Do not show table if no user is assigned if (!$GLOBALS['rbacreview']->getNumberOfAssignedUsers(array($role_id))) { continue; } if ($ilUser->getPref('crs_role_hide_' . $role_id)) { $table_gui = new ilCourseParticipantsTableGUI($this, 'role', false, $this->show_tracking, $this->timings_enabled, true, $role_id, $this->object->getStatusDetermination() == ilObjCourse::STATUS_DETERMINATION_LP); $this->ctrl->setParameter($this, 'role_hide_' . $role_id, 0); $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this, 'members'), $this->lng->txt('show')); $this->ctrl->clearParameters($this); } else { $table_gui = new ilCourseParticipantsTableGUI($this, 'role', true, $this->show_tracking, $this->timings_enabled, true, $role_id, $this->object->getStatusDetermination() == ilObjCourse::STATUS_DETERMINATION_LP); $this->ctrl->setParameter($this, 'role_hide_' . $role_id, 1); $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this, 'members'), $this->lng->txt('hide')); $this->ctrl->clearParameters($this); } $table_gui->setTitle(ilObject::_lookupTitle($role_id), 'icon_usr.svg', $this->lng->txt('crs_members')); $table_gui->parse(); $this->tpl->setCurrentBlock('member_block'); $this->tpl->setVariable('MEMBERS', $table_gui->getHTML()); $this->tpl->parseCurrentBlock(); } $this->tpl->setVariable('TXT_SELECTED_USER', $this->lng->txt('crs_selected_users')); $this->tpl->setVariable('BTN_FOOTER_EDIT', $this->lng->txt('edit')); $this->tpl->setVariable('BTN_FOOTER_VAL', $this->lng->txt('remove')); $this->tpl->setVariable('BTN_FOOTER_MAIL', $this->lng->txt('crs_mem_send_mail')); $this->tpl->setVariable('ARROW_DOWN', ilUtil::getImagePath('arrow_downright.svg')); }
/** * edit members * * @access public * @return */ public function membersObject() { global $ilUser, $ilToolbar, $lng, $ilCtrl; include_once './Modules/Group/classes/class.ilGroupParticipants.php'; include_once './Modules/Group/classes/class.ilGroupParticipantsTableGUI.php'; $this->checkPermission('write'); include_once './Services/Tracking/classes/class.ilObjUserTracking.php'; include_once './Services/Tracking/classes/class.ilLPObjSettings.php'; $this->show_tracking = (ilObjUserTracking::_enabledLearningProgress() and ilObjUserTracking::_enabledUserRelatedData() and ilLPObjSettings::_lookupMode($this->object->getId()) != LP_MODE_DEACTIVATED); $part = ilGroupParticipants::_getInstanceByObjId($this->object->getId()); $this->setSubTabs('members'); $this->tabs_gui->setTabActive('members'); $this->tabs_gui->setSubTabActive('grp_edit_members'); $this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.grp_edit_members.html', 'Modules/Group'); $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' => array(ilObjGroup::GRP_MEMBER => $lng->txt("member"), ilObjGroup::GRP_ADMIN => $lng->txt("administrator")), 'submit_name' => $lng->txt('add'))); // spacer $ilToolbar->addSeparator(); // search button $ilToolbar->addButton($this->lng->txt("grp_search_users"), $this->ctrl->getLinkTargetByClass('ilRepositorySearchGUI', 'start')); $ilToolbar->addSeparator(); // print button $ilToolbar->addButton($this->lng->txt("grp_print_list"), $this->ctrl->getLinkTarget($this, 'printMembers')); $this->setShowHidePrefs(); // Waiting list table include_once './Modules/Group/classes/class.ilGroupWaitingList.php'; $waiting_list = new ilGroupWaitingList($this->object->getId()); if (count($wait = $waiting_list->getAllUsers())) { include_once './Services/Membership/classes/class.ilWaitingListTableGUI.php'; if ($ilUser->getPref('grp_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'), '', ilUtil::getImagePath('edit_add.png')); $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'), '', ilUtil::getImagePath('edit_remove.png')); $this->ctrl->clearParameters($this); } $table_gui->setUsers($wait); $table_gui->setTitle($this->lng->txt('grp_header_waiting_list'), 'icon_usr.png', $this->lng->txt('group_new_registrations')); $this->tpl->setVariable('TABLE_SUB', $table_gui->getHTML()); } // Subscriber table if ($part->getSubscribers()) { include_once './Services/Membership/classes/class.ilSubscriberTableGUI.php'; if ($ilUser->getPref('grp_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'), '', ilUtil::getImagePath('edit_add.png')); $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'), '', ilUtil::getImagePath('edit_remove.png')); $this->ctrl->clearParameters($this); } $table_gui->readSubscriberData(); $table_gui->setTitle($this->lng->txt('group_new_registrations'), 'icon_usr.png', $this->lng->txt('group_new_registrations')); $this->tpl->setVariable('TABLE_SUB', $table_gui->getHTML()); } if (count($part->getAdmins())) { if ($ilUser->getPref('grp_admin_hide')) { $table_gui = new ilGroupParticipantsTableGUI($this, 'admin', false, false); $this->ctrl->setParameter($this, 'admin_hide', 0); $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this, 'members'), $this->lng->txt('show'), '', ilUtil::getImagePath('edit_add.png')); $this->ctrl->clearParameters($this); } else { $table_gui = new ilGroupParticipantsTableGUI($this, 'admin', true, false); $this->ctrl->setParameter($this, 'admin_hide', 1); $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this, 'members'), $this->lng->txt('hide'), '', ilUtil::getImagePath('edit_remove.png')); $this->ctrl->clearParameters($this); } $table_gui->setTitle($this->lng->txt('grp_admins'), 'icon_usr.png', $this->lng->txt('grp_admins')); $table_gui->parse($this->readMemberData($part->getAdmins())); $this->tpl->setVariable('ADMINS', $table_gui->getHTML()); } if (count($part->getMembers())) { if ($ilUser->getPref('grp_member_hide')) { $table_gui = new ilGroupParticipantsTableGUI($this, 'member', false, $this->show_tracking); $this->ctrl->setParameter($this, 'member_hide', 0); $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this, 'members'), $this->lng->txt('show'), '', ilUtil::getImagePath('edit_add.png')); $this->ctrl->clearParameters($this); } else { $table_gui = new ilGroupParticipantsTableGUI($this, 'member', true, $this->show_tracking); $this->ctrl->setParameter($this, 'member_hide', 1); $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this, 'members'), $this->lng->txt('hide'), '', ilUtil::getImagePath('edit_remove.png')); $this->ctrl->clearParameters($this); } $table_gui->setTitle($this->lng->txt('grp_members'), 'icon_usr.png', $this->lng->txt('grp_members')); $table_gui->parse($this->readMemberData($part->getMembers())); $this->tpl->setVariable('MEMBERS', $table_gui->getHTML()); } $this->tpl->setVariable('TXT_SELECTED_USER', $this->lng->txt('grp_selected_users')); $this->tpl->setVariable('BTN_FOOTER_EDIT', $this->lng->txt('edit')); $this->tpl->setVariable('BTN_FOOTER_VAL', $this->lng->txt('remove')); $this->tpl->setVariable('BTN_FOOTER_MAIL', $this->lng->txt('grp_mem_send_mail')); $this->tpl->setVariable('ARROW_DOWN', ilUtil::getImagePath('arrow_downright.png')); }
/** * Show users * * @param * @return */ function showUsers() { global $lng, $tpl, $ilToolbar; // add member include_once './Services/Search/classes/class.ilRepositorySearchGUI.php'; ilRepositorySearchGUI::fillAutoCompleteToolbar($this, $ilToolbar, array('auto_complete_name' => $lng->txt('user'), 'submit_name' => $lng->txt('skmg_assign_user'))); $this->setTabs("users"); include_once "./Services/Skill/classes/class.ilSkillProfileUserTableGUI.php"; $tab = new ilSkillProfileUserTableGUI($this, "showUsers", $this->profile); $tpl->setContent($tab->getHTML()); }
/** * */ public function showModerators() { /** * @var $ilToolbar ilToolbarGUI * @var $lng ilLanguage */ global $ilToolbar, $lng; include_once './Services/Search/classes/class.ilRepositorySearchGUI.php'; ilRepositorySearchGUI::fillAutoCompleteToolbar($this, $ilToolbar, array('auto_complete_name' => $lng->txt('user'), 'submit_name' => $lng->txt('add'), 'add_search' => true, 'add_from_container' => $this->oForumModerators->getRefId())); $tbl = new ilTable2GUI($this); $tbl->setId('frm_show_mods_tbl_' . (int) $_GET['ref_id']); $tbl->setFormAction($this->ctrl->getFormAction($this, 'detachModeratorRole')); $tbl->setTitle($this->lng->txt('frm_moderators')); $tbl->setRowTemplate('tpl.forum_moderators_table_row.html', 'Modules/Forum'); $tbl->setDefaultOrderField('login'); $entries = $this->oForumModerators->getCurrentModerators(); $num = count($entries); if ($num > 1) { $tbl->addColumn('', 'check', '1%', true); $tbl->setSelectAllCheckbox('usr_id'); $tbl->addMultiCommand('detachModeratorRole', $this->lng->txt('frm_detach_moderator_role')); } else { if (!$entries) { $tbl->setNoEntriesText($this->lng->txt('frm_moderators_not_exist_yet')); } } $tbl->addColumn($this->lng->txt('login'), 'login', '30%'); $tbl->addColumn($this->lng->txt('firstname'), 'firstname', '30%'); $tbl->addColumn($this->lng->txt('lastname'), 'lastname', '30%'); $result = array(); $i = 0; foreach ($entries as $usr_id) { /** * @var $user ilObjUser */ $user = ilObjectFactory::getInstanceByObjId($usr_id); if ($num > 1) { $result[$i]['check'] = ilUtil::formCheckbox(false, 'usr_id[]', $user->getId()); } $result[$i]['login'] = $user->getLogin(); $result[$i]['firstname'] = $user->getFirstname(); $result[$i]['lastname'] = $user->getLastname(); ++$i; } $tbl->setData($result); $this->tpl->setContent($tbl->getHTML()); }
function contributors() { global $ilTabs, $ilToolbar, $ilCtrl, $lng, $tpl; if (!$this->checkPermissionBool("write")) { return; } $ilTabs->activateTab("contributors"); // add member include_once './Services/Search/classes/class.ilRepositorySearchGUI.php'; ilRepositorySearchGUI::fillAutoCompleteToolbar($this, $ilToolbar, array('auto_complete_name' => $lng->txt('user'), 'submit_name' => $lng->txt('add'), 'add_search' => true, 'add_from_container' => $this->node_id)); $other_roles = $this->object->getRolesWithContribute($this->node_id); if ($other_roles) { ilUtil::sendInfo(sprintf($lng->txt("blog_contribute_other_roles"), implode(", ", $other_roles))); } include_once "Modules/Blog/classes/class.ilContributorTableGUI.php"; $tbl = new ilContributorTableGUI($this, "contributors", $this->object->getLocalContributorRole($this->node_id)); $tpl->setContent($tbl->getHTML()); }
/** * Creates the output for user/group invitation to a survey */ public function inviteObject() { global $ilAccess; global $rbacsystem; global $ilToolbar; global $lng; if (!$rbacsystem->checkAccess("visible,invite", $this->ref_id)) { // allow only read and write access ilUtil::sendInfo($this->lng->txt("cannot_edit_survey"), true); $path = $this->tree->getPathFull($this->object->getRefID()); include_once "./Services/Utilities/classes/class.ilUtil.php"; ilUtil::redirect($this->getReturnLocation("cancel", "./ilias.php?baseClass=ilRepositoryGUI&cmd=frameset&ref_id=" . $path[count($path) - 2]["child"])); return; } if ($this->object->getStatus() == STATUS_OFFLINE) { ilUtil::sendInfo($this->lng->txt("survey_offline_message")); return; } include_once "./Services/Form/classes/class.ilPropertyFormGUI.php"; $form = new ilPropertyFormGUI(); $form->setFormAction($this->ctrl->getFormAction($this)); $form->setTableWidth("500"); $form->setId("invite"); // invitation $header = new ilFormSectionHeaderGUI(); $header->setTitle($this->lng->txt("invitation")); $form->addItem($header); // invitation mode $invitation = new ilRadioGroupInputGUI($this->lng->txt('invitation_mode'), "invitation"); $invitation->setInfo($this->lng->txt('invitation_mode_desc')); $invitation->addOption(new ilRadioOption($this->lng->txt("invitation_off"), 0, '')); $surveySetting = new ilSetting("survey"); if ($surveySetting->get("unlimited_invitation")) { $invitation->addOption(new ilRadioOption($this->lng->txt("unlimited_users"), 1, '')); } $invitation->addOption(new ilRadioOption($this->lng->txt("predefined_users"), 2, '')); $inv = 0; if ($this->object->getInvitation()) { $inv = $this->object->getInvitationMode() + 1; } $invitation->setValue($inv); $form->addItem($invitation); $form->addCommandButton("saveInvitationStatus", $this->lng->txt("save")); $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_svy_svy_invite.html", "Modules/Survey"); $this->tpl->setVariable("INVITATION_TABLE", $form->getHTML()); if ($this->object->getInvitation() && $this->object->getInvitationMode() == 1) { // search button include_once './Services/Search/classes/class.ilRepositorySearchGUI.php'; ilRepositorySearchGUI::fillAutoCompleteToolbar($this, $tb, array('auto_complete_name' => $lng->txt('user'), 'submit_name' => $lng->txt('svy_invite_action'))); $ilToolbar->addSpacer(); $ilToolbar->addButton($this->lng->txt("svy_search_users"), $this->ctrl->getLinkTargetByClass('ilRepositorySearchGUI', '')); $this->tpl->setVariable("ADM_CONTENT", $form->getHTML()); $invited_users = $this->object->getUserData($this->object->getInvitedUsers()); include_once "./Modules/Survey/classes/tables/class.ilSurveyInvitedUsersTableGUI.php"; $table_gui = new ilSurveyInvitedUsersTableGUI($this, 'invite'); $table_gui->setData($invited_users); $this->tpl->setVariable('TBL_INVITED_USERS', $table_gui->getHTML()); } }
public function vendorsObject($a_show_confirm = false) { // include_once './Services/Payment/classes/class.ilPaymentBookings.php'; #include_once './Services/Table/classes/class.ilTable2GUI.php'; global $rbacsystem, $ilToolbar; // MINIMUM ACCESS LEVEL = 'read' if (!$rbacsystem->checkAccess('read', $this->object->getRefId())) { $this->ilErr->raiseError($this->lng->txt('msg_no_perm_read'), $this->ilErr->MESSAGE); } $_SESSION['pays_vendor'] = is_array($_SESSION['pays_vendor']) ? $_SESSION['pays_vendor'] : array(); $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.main_view.html', 'Services/Payment'); // add vendors ilRepositorySearchGUI::fillAutoCompleteToolbar($this, $ilToolbar, array('auto_complete_name' => $this->lng->txt('user'), 'user_type' => null, 'submit_name' => $this->lng->txt('add'))); if (!count($vendors = $this->vendors_obj->getVendors())) { ilUtil::sendInfo($this->lng->txt('pay_no_vendors_created')); } if ($a_show_confirm) { $oConfirmationGUI = new ilConfirmationGUI(); // set confirm/cancel commands $oConfirmationGUI->setFormAction($this->ctrl->getFormAction($this, "performDeleteVendors")); $oConfirmationGUI->setHeaderText($this->lng->txt("pays_sure_delete_selected_vendors")); $oConfirmationGUI->setCancel($this->lng->txt("cancel"), "vendors"); $oConfirmationGUI->setConfirm($this->lng->txt("confirm"), "performDeleteVendors"); foreach ($vendors as $vendor) { if (in_array($vendor['vendor_id'], $_SESSION['pays_vendor'])) { // GET USER OBJ if ($tmp_obj = ilObjectFactory::getInstanceByObjId($vendor['vendor_id'], false)) { $delete_row = ''; $delete_row = $tmp_obj->getLogin() . ' ' . $vendor['cost_center'] . ' ' . ilPaymentBookings::_getCountBookingsByVendor($vendor['vendor_id']); $oConfirmationGUI->addItem('', $delete_row, $delete_row); unset($tmp_obj); } } } // END VENDORS TABLE if (count($vendors) == count($_SESSION['pays_vendor'])) { ilUtil::sendInfo($this->lng->txt('shop_disabled_no_vendors')); $_SESSION['disable_shop'] = true; } $this->tpl->setVariable('CONFIRMATION', $oConfirmationGUI->getHTML()); # return true; } $counter = 0; $f_result = array(); foreach ($vendors as $vendor) { // GET USER OBJ if ($tmp_obj = ilObjectFactory::getInstanceByObjId($vendor['vendor_id'], false)) { $f_result[$counter]['vendor_id'] = ilUtil::formCheckbox(in_array($vendor['vendor_id'], $_SESSION['pays_vendor']) ? 1 : 0, "vendor[]", $vendor['vendor_id']); $f_result[$counter]['login'] = $tmp_obj->getLogin(); $f_result[$counter]['cost_center'] = $vendor['cost_center']; $f_result[$counter]['number_bookings'] = ilPaymentBookings::_getCountBookingsByVendor($vendor['vendor_id']); unset($tmp_obj); ++$counter; } } // END VENDORS TABLE $this->__showVendorsTable($f_result); return true; }
/** * display user assignment panel */ function userassignmentObject() { global $rbacreview, $rbacsystem, $lng, $ilUser; //if (!$rbacsystem->checkAccess("edit_userassignment", $this->rolf_ref_id)) if (!$this->checkAccess('edit_userassignment', 'edit_permission')) { $this->ilias->raiseError($this->lng->txt("msg_no_perm_assign_user_to_role"), $this->ilias->error_obj->MESSAGE); } $this->tabs_gui->setTabActive('user_assignment'); $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.rbac_ua.html', 'Services/AccessControl'); include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php'; $tb = new ilToolbarGUI(); // protected admin role include_once './Services/PrivacySecurity/classes/class.ilSecuritySettings.php'; if ($this->object->getId() != SYSTEM_ROLE_ID || (!$rbacreview->isAssigned($ilUser->getId(), SYSTEM_ROLE_ID) or !ilSecuritySettings::_getInstance()->isAdminRoleProtected())) { // add member include_once './Services/Search/classes/class.ilRepositorySearchGUI.php'; ilRepositorySearchGUI::fillAutoCompleteToolbar($this, $tb, array('auto_complete_name' => $lng->txt('user'), 'submit_name' => $lng->txt('add'))); /* // add button $tb->addFormButton($lng->txt("add"), "assignUser"); */ $tb->addSpacer(); $tb->addButton($this->lng->txt('search_user'), $this->ctrl->getLinkTargetByClass('ilRepositorySearchGUI', 'start')); $tb->addSpacer(); } $tb->addButton($this->lng->txt('role_mailto'), $this->ctrl->getLinkTarget($this, 'mailToRole')); $this->tpl->setVariable('BUTTONS_UA', $tb->getHTML()); include_once './Services/PrivacySecurity/classes/class.ilSecuritySettings.php'; $role_assignment_editable = true; if ($this->object->getId() == SYSTEM_ROLE_ID && !ilSecuritySettings::_getInstance()->checkAdminRoleAccessible($ilUser->getId())) { $role_assignment_editable = false; } include_once './Services/AccessControl/classes/class.ilAssignedUsersTableGUI.php'; $ut = new ilAssignedUsersTableGUI($this, 'userassignment', $this->object->getId(), $role_assignment_editable); $this->tpl->setVariable('TABLE_UA', $ut->getHTML()); return true; }
protected function addOtherRolesToolbar() { $arrLocalRoles = $this->rbacreview->getLocalRoles($this->parent_object->getRefId()); $types = array(); foreach ($arrLocalRoles as $role_id) { $ilObjRole = new ilObjRole($role_id); if (!preg_match("/il_orgu_/", $ilObjRole->getUntranslatedTitle())) { $types[$role_id] = $ilObjRole->getPresentationTitle(); } } $this->ctrl->setParameterByClass('ilRepositorySearchGUI', 'addusertype', 'other'); ilRepositorySearchGUI::fillAutoCompleteToolbar($this, $this->toolbar, array('auto_complete_name' => $this->lng->txt('user'), 'user_type' => $types, 'submit_name' => $this->lng->txt('add'))); }
function contributors() { global $ilTabs, $ilToolbar, $ilCtrl, $lng, $tpl; if (!$this->checkPermissionBool("write")) { return; } $ilTabs->activateTab("contributors"); // add member include_once './Services/Search/classes/class.ilRepositorySearchGUI.php'; ilRepositorySearchGUI::fillAutoCompleteToolbar($this, $ilToolbar, array('auto_complete_name' => $lng->txt('user'), 'submit_name' => $lng->txt('add'))); $ilToolbar->addSpacer(); $ilToolbar->addButton($lng->txt("blog_search_users"), $ilCtrl->getLinkTargetByClass('ilRepositorySearchGUI', '')); $ilToolbar->setFormAction($ilCtrl->getFormAction($this)); $parent_container_id = $this->object->getParentContainerId($this->node_id); if ($parent_container_id) { $ilCtrl->setParameterByClass('ilRepositorySearchGUI', "list_obj", $parent_container_id); $ilToolbar->addSpacer(); $ilToolbar->addButton($lng->txt("blog_contributor_container_add"), $ilCtrl->getLinkTarget($this, "addContributorContainer")); } $other_roles = $this->object->getRolesWithContribute($this->node_id); if ($other_roles) { ilUtil::sendInfo(sprintf($lng->txt("blog_contribute_other_roles"), implode(", ", $other_roles))); } include_once "Modules/Blog/classes/class.ilContributorTableGUI.php"; $tbl = new ilContributorTableGUI($this, "contributors", $this->object->getLocalContributorRole($this->node_id)); $tpl->setContent($tbl->getHTML()); }