ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 @access 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 ()
 
 setPrivacyMode ($privacy_mode)
 
 getPrivacyMode ()
 
 setString ($a_str)
 Set/get search string @access public. More...
 
 getString ()
 
 executeCommand ()
 Control @access 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 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
 

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 ( )

Reimplemented from ilRepositorySearchGUI.

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

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"]

References $_POST.

◆ 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.

Reimplemented from ilRepositorySearchGUI.

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

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

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

Referenced by ilObjStudyProgrammeMembersGUI\initSearchGUI().

+ 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: