ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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
 ilRepositorySearchGUI ()
 Constructor public. 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 ()
 
 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())
 
 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...
 
 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
 

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

References $_POST.

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

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

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

Referenced by ilObjStudyProgrammeMembersGUI\initSearchGUI().

32  {
33  global $ilToolbar, $lng, $ilCtrl, $tree;
34 
35  if(!$toolbar instanceof ilToolbarGUI)
36  {
37  $toolbar = $ilToolbar;
38  }
39 
40  // Fill default options
41  if(!isset($a_options['auto_complete_name']))
42  {
43  $a_options['auto_complete_name'] = $lng->txt('obj_user');
44  }
45  if(!isset($a_options['auto_complete_size']))
46  {
47  $a_options['auto_complete_size'] = 15;
48  }
49  if(!isset($a_options['submit_name']))
50  {
51  $a_options['submit_name'] = $lng->txt('btn_add');
52  }
53 
54  $ajax_url = $ilCtrl->getLinkTargetByClass(array(get_class($parent_object),'ilStudyProgrammeRepositorySearchGUI'),
55  'doUserAutoComplete', '', true,false);
56 
57  include_once("./Services/Form/classes/class.ilTextInputGUI.php");
58  $ul = new ilTextInputGUI($a_options['auto_complete_name'], 'user_login');
59  $ul->setDataSource($ajax_url);
60  $ul->setSize($a_options['auto_complete_size']);
61  if(!$a_sticky)
62  {
63  $toolbar->addInputItem($ul, true);
64  }
65  else
66  {
67  $toolbar->addStickyItem($ul, true);
68  }
69 
70  if(count((array) $a_options['user_type']))
71  {
72  include_once './Services/Form/classes/class.ilSelectInputGUI.php';
73  $si = new ilSelectInputGUI("", "user_type");
74  $si->setOptions($a_options['user_type']);
75  if(!$a_sticky)
76  {
77  $toolbar->addInputItem($si);
78  }
79  else
80  {
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  {
91  $toolbar->addButtonInstance($button);
92  }
93  else
94  {
95  $toolbar->addStickyItem($button);
96  }
97 
98  if((bool)$a_options['add_search'] ||
99  is_numeric($a_options['add_from_container']))
100  {
101  $lng->loadLanguageModule("search");
102 
103  $toolbar->addSeparator();
104 
105  if((bool)$a_options['add_search'])
106  {
107  include_once "Services/UIComponent/Button/classes/class.ilLinkButton.php";
108  $button = ilLinkButton::getInstance();
109  $button->setCaption("search_users");
110  $button->setUrl($ilCtrl->getLinkTargetByClass('ilStudyProgrammeRepositorySearchGUI',''));
111  $toolbar->addButtonInstance($button);
112  }
113 
114  if(is_numeric($a_options['add_from_container']))
115  {
116  $parent_ref_id = (int)$a_options['add_from_container'];
117  $parent_container_ref_id = $tree->checkForParentType($parent_ref_id, "grp");
118  $parent_container_type = "grp";
119  if(!$parent_container_ref_id)
120  {
121  $parent_container_ref_id = $tree->checkForParentType($parent_ref_id, "crs");
122  $parent_container_type = "crs";
123  }
124  if($parent_container_ref_id)
125  {
126  if((bool)$a_options['add_search'])
127  {
128  $toolbar->addSpacer();
129  }
130 
131  $ilCtrl->setParameterByClass('ilStudyProgrammeRepositorySearchGUI', "list_obj", ilObject::_lookupObjId($parent_container_ref_id));
132 
133  include_once "Services/UIComponent/Button/classes/class.ilLinkButton.php";
134  $button = ilLinkButton::getInstance();
135  $button->setCaption("search_add_members_from_container_".$parent_container_type);
136  $button->setUrl($ilCtrl->getLinkTargetByClass(array(get_class($parent_object),'ilStudyProgrammeRepositorySearchGUI'), 'listUsers'));
137  $toolbar->addButtonInstance($button);
138  }
139  }
140  }
141 
142  $toolbar->setFormAction(
143  $ilCtrl->getFormActionByClass(
144  array(
145  get_class($parent_object),
146  'ilStudyProgrammeRepositorySearchGUI')
147  )
148  );
149  return $toolbar;
150  }
This class represents a selection list property in a property form.
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.
addStickyItem(ilToolbarItem $a_item, $a_output_label=false)
Add a sticky item.
global $lng
Definition: privfeed.php:40
+ 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: