19declare(strict_types=1);
85 $this->
ctrl = $DIC->ctrl();
86 $this->tpl =
$DIC->ui()->mainTemplate();
87 $this->tree =
$DIC->repositoryTree();
88 $this->ui_renderer =
$DIC->ui()->renderer();
89 $this->ui_factory =
$DIC->ui()->factory();
90 $this->
lng = $DIC->language();
91 $this->rbacreview =
$DIC->rbac()->review();
93 $this->
http = $DIC->http();
94 $this->
user = $DIC->user();
95 $this->
tabs = $DIC->tabs();
97 $this->
lng->loadLanguageModule(
'search');
98 $this->
lng->loadLanguageModule(
'crs');
100 $this->
setTitle($this->
lng->txt(
'add_members_header'));
106 $this->result_obj->setMaxHits(1000000);
112 if ($this->
http->wrapper()->query()->has(
'user_type')) {
113 return $this->
http->wrapper()->query()->retrieve(
115 $this->
refinery->kindlyTo()->string()
123 if ($this->
http->wrapper()->post()->has(
'user_type')) {
124 return $this->
http->wrapper()->post()->retrieve(
126 $this->
refinery->kindlyTo()->string()
147 $this->search_title = $a_title;
157 $this->searchable_check = $a_status;
195 object $parent_object,
197 array $a_options = [],
198 bool $a_sticky =
false
202 $ilToolbar =
$DIC->toolbar();
204 $ilCtrl =
$DIC->ctrl();
209 $toolbar = $ilToolbar;
213 if (!isset($a_options[
'auto_complete_name'])) {
214 $a_options[
'auto_complete_name'] =
$lng->
txt(
'obj_user');
216 if (!isset($a_options[
'auto_complete_size'])) {
217 $a_options[
'auto_complete_size'] = 15;
219 if (!isset($a_options[
'submit_name'])) {
220 $a_options[
'submit_name'] =
$lng->
txt(
'btn_add');
222 if (!isset($a_options[
'user_type_default'])) {
223 $a_options[
'user_type_default'] =
null;
226 if (!isset($a_options[
'add_search'])) {
227 $a_options[
'add_search'] =
false;
229 if (!isset($a_options[
'add_from_container'])) {
230 $a_options[
'add_from_container'] =
null;
233 $ajax_url = $ilCtrl->getLinkTargetByClass(
234 array(get_class($parent_object),
'ilRepositorySearchGUI'),
235 'doUserAutoComplete',
241 $ul =
new ilTextInputGUI($a_options[
'auto_complete_name'],
'user_login');
242 $ul->setDataSource($ajax_url);
243 $ul->setSize($a_options[
'auto_complete_size']);
245 $toolbar->addInputItem($ul,
true);
247 $toolbar->addStickyItem($ul,
true);
250 if (isset($a_options[
'user_type']) && count((array) $a_options[
'user_type'])) {
252 $si->setOptions($a_options[
'user_type']);
253 $si->setValue($a_options[
'user_type_default']);
255 $toolbar->addInputItem($si);
257 $toolbar->addStickyItem($si);
262 if ($clip->hasContent()) {
266 $add_button->setCaption($a_options[
'submit_name'],
false);
267 $add_button->setCommand(
'addUserFromAutoComplete');
269 $action_button->setDefaultButton($add_button);
272 $clip_button->addCSSClass(
'btn btndefault');
274 $clip_button->setCaption(
$lng->
txt(
'clipboard_add_from_btn'),
false);
275 $clip_button->setCommand(
'showClipboard');
279 $toolbar->addButtonInstance($action_button);
282 $button->setCaption($a_options[
'submit_name'],
false);
283 $button->setCommand(
'addUserFromAutoComplete');
285 $toolbar->addButtonInstance($button);
287 $toolbar->addStickyItem($button);
291 if ($a_options[
'add_search'] ||
292 is_numeric($a_options[
'add_from_container'])) {
295 $toolbar->addSeparator();
297 if ($a_options[
'add_search']) {
299 $button->setCaption(
"search_users");
300 $button->setUrl($ilCtrl->getLinkTargetByClass(
'ilRepositorySearchGUI',
''));
301 $toolbar->addButtonInstance($button);
304 if (is_numeric($a_options[
'add_from_container'])) {
305 $parent_ref_id = (
int) $a_options[
'add_from_container'];
307 $parent_container_type =
"grp";
308 if (!$parent_container_ref_id) {
310 $parent_container_type =
"crs";
312 if ($parent_container_ref_id) {
313 if ($a_options[
'add_search']) {
314 $toolbar->addSpacer();
317 $ilCtrl->setParameterByClass(
'ilRepositorySearchGUI',
"list_obj",
ilObject::_lookupObjId($parent_container_ref_id));
320 $button->setCaption(
"search_add_members_from_container_" . $parent_container_type);
321 $button->setUrl($ilCtrl->getLinkTargetByClass(array(get_class($parent_object),
'ilRepositorySearchGUI'),
'listUsers'));
322 $toolbar->addButtonInstance($button);
327 $toolbar->setFormAction(
328 $ilCtrl->getFormActionByClass(
330 get_class($parent_object),
331 'ilRepositorySearchGUI')
341 echo json_encode(
new stdClass(), JSON_THROW_ON_ERROR);
344 if (!$this->
http->wrapper()->query()->has(
'autoCompleteField')) {
351 $result_field =
'login';
353 $auto_complete_field = $this->
http->wrapper()->query()->retrieve(
355 $this->
refinery->kindlyTo()->string()
357 $a_fields = [$auto_complete_field];
358 $result_field = $auto_complete_field;
361 $auto->setPrivacyMode($this->getPrivacyMode());
363 if ($this->
http->wrapper()->query()->has(
'fetchall')) {
367 $auto->setMoreLinkAvailable(
true);
368 $auto->setSearchFields($a_fields);
369 $auto->setResultField($result_field);
370 $auto->enableFieldSearchableCheck(
true);
371 $auto->setUserLimitations($this->getUserLimitations());
372 if (is_callable($this->user_filter)) {
373 $auto->addUserAccessFilterCallable(Closure::fromCallable($this->user_filter));
377 if ($this->
http->wrapper()->post()->has(
'term')) {
378 $query = $this->
http->wrapper()->post()->retrieve(
380 $this->
refinery->kindlyTo()->string()
384 if ($this->
http->wrapper()->query()->has(
'term')) {
385 $query = $this->
http->wrapper()->query()->retrieve(
387 $this->
refinery->kindlyTo()->string()
391 echo $auto->getList(
$query);
399 $search[
'string'] = $this->
string = $a_str;
404 return $this->string;
409 $next_class = $this->
ctrl->getNextClass($this);
410 $cmd = $this->
ctrl->getCmd();
411 switch ($next_class) {
432 $this->
ctrl->returnToParent($this);
438 $this->__clearSession();
447 $class = $this->role_callback[
'class'];
448 $method = $this->role_callback[
'method'];
453 if ($this->
http->wrapper()->post()->has(
'obj')) {
454 $obj_ids = $this->
http->wrapper()->post()->retrieve(
456 $this->
refinery->kindlyTo()->listOf($this->refinery->kindlyTo()->int())
460 foreach ($obj_ids as
$id) {
462 if ($obj_type ==
"crs" || $obj_type ==
"grp") {
466 $role_ids[] = $mem_role;
471 $class->$method($role_ids);
473 $this->showSearchResults();
478 $class = $this->callback[
'class'];
479 $method = $this->callback[
'method'];
482 if ($this->
http->wrapper()->post()->has(
'user')) {
483 $users = $this->
http->wrapper()->post()->retrieve(
485 $this->
refinery->kindlyTo()->listOf($this->refinery->kindlyTo()->int())
491 $class->$method($users);
493 $this->showSearchResults();
499 $class = $this->callback[
'class'];
500 $method = $this->callback[
'method'];
503 if ($this->
http->wrapper()->post()->has(
'user_login')) {
504 $post_users = $this->
http->wrapper()->post()->retrieve(
506 $this->
refinery->kindlyTo()->string()
510 $users = explode(
',', $post_users);
512 foreach ($users as $user) {
515 $user_ids[] = $user_id;
519 $user_type = $this->initUserTypeFromPost();
520 if (!$class->$method($user_ids, $user_type)) {
521 $this->
ctrl->returnToParent($this);
527 $user_type = $this->initUserTypeFromQuery();
528 if ($user_type ===
'') {
529 $user_type = $this->initUserTypeFromPost();
531 $this->
ctrl->setParameter($this,
'user_type', $user_type);
532 $this->
tabs->clearTargets();
533 $this->
tabs->setBackTarget(
534 $this->
lng->txt(
'back'),
535 $this->ctrl->getParentReturn($this)
539 $clip->setFormAction($this->
ctrl->getFormAction($this));
543 $this->tpl->setContent($clip->getHTML());
549 $user_type = $this->initUserTypeFromPost();
550 if ($user_type ===
'') {
551 $user_type = $this->initUserTypeFromQuery();
553 $this->
ctrl->setParameter($this,
'user_type', $user_type);
556 if ($this->
http->wrapper()->post()->has(
'uids')) {
557 $users = $this->
http->wrapper()->post()->retrieve(
559 $this->
refinery->kindlyTo()->dictOf(
560 $this->refinery->kindlyTo()->int()
564 if (!count($users)) {
565 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'),
true);
566 $this->
ctrl->redirect($this,
'showClipboard');
568 $class = $this->callback[
'class'];
569 $method = $this->callback[
'method'];
570 if (!$class->$method($users, $user_type)) {
571 $this->
ctrl->returnToParent($this);
579 if ($this->
http->wrapper()->post()->has(
'uids')) {
580 $users = $this->
http->wrapper()->post()->retrieve(
582 $this->
refinery->kindlyTo()->listOf(
583 $this->refinery->kindlyTo()->int()
588 $this->
ctrl->setParameter($this,
'user_type', $this->initUserTypeFromQuery());
589 if (!count($users)) {
590 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'),
true);
591 $this->
ctrl->redirect($this,
'showClipboard');
595 $clip->delete($users);
598 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'),
true);
599 $this->
ctrl->redirect($this,
'showClipboard');
609 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'),
true);
610 $this->
ctrl->returnToParent($this);
616 $class = $this->callback[
'class'];
617 $method = $this->callback[
'method'];
619 $post_user = (array) ($this->
http->request()->getParsedBody()[
'user'] ?? []);
620 $post_selected_command =
'';
622 $this->
http->wrapper()->post()->has(
'table_top_cmd') &&
623 $this->
http->wrapper()->post()->has(
'selectedCommand_2')
625 $post_selected_command = $this->
http->wrapper()->post()->retrieve(
627 $this->
refinery->kindlyTo()->string()
629 } elseif ($this->
http->wrapper()->post()->has(
'selectedCommand')) {
630 $post_selected_command = $this->
http->wrapper()->post()->retrieve(
632 $this->
refinery->kindlyTo()->string()
636 if (!$class->$method($post_user, $post_selected_command)) {
637 $this->showSearchResults();
647 array $a_add_options = [],
648 string $default_option =
''
650 $this->callback = array(
'class' => $class,
'method' => $method);
651 $this->add_options = $a_add_options;
652 $this->default_option = $default_option;
661 array $a_add_options = [],
662 string $default_option =
''
664 $this->role_callback = array(
'class' => $class,
'method' => $method);
665 $this->add_options = $a_add_options;
666 $this->default_option = $default_option;
681 $this->initFormSearch();
682 $this->tpl->setContent($this->
form->getHTML());
688 if ($this->
http->wrapper()->query()->has(
'selected_id')) {
689 $selected = $this->
http->wrapper()->query()->retrieve(
694 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.rep_search_result.html',
'Services/Search');
695 $this->addNewSearchButton();
696 $this->showSearchUserTable([$selected],
'showSearchResults');
702 $this->
form->setFormAction($this->
ctrl->getFormAction($this,
'showSearch'));
703 $this->
form->setTitle($this->getTitle());
704 $this->
form->addCommandButton(
'performSearch', $this->
lng->txt(
'search'));
705 $this->
form->addCommandButton(
'cancel', $this->
lng->txt(
'cancel'));
709 $kind->setValue($this->search_type);
710 $this->
form->addItem($kind);
721 $sel =
new ilSelectInputGUI($info[
'lang'],
"rep_query[usr][" . $info[
'db'] .
"]");
722 $sel->setOptions($info[
'values']);
723 $users->addSubItem($sel);
730 if (isset($info[
'autoComplete']) and $info[
'autoComplete']) {
731 $this->
ctrl->setParameterByClass(get_class($this),
'autoCompleteField', $info[
'db']);
732 $ul =
new ilTextInputGUI($info[
'lang'],
"rep_query[usr][" . $info[
'db'] .
"]");
733 $ul->setDataSourceSubmitOnSelection(
true);
734 $ul->setDataSourceSubmitUrl(
735 $this->
ctrl->getLinkTarget(
737 'showSearchSelected',
743 $ul->setDataSource($this->
ctrl->getLinkTarget(
745 "doUserAutoComplete",
750 $ul->setMaxLength(120);
753 switch ($info[
'db']) {
768 $users->addSubItem($ul);
772 $txt->setMaxLength(120);
773 $users->addSubItem(
$txt);
778 $kind->addOption($users);
783 $roles =
new ilRadioOption($this->
lng->txt(
'search_for_role_members'),
'role');
784 $role =
new ilTextInputGUI($this->
lng->txt(
'search_role_title'),
'rep_query[role][title]');
786 $role->setMaxLength(120);
787 $roles->addSubItem($role);
788 $kind->addOption($roles);
791 $groups =
new ilRadioOption($this->
lng->txt(
'search_for_crs_members'),
'crs');
792 $group =
new ilTextInputGUI($this->
lng->txt(
'search_crs_title'),
'rep_query[crs][title]');
794 $group->setMaxLength(120);
795 $groups->addSubItem($group);
796 $kind->addOption($groups);
799 $groups =
new ilRadioOption($this->
lng->txt(
'search_for_grp_members'),
'grp');
800 $group =
new ilTextInputGUI($this->
lng->txt(
'search_grp_title'),
'rep_query[grp][title]');
802 $group->setMaxLength(120);
803 $groups->addSubItem($group);
804 $kind->addOption($groups);
808 $orgus =
new ilRadioOption($this->
lng->txt(
'search_for_orgu_members'),
'orgu');
810 $this->
lng->txt(
'select_orgu'),
815 $orgu->getExplorerGUI()->setSelectableTypes([
"orgu"]);
816 $orgu->getExplorerGUI()->setTypeWhiteList([
"root",
"orgu"]);
818 $orgu->getExplorerGUI()->setAjax(
false);
819 $orgus->addSubItem($orgu);
820 $kind->addOption($orgus);
827 $this->showSearchResults();
833 $this->performSearch();
843 $found_query =
false;
845 $post_rep_query = (array) ($this->
http->request()->getParsedBody()[
'rep_query'] ?? []);
846 $post_search_for = (string) ($this->
http->request()->getParsedBody()[
'search_for'] ??
'');
847 if (isset($post_rep_query[$post_search_for])) {
848 foreach ((array) $post_rep_query[$post_search_for] as $field => $value) {
855 if ($this->
http->wrapper()->post()->has(
'rep_query_orgu')) {
859 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'msg_no_search_string'));
864 $post_cmd = (array) ($this->
http->request()->getParsedBody()[
'cmd'] ?? []);
866 if (isset($post_cmd[
'performSearch'])) {
870 switch ($this->search_type) {
872 $this->__performUserSearch();
876 $this->__performGroupSearch();
880 $this->__performCourseSearch();
884 $this->__performRoleSearch();
887 $post_rep_query_orgu = (array) ($this->
http->request()->getParsedBody()[
'rep_query_orgu'] ?? []);
888 $selected_objects = array_map(
894 return $this->listUsers($selected_objects);
899 $this->result_obj->setRequiredPermission(
'read');
900 $this->result_obj->addObserver($this,
'searchResultFilterListener');
904 if ($this->search_type ==
'usr') {
906 if (is_callable($this->user_filter,
true, $callable_name)) {
907 $result_ids = call_user_func_array($this->user_filter, [$this->result_obj->getResultIds()]);
909 $result_ids = $this->result_obj->getResultIds();
912 $this->search_results = array_intersect(
917 $this->search_results = array();
918 foreach ($this->result_obj->getResults() as
$res) {
919 $this->search_results[] =
$res[
'obj_id'];
923 if (!count($this->search_results)) {
924 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'search_no_match'));
928 $this->__updateResults();
929 if ($this->result_obj->isLimitReached()) {
930 $message = sprintf($this->
lng->txt(
'search_limit_reached'), $this->settings->getMaxHits());
931 $this->tpl->setOnScreenMessage(
'info',
$message);
945 $query_string = $rep_query[
'usr'][
$name] ??
'';
947 if (!$query_string) {
952 $this->tpl->setOnScreenMessage(
'info', $query_parser);
955 switch ($info[
'type']) {
957 $query_parser = $this->__parseQueryString($query_string);
962 $udf_search->setFields(array(
$name));
963 $result_obj = $udf_search->performSearch();
966 $this->__storeEntries($result_obj);
971 if ($info[
'db'] ==
'org_units') {
973 $result_obj = $user_search->performSearch();
974 $this->__storeEntries($result_obj);
977 $query_parser = $this->__parseQueryString($query_string,
true,
true);
982 $user_search->setFields(array(
$name));
983 $result_obj = $user_search->performSearch();
986 $this->__storeEntries($result_obj);
991 $multi_search->setFields(array(
$name));
992 $result_obj = $multi_search->performSearch();
993 $this->__storeEntries($result_obj);
1004 $query_string = $rep_query[
'grp'][
'title'] ??
'';
1005 if (!is_object($query_parser = $this->__parseQueryString($query_string))) {
1006 $this->tpl->setOnScreenMessage(
'info', $query_parser,
true);
1011 $object_search->setFilter(array(
'grp'));
1012 $this->__storeEntries($object_search->performSearch());
1020 $query_string = $rep_query[
'crs'][
'title'] ??
'';
1021 if (!is_object($query_parser = $this->__parseQueryString($query_string))) {
1022 $this->tpl->setOnScreenMessage(
'info', $query_parser,
true);
1027 $object_search->setFilter(array(
'crs'));
1028 $this->__storeEntries($object_search->performSearch());
1036 $query_string = $rep_query[
'role'][
'title'] ??
'';
1037 if (!is_object($query_parser = $this->__parseQueryString($query_string))) {
1038 $this->tpl->setOnScreenMessage(
'info', $query_parser,
true);
1044 $object_search->setFilter(array(
'role'));
1045 $this->__storeEntries($object_search->performSearch());
1053 public function __parseQueryString(
string $a_string,
bool $a_combination_or =
true,
bool $a_ignore_length =
false)
1057 $query_parser->setMinWordLength(1);
1060 if (!$a_ignore_length) {
1061 $query_parser->setGlobalMinLength(3);
1064 $query_parser->parse();
1066 if (!$query_parser->validate()) {
1067 return $query_parser->getMessage();
1069 return $query_parser;
1075 if ($this->
http->wrapper()->post()->has(
'rep_query')) {
1078 $this->
http->request()->getParsedBody()[
'rep_query']
1087 if ($this->
http->wrapper()->post()->has(
'search_for')) {
1090 $this->
http->request()->getParsedBody()[
'search_for']
1106 foreach ($this->search_results as $result) {
1107 $rep_search[$this->search_type][] = $result;
1109 if (!$rep_search[$this->search_type]) {
1110 $rep_search[$this->search_type] = [];
1112 $rep_search[$this->search_type] = array_unique($rep_search[$this->search_type]);
1125 $rep_search[
'usr'] = $a_usr_ids;
1130 foreach ($a_usr_ids as $usr_id) {
1131 $rep_search[
'usr'][] = $usr_id;
1133 $rep_search[
'usr'] = array_unique($rep_search[
'usr'] ?? []);
1135 return $rep_search[
'usr'];
1140 if ($this->stored ==
false) {
1141 $this->result_obj->mergeEntries($new_res);
1142 $this->stored =
true;
1145 $this->result_obj->intersectEntries($new_res);
1153 $toolbar->addButton(
1154 $this->
lng->txt(
'search_new'),
1155 $this->ctrl->getLinkTarget($this,
'showSearch')
1157 $this->tpl->setVariable(
'ACTION_BUTTONS', $toolbar->getHTML());
1163 $f_result = array();
1165 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.rep_search_result.html',
'Services/Search');
1166 $this->addNewSearchButton();
1170 switch ($this->search_type) {
1172 $this->showSearchUserTable($rep_search[
'usr'] ?? [],
'showSearchResults');
1176 $this->showSearchGroupTable($rep_search[
'grp'] ?? []);
1180 $this->showSearchCourseTable($rep_search[
'crs'] ?? []);
1184 $this->showSearchRoleTable($rep_search[
'role'] ?? []);
1192 if ($this->
http->wrapper()->query()->has(
'baseClass')) {
1193 $base_class = $this->
http->wrapper()->query()->retrieve(
1195 $this->
refinery->kindlyTo()->string()
1200 $is_in_admin = ($base_class === strtolower(ilAdministrationGUI::class));
1208 if (count($this->add_options)) {
1209 $table->addMultiItemSelectionButton(
1212 'handleMultiCommand',
1213 $this->
lng->txt(
'execute'),
1214 $this->default_option
1217 $table->addMultiCommand(
'addUser', $this->
lng->txt(
'btn_add'));
1219 $table->setUserLimitations($this->getUserLimitations());
1220 $table->parseUserIds($a_usr_ids);
1222 $this->tpl->setVariable(
'RES_TABLE', $table->getHTML());
1228 $table->parseObjectIds($a_obj_ids);
1230 $this->tpl->setVariable(
'RES_TABLE', $table->getHTML());
1236 $table->parseObjectIds($a_obj_ids);
1238 $this->tpl->setVariable(
'RES_TABLE', $table->getHTML());
1244 $table->parseObjectIds($a_obj_ids);
1246 $this->tpl->setVariable(
'RES_TABLE', $table->getHTML());
1249 protected function listUsers(array $selected_entries = []): bool
1254 $this->
http->wrapper()->post()->has(
'obj') &&
1255 !count($selected_entries)
1257 $selected_entries = $this->
http->wrapper()->post()->retrieve(
1259 $this->
refinery->kindlyTo()->listOf($this->refinery->kindlyTo()->int())
1263 $this->
http->wrapper()->query()->has(
'list_obj') &&
1264 !count($selected_entries)
1266 $selected_entries[] = $this->
http->wrapper()->query()->retrieve(
1271 if (!count($selected_entries)) {
1272 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
1273 $this->showSearchResults();
1277 $rep_search[
'objs'] = $selected_entries;
1282 foreach ($selected_entries as $obj_id) {
1289 if (is_callable($this->user_filter)) {
1290 $part = call_user_func_array(
1300 $members = array_merge((array) $members, $part);
1306 if (is_callable($this->user_filter)) {
1307 $assigned = call_user_func_array(
1310 $this->rbacreview->assignedUsers($obj_id)
1314 $assigned = $this->rbacreview->assignedUsers($obj_id);
1322 ->getUserIdsOfOrgUnit(array_shift($ref_ids));
1323 if (is_callable($this->user_filter)) {
1324 $assigned = call_user_func_array(
1330 $members = array_merge(
1338 $members = array_unique($members);
1339 $this->__appendToStoredResults($members);
1341 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.rep_search_result.html',
'Services/Search');
1343 $this->addNewSearchButton();
1345 $this->showSearchUserTable($rep_search[
'usr'] ?? [],
'storedUserList');
1352 $objects = $rep_search[
'objs'] ?? [];
1353 $this->listUsers($objects);
1364 if ($a_data[
'type'] ==
'usr') {
1374 $this->object_selection = $a_value;
1384 $selected_entries = [];
1385 if ($this->
http->wrapper()->post()->has(
'obj')) {
1386 $selected_entries = $this->
http->wrapper()->post()->retrieve(
1388 $this->
refinery->kindlyTo()->listOf($this->refinery->kindlyTo()->int())
1392 $this->
http->wrapper()->query()->has(
'list_obj') &&
1393 !count($selected_entries)
1395 $selected_entries[] = $this->
http->wrapper()->query()->retrieve(
1401 if (!count($selected_entries)) {
1402 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
1403 $this->showSearchResults();
1406 $this->
ctrl->setParameter($this->callback[
"class"],
"obj", implode(
";", $selected_entries));
1407 $this->
ctrl->redirect($this->callback[
"class"], $this->callback[
"method"]);
1416 $this->user_limitations = $a_limitations;
1424 return $this->user_limitations;
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
show()
returns the content of IniFile
Class ilCtrl provides processing control methods.
loadLanguageModule(string $a_module)
Load language module.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static _lookupId($a_user_str)
static _getUserDefinedFieldSearchInstance(ilQueryParser $query_parser)
static getUserOrgUnitAssignmentInstance(ilQueryParser $query_parser)
static _getUserSearchInstance(ilQueryParser $query_parser)
static getUserMultiFieldSearchInstance(ilQueryParser $query_parser)
static _lookupType(int $id, bool $reference=false)
static _getAllReferences(int $id)
get all reference ids for object ID
static _lookupObjId(int $ref_id)
static getInstanceByObjId(int $a_obj_id)
Get instance by obj type.
static hasParticipantListAccess(int $a_obj_id, int $a_usr_id=null)
Check if (current) user has access to the participant list.
static getDefaultMemberRole(int $a_ref_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
class ilRbacReview Contains Review functions of core Rbac.
TableGUI class object (course,group and role) search results Used in member search.
selectObject()
Return selection of course/group/roles to calling script.
setPermissionQueryCallback(object $class, string $method)
static fillAutoCompleteToolbar(object $parent_object, ilToolbarGUI $toolbar=null, array $a_options=[], bool $a_sticky=false)
array( auto_complete_name = $lng->txt('user'), auto_complete_size = 15, user_type = array(ilCoursePar...
initFormSearch(ilObjUser $user=null)
isSearchableCheckEnabled()
setPrivacyMode(int $privacy_mode)
showSearchUserTable(array $a_usr_ids, string $a_parent_cmd)
ilSearchResult $result_obj
listUsers(array $selected_entries=[])
setRoleCallback(object $class, string $method, array $a_add_options=[], string $default_option='')
allowObjectSelection(bool $a_value=false)
RefineryFactory $refinery
searchResultFilterListener(int $a_ref_id, array $a_data)
Listener called from ilSearchResult Id is obj_id for role, usr Id is ref_id for crs grp.
showSearchCourseTable(array $a_obj_ids)
enableSearchableCheck(bool $a_status)
setTitle(string $a_title)
addUserAccessFilterCallable(callable $user_filter)
Closure for filtering users e.g $rep_search_gui->addUserAccessFilterCallable(function($user_ids) use(...
showSearchGroupTable(array $a_obj_ids)
ilGlobalTemplateInterface $tpl
__storeEntries(ilSearchResult $new_res)
__appendToStoredResults(array $a_usr_ids)
setCallback(object $class, string $method, array $a_add_options=[], string $default_option='')
showSearchRoleTable(array $a_obj_ids)
ilSearchSettings $settings
getUserLimitations()
allow user limitations like inactive and access limitations
setUserLimitations(bool $a_limitations)
allow user limitations like inactive and access limitations
addUserFromAutoComplete()
__parseQueryString(string $a_string, bool $a_combination_or=true, bool $a_ignore_length=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static get(string $a_var)
static clear(string $a_var)
static set(string $a_var, $a_val)
Set a value.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a text property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
checkForParentType(int $a_ref_id, string $a_type, bool $a_exclude_source_check=false)
Check for parent type e.g check if a folder (ref_id 3) is in a parent course obj => checkForParentTyp...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const PRIVACY_MODE_RESPECT_USER_SETTING
const PRIVACY_MODE_IGNORE_USER_SETTING
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstance(int $a_usr_id)
static _getSearchableFieldsInfo(bool $a_admin=false)
const FIELD_TYPE_UDF_TEXT
const FIELD_TYPE_UDF_SELECT
const FIELD_TYPE_UDF_UNDEFINED
static _isEnabled($a_key)
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
Interface GlobalHttpState.
This is how the factory for UI elements looks.
An entity that renders components to a string output.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static http()
Fetches the global http state from ILIAS.
form( $class_path, string $cmd)