ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilStudyProgrammeRepositorySearchGUI Class Reference

Custom repository search gui class for study programme to make it possible to get a handle on users selected in the repository search gui. More...

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

Public Member Functions

 addUser ()
 
- Public Member Functions inherited from ilRepositorySearchGUI
 __construct ()
 Constructor public. More...
 
 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 ($a_title)
 Set form title. More...
 
 getTitle ()
 Get search form title. More...
 
 enableSearchableCheck ($a_status)
 En/disable the validation of the searchable flag. More...
 
 isSearchableCheckEnabled ()
 
 setPrivacyMode ($privacy_mode)
 
 getPrivacyMode ()
 
 setString ($a_str)
 Set/get search string public. More...
 
 getString ()
 
 executeCommand ()
 Control public. More...
 
 __clearSession ()
 
 cancel ()
 
 start ()
 
 addUser ()
 
 setCallback (&$class, $method, $a_add_options=array())
 
 setPermissionQueryCallback ($class, $method)
 Set callback method for user permission access queries. More...
 
 showSearch ()
 
 showSearchSelected ()
 submit from autocomplete More...
 
 initFormSearch (ilObjUser $user=null)
 
 show ()
 
 appendSearch ()
 
 performSearch ()
 Perform a search. More...
 
 __performUserSearch ()
 
 __performGroupSearch ()
 Search groups. More...
 
 __performRoleSearch ()
 Search roles. More...
 
__parseQueryString ($a_string, $a_combination_or=true, $a_ignore_length=false)
 parse query string, using query parser instance More...
 
 __loadQueries ()
 
 __setSearchType ()
 
 __updateResults ()
 
 __appendToStoredResults ($a_usr_ids)
 
 __storeEntries (&$new_res)
 
 showSearchResults ()
 
 searchResultFilterListener ($a_ref_id, $a_data)
 Listener called from ilSearchResult Id is obj_id for role, usr Id is ref_id for crs grp. More...
 
 allowObjectSelection ($a_value=false)
 Toggle object selection status. More...
 
 setUserLimitations ($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 ($parent_object, ilToolbarGUI $toolbar=null, $a_options=array(), $a_sticky=false)
 fill toolbar with More...
 

Additional Inherited Members

- Data Fields inherited from ilRepositorySearchGUI
 $search_type = 'usr'
 
- Protected Member Functions inherited from ilRepositorySearchGUI
 doUserAutoComplete ()
 Do auto completion. More...
 
 addUserFromAutoComplete ()
 Add user from auto complete input. More...
 
 showClipboard ()
 
 addFromClipboard ()
 add users from clipboard More...
 
 removeFromClipboard ()
 Remove from clipboard. More...
 
 emptyClipboard ()
 Remove from clipboard. More...
 
 handleMultiCommand ()
 Handle multi command. More...
 
 __performCourseSearch ()
 Search courses. More...
 
 addNewSearchButton ()
 Add new search button. More...
 
 showSearchUserTable ($a_usr_ids, $a_parent_cmd)
 Show usr table. More...
 
 showSearchRoleTable ($a_obj_ids)
 Show usr table. More...
 
 showSearchGroupTable ($a_obj_ids)
 
 showSearchCourseTable ($a_obj_ids)
 
 listUsers ()
 List users of course/group/roles. More...
 
 storedUserList ()
 Called from table sort. More...
 
 selectObject ()
 Return selection of course/group/roles to calling script. More...
 
- Protected Attributes inherited from ilRepositorySearchGUI
 $add_options = array()
 
 $object_selection = false
 
 $searchable_check = true
 
 $search_title = ''
 
 $user_limitations = true
 
 $user_filter = null
 

Detailed Description

Custom repository search gui class for study programme to make it possible to get a handle on users selected in the repository search gui.

Author
Richard Klees
Version
$Id$

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

Member Function Documentation

◆ addUser()

ilStudyProgrammeRepositorySearchGUI::addUser ( )

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

References $_POST.

17  {
18  $class = $this->callback['class'];
19  $method = $this->callback['method'];
20 
21  // call callback if that function does give a return value => show error message
22  // listener redirects if everything is ok.
23  $class->$method($_POST['user']);
24 
25  // Removed this from overwritten class, as we do not want to show the
26  // results again...
27  //$this->showSearchResults();
28  }
$_POST["username"]

◆ 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 33 of file class.ilStudyProgrammeRepositorySearchGUI.php.

References $DIC, $ilCtrl, $lng, $si, ilObject\_lookupObjId(), array, ilSubmitButton\getInstance(), and ilLinkButton\getInstance().

Referenced by ilObjStudyProgrammeMembersGUI\initSearchGUI().

34  {
35  global $DIC;
36  $ilToolbar = $DIC['ilToolbar'];
37  $lng = $DIC['lng'];
38  $ilCtrl = $DIC['ilCtrl'];
39  $tree = $DIC['tree'];
40 
41  if (!$toolbar instanceof ilToolbarGUI) {
42  $toolbar = $ilToolbar;
43  }
44 
45  // Fill default options
46  if (!isset($a_options['auto_complete_name'])) {
47  $a_options['auto_complete_name'] = $lng->txt('obj_user');
48  }
49  if (!isset($a_options['auto_complete_size'])) {
50  $a_options['auto_complete_size'] = 15;
51  }
52  if (!isset($a_options['submit_name'])) {
53  $a_options['submit_name'] = $lng->txt('btn_add');
54  }
55 
56  $ajax_url = $ilCtrl->getLinkTargetByClass(
57  array(get_class($parent_object),'ilStudyProgrammeRepositorySearchGUI'),
58  'doUserAutoComplete',
59  '',
60  true,
61  false
62  );
63 
64  include_once("./Services/Form/classes/class.ilTextInputGUI.php");
65  $ul = new ilTextInputGUI($a_options['auto_complete_name'], 'user_login');
66  $ul->setDataSource($ajax_url);
67  $ul->setSize($a_options['auto_complete_size']);
68  if (!$a_sticky) {
69  $toolbar->addInputItem($ul, true);
70  } else {
71  $toolbar->addStickyItem($ul, true);
72  }
73 
74  if (count((array) $a_options['user_type'])) {
75  include_once './Services/Form/classes/class.ilSelectInputGUI.php';
76  $si = new ilSelectInputGUI("", "user_type");
77  $si->setOptions($a_options['user_type']);
78  if (!$a_sticky) {
79  $toolbar->addInputItem($si);
80  } else {
81  $toolbar->addStickyItem($si);
82  }
83  }
84 
85  include_once "Services/UIComponent/Button/classes/class.ilSubmitButton.php";
86  $button = ilSubmitButton::getInstance();
87  $button->setCaption($a_options['submit_name'], false);
88  $button->setCommand('addUserFromAutoComplete');
89  if (!$a_sticky) {
90  $toolbar->addButtonInstance($button);
91  } else {
92  $toolbar->addStickyItem($button);
93  }
94 
95  if ((bool) $a_options['add_search'] ||
96  is_numeric($a_options['add_from_container'])) {
97  $lng->loadLanguageModule("search");
98 
99  $toolbar->addSeparator();
100 
101  if ((bool) $a_options['add_search']) {
102  include_once "Services/UIComponent/Button/classes/class.ilLinkButton.php";
103  $button = ilLinkButton::getInstance();
104  $button->setCaption("search_users");
105  $button->setUrl($ilCtrl->getLinkTargetByClass('ilStudyProgrammeRepositorySearchGUI', ''));
106  $toolbar->addButtonInstance($button);
107  }
108 
109  if (is_numeric($a_options['add_from_container'])) {
110  $parent_ref_id = (int) $a_options['add_from_container'];
111  $parent_container_ref_id = $tree->checkForParentType($parent_ref_id, "grp");
112  $parent_container_type = "grp";
113  if (!$parent_container_ref_id) {
114  $parent_container_ref_id = $tree->checkForParentType($parent_ref_id, "crs");
115  $parent_container_type = "crs";
116  }
117  if ($parent_container_ref_id) {
118  if ((bool) $a_options['add_search']) {
119  $toolbar->addSpacer();
120  }
121 
122  $ilCtrl->setParameterByClass('ilStudyProgrammeRepositorySearchGUI', "list_obj", ilObject::_lookupObjId($parent_container_ref_id));
123 
124  include_once "Services/UIComponent/Button/classes/class.ilLinkButton.php";
125  $button = ilLinkButton::getInstance();
126  $button->setCaption("search_add_members_from_container_" . $parent_container_type);
127  $button->setUrl($ilCtrl->getLinkTargetByClass(array(get_class($parent_object),'ilStudyProgrammeRepositorySearchGUI'), 'listUsers'));
128  $toolbar->addButtonInstance($button);
129  }
130  }
131  }
132 
133  $toolbar->setFormAction(
134  $ilCtrl->getFormActionByClass(
135  array(
136  get_class($parent_object),
137  'ilStudyProgrammeRepositorySearchGUI')
138  )
139  );
140  return $toolbar;
141  }
This class represents a selection list property in a property form.
global $DIC
Definition: saml.php:7
addStickyItem($a_item, $a_output_label=false)
Add a sticky item.
addSpacer($a_width=null)
Add spacer.
addButtonInstance(ilButtonBase $a_button)
Add button instance.
global $ilCtrl
Definition: ilias.php:18
addInputItem(ilToolbarItem $a_item, $a_output_label=false)
Add input item.
setFormAction($a_val, $a_multipart=false, $a_target="")
Set form action (if form action is set, toolbar is wrapped into form tags)
static _lookupObjId($a_id)
This class represents a text property in a property form.
addSeparator()
Add separator.
Create styles array
The data for the language used.
global $lng
Definition: privfeed.php:17
+ 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: