ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilStudyProgrammeRepositorySearchGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilStudyProgrammeRepositorySearchGUI:
+ Collaboration diagram for ilStudyProgrammeRepositorySearchGUI:

Public Member Functions

 addUser ()
 
- Public Member Functions inherited from ilRepositorySearchGUI
 __construct ()
 
 addUserAccessFilterCallable (callable $user_filter)
 Closure for filtering users e.g $rep_search_gui->addUserAccessFilterCallable(function($user_ids) use($ref_id,$rbac_perm,$pos_perm)) { // filter users return $filtered_users }. More...
 
 setTitle (string $a_title)
 
 getTitle ()
 
 enableSearchableCheck (bool $a_status)
 
 isSearchableCheckEnabled ()
 
 setPrivacyMode (int $privacy_mode)
 
 getPrivacyMode ()
 
 getSearchType ()
 
 getRoleCallback ()
 
 setString (string $a_str)
 
 getString ()
 
 executeCommand ()
 
 __clearSession ()
 
 cancel ()
 
 start ()
 
 addRole ()
 
 addUser ()
 
 setCallback (object $class, string $method, array $a_add_options=[], string $default_option='')
 
 setRoleCallback (object $class, string $method, array $a_add_options=[], string $default_option='')
 
 setPermissionQueryCallback (object $class, string $method)
 
 showSearch ()
 
 showSearchSelected ()
 
 initFormSearch (ilObjUser $user=null)
 
 show ()
 
 appendSearch ()
 
 performSearch ()
 
 __performUserSearch ()
 
 __performGroupSearch ()
 
 __performRoleSearch ()
 
 __parseQueryString (string $a_string, bool $a_combination_or=true, bool $a_ignore_length=false)
 
 __loadQueries ()
 
 __setSearchType ()
 
 __updateResults ()
 
 __appendToStoredResults (array $a_usr_ids)
 
 __storeEntries (ilSearchResult $new_res)
 
 showSearchResults ()
 
 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. More...
 
 allowObjectSelection (bool $a_value=false)
 
 setUserLimitations (bool $a_limitations)
 allow user limitations like inactive and access limitations More...
 
 getUserLimitations ()
 allow user limitations like inactive and access limitations More...
 

Static Public Member Functions

static fillAutoCompleteToolbar ( $parent_object, ilToolbarGUI $toolbar=null, $a_options=array(), $a_sticky=false)
 This is just the same as in the parent class, except for the hardcoded class name. More...
 
- Static Public Member Functions inherited from ilRepositorySearchGUI
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(ilCourseParticipants::CRS_MEMBER,ilCourseParticpants::CRS_TUTOR), submit_name = $lng->txt('add') ) More...
 

Additional Inherited Members

- Protected Member Functions inherited from ilRepositorySearchGUI
 initUserTypeFromQuery ()
 
 initUserTypeFromPost ()
 
 doUserAutoComplete ()
 
 addUserFromAutoComplete ()
 
 showClipboard ()
 
 addFromClipboard ()
 
 removeFromClipboard ()
 
 emptyClipboard ()
 
 handleMultiCommand ()
 
 __performCourseSearch ()
 
 addNewSearchButton ()
 
 showSearchUserTable (array $a_usr_ids, string $a_parent_cmd)
 
 showSearchRoleTable (array $a_obj_ids)
 
 showSearchGroupTable (array $a_obj_ids)
 
 showSearchCourseTable (array $a_obj_ids)
 
 listUsers (array $selected_entries=[])
 
 storedUserList ()
 
 selectObject ()
 Return selection of course/group/roles to calling script. More...
 
- Protected Attributes inherited from ilRepositorySearchGUI
array $add_options = []
 
string $default_option = ''
 
bool $object_selection = false
 
bool $searchable_check = true
 
string $search_title = ''
 
bool $user_limitations = true
 
bool $stored = false
 
array $callback = []
 
array $role_callback = []
 
ilSearchResult $result_obj
 
ilSearchSettings $settings
 
ilPropertyFormGUI $form = null
 
 $user_filter = null
 
ilTree $tree
 
Renderer $ui_renderer
 
Factory $ui_factory
 
ilCtrl $ctrl
 
ilGlobalTemplateInterface $tpl
 
ilObjUser $user = null
 
ilRbacReview $rbacreview
 
ilTabsGUI $tabs
 
ilLanguage $lng
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Custom repository search gui class for study programme to make it possible to get a handle on users selected in the repository search gui.

ilStudyProgrammeRepositorySearchGUI: ilPropertyFormGUI

Definition at line 27 of file class.ilStudyProgrammeRepositorySearchGUI.php.

Member Function Documentation

◆ addUser()

ilStudyProgrammeRepositorySearchGUI::addUser ( )

Definition at line 29 of file class.ilStudyProgrammeRepositorySearchGUI.php.

References $DIC, and ilRepositorySearchGUI\$refinery.

29  : void
30  {
31  global $DIC;
32  $post_wrapper = $DIC->http()->wrapper()->post();
33  $refinery = $DIC->refinery();
34  $class = $this->callback['class'];
35  $method = $this->callback['method'];
36 
37  // call callback if that function does give a return value => show error message
38  // listener redirects if everything is ok.
39  $class->$method($post_wrapper->retrieve('user', $refinery->kindlyTo()->listOf($refinery->kindlyTo()->string())));
40  // Removed this from overwritten class, as we do not want to show the
41  // results again...
42  //$this->showSearchResults();
43  }
global $DIC
Definition: feed.php:28

◆ fillAutoCompleteToolbar()

static ilStudyProgrammeRepositorySearchGUI::fillAutoCompleteToolbar (   $parent_object,
ilToolbarGUI  $toolbar = null,
  $a_options = array(),
  $a_sticky = false 
)
static

This is just the same as in the parent class, except for the hardcoded class name.

Definition at line 48 of file class.ilStudyProgrammeRepositorySearchGUI.php.

References $DIC, ilRepositorySearchGUI\$lng, ilRepositorySearchGUI\$tree, ilObject\_lookupObjId(), ilTree\checkForParentType(), ilSubmitButton\getInstance(), ilLinkButton\getInstance(), ILIAS\Repository\int(), ilLanguage\loadLanguageModule(), and ilLanguage\txt().

Referenced by ilObjStudyProgrammeMembersGUI\initSearchGUI().

53  : ilToolbarGUI {
54  global $DIC;
55  $ilToolbar = $DIC['ilToolbar'];
56  $lng = $DIC['lng'];
57  $ilCtrl = $DIC['ilCtrl'];
58  $tree = $DIC['tree'];
59 
60  if (!$toolbar instanceof ilToolbarGUI) {
61  $toolbar = $ilToolbar;
62  }
63 
64  // Fill default options
65  if (!isset($a_options['auto_complete_name'])) {
66  $a_options['auto_complete_name'] = $lng->txt('obj_user');
67  }
68  if (!isset($a_options['auto_complete_size'])) {
69  $a_options['auto_complete_size'] = 15;
70  }
71  if (!isset($a_options['submit_name'])) {
72  $a_options['submit_name'] = $lng->txt('btn_add');
73  }
74 
75  $ajax_url = $ilCtrl->getLinkTargetByClass(
76  array(get_class($parent_object),'ilStudyProgrammeRepositorySearchGUI'),
77  'doUserAutoComplete',
78  '',
79  true,
80  false
81  );
82 
83  $ul = new ilTextInputGUI($a_options['auto_complete_name'], 'user_login');
84  $ul->setDataSource($ajax_url);
85  $ul->setSize($a_options['auto_complete_size']);
86  if (!$a_sticky) {
87  $toolbar->addInputItem($ul, true);
88  } else {
89  $toolbar->addStickyItem($ul, true);
90  }
91 
92  if (count($a_options['user_type'] ?? [])) {
93  $si = new ilSelectInputGUI("", "user_type");
94  $si->setOptions($a_options['user_type']);
95  if (!$a_sticky) {
96  $toolbar->addInputItem($si);
97  } else {
98  $toolbar->addStickyItem($si);
99  }
100  }
101 
102  $button = ilSubmitButton::getInstance();
103  $button->setCaption($a_options['submit_name'], false);
104  $button->setCommand('addUserFromAutoComplete');
105  if (!$a_sticky) {
106  $toolbar->addButtonInstance($button);
107  } else {
108  $toolbar->addStickyItem($button);
109  }
110 
111  if ((bool) $a_options['add_search'] ||
112  is_numeric($a_options['add_from_container'])) {
113  $lng->loadLanguageModule("search");
114 
115  $toolbar->addSeparator();
116 
117  if ((bool) $a_options['add_search']) {
118  $button = ilLinkButton::getInstance();
119  $button->setCaption("search_users");
120  $button->setUrl($ilCtrl->getLinkTargetByClass('ilStudyProgrammeRepositorySearchGUI', ''));
121  $toolbar->addButtonInstance($button);
122  }
123 
124  if (isset($a_options['add_from_container']) && is_numeric($a_options['add_from_container'])) {
125  $parent_ref_id = (int) $a_options['add_from_container'];
126  $parent_container_ref_id = $tree->checkForParentType($parent_ref_id, "grp");
127  $parent_container_type = "grp";
128  if (!$parent_container_ref_id) {
129  $parent_container_ref_id = $tree->checkForParentType($parent_ref_id, "crs");
130  $parent_container_type = "crs";
131  }
132  if ($parent_container_ref_id) {
133  if ((bool) $a_options['add_search']) {
134  $toolbar->addSpacer();
135  }
136 
137  $ilCtrl->setParameterByClass(
138  'ilStudyProgrammeRepositorySearchGUI',
139  "list_obj",
140  ilObject::_lookupObjId($parent_container_ref_id)
141  );
142 
143  $button = ilLinkButton::getInstance();
144  $button->setCaption("search_add_members_from_container_" . $parent_container_type);
145  $button->setUrl(
146  $ilCtrl->getLinkTargetByClass(
147  array(get_class($parent_object),'ilStudyProgrammeRepositorySearchGUI'),
148  'listUsers'
149  )
150  );
151  $toolbar->addButtonInstance($button);
152  }
153  }
154  }
155 
156  $toolbar->setFormAction(
157  $ilCtrl->getFormActionByClass(
158  array(
159  get_class($parent_object),
160  'ilStudyProgrammeRepositorySearchGUI')
161  )
162  );
163  return $toolbar;
164  }
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...
setFormAction(string $a_val, bool $a_multipart=false, string $a_target="")
Set form action (if form action is set, toolbar is wrapped into form tags)
loadLanguageModule(string $a_module)
Load language module.
addButtonInstance(ilButtonBase $a_button)
Add button instance.
static _lookupObjId(int $ref_id)
global $DIC
Definition: feed.php:28
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...
addSpacer(string $a_width=null)
addStickyItem( $a_item, bool $a_output_label=false)
Add a sticky item.
addInputItem(ilToolbarItem $a_item, bool $a_output_label=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: