ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
ilLTIConsumeProviderFormGUI Class Reference
+ Inheritance diagram for ilLTIConsumeProviderFormGUI:
+ Collaboration diagram for ilLTIConsumeProviderFormGUI:

Public Member Functions

 __construct (ilLTIConsumeProvider $provider)
 ilLTIConsumeProviderFormGUI constructor. More...
 
 isAdminContext ()
 
 setAdminContext (bool $adminContext)
 
 initForm ($formaction, $saveCmd, $cancelCmd)
 
 initProvider (ilLTIConsumeProvider $provider)
 
- Public Member Functions inherited from ilPropertyFormGUI
 __construct ()
 Constructor. More...
 
 executeCommand ()
 Execute command. More...
 
 setTableWidth ($a_width)
 Set table width. More...
 
 getTableWidth ()
 get table width More...
 
 setMode ($a_mode)
 Set Mode ('std', 'subform'). More...
 
 getMode ()
 Get Mode ('std', 'subform'). More...
 
 setTitle ($a_title)
 Set Title. More...
 
 getTitle ()
 Get Title. More...
 
 setTitleIcon ($a_titleicon)
 Set TitleIcon. More...
 
 getTitleIcon ()
 Get TitleIcon. More...
 
 setDescription ($a_val)
 Set description. More...
 
 getDescription ()
 Get description. More...
 
 setTopAnchor ($a_val)
 Set top anchor. More...
 
 getTopAnchor ()
 Get top anchor. More...
 
 setShowTopButtons ($a_val)
 Get show top buttons. More...
 
 getShowTopButtons ()
 Set show top buttons. More...
 
 setForceTopButtons ($a_val)
 Set force top buttons. More...
 
 getForceTopButtons ()
 Get force top buttons. More...
 
 addItem ($a_item)
 Add Item (Property, SectionHeader). More...
 
 removeItemByPostVar ($a_post_var, $a_remove_unused_headers=false)
 Remove Item. More...
 
 getItemByPostVar ($a_post_var)
 Get Item by POST variable. More...
 
 setItems ($a_items)
 Set Items. More...
 
 getItems ()
 Get Items. More...
 
 getInputItemsRecursive ()
 returns a flat array of all input items including the possibly existing subitems recursively More...
 
 setDisableStandardMessage ($a_val)
 Set disable standard message. More...
 
 getDisableStandardMessage ()
 Get disable standard message. More...
 
 getHideLabels ()
 Get a value indicating whether the labels should be hidden or not. More...
 
 setHideLabels ($a_value=true)
 Set a value indicating whether the labels should be hidden or not. More...
 
 setValuesByArray ($a_values, $a_restrict_to_value_keys=false)
 Set form values from an array. More...
 
 setValuesByPost ()
 Set form values from POST values. More...
 
 checkInput ()
 Check Post Input. More...
 
 getInput ($a_post_var, $ensureValidation=true)
 Returns the value of a HTTP-POST variable, identified by the passed id. More...
 
 addCustomProperty ( $a_title, $a_html, $a_info="", $a_alert="", $a_required=false)
 Add a custom property. More...
 
 addCommandButton ($a_cmd, $a_text, $a_id="")
 Add Command button. More...
 
 getCommandButtons ()
 Return all Command buttons. More...
 
 clearCommandButtons ()
 Remove all command buttons. More...
 
 getContent ()
 Get Content. More...
 
 insertItem ($item, $a_sub_item=false)
 
 getHTML ()
 
 getFileUpload ($a_field, $a_index=null, $a_sub_index=null)
 Get file upload data. More...
 
 hasFileUpload ($a_field, $a_index=null, $a_sub_index=null)
 Was any file uploaded? More...
 
 moveFileUpload ($a_target_directory, $a_field, $a_target_name=null, $a_index=null, $a_sub_index=null)
 Move upload to target directory. More...
 
- Public Member Functions inherited from ilFormGUI
 setFormAction ($a_formaction)
 Set FormAction. More...
 
 getFormAction ()
 Get FormAction. More...
 
 setTarget ($a_target)
 Set Target. More...
 
 getTarget ()
 Get Target. More...
 
 setMultipart ($a_multipart)
 Set Enctype Multipart/Formdata true/false. More...
 
 getMultipart ()
 Get Enctype Multipart/Formdata true/false. More...
 
 setId ($a_id)
 Set Id. More...
 
 getId ()
 Get Id. More...
 
 setName ($a_name)
 Set Name. More...
 
 getName ()
 Get Name. More...
 
 setKeepOpen ($a_keepopen)
 Set Keep Form Tag Open. More...
 
 getKeepOpen ()
 Get Keep Form Tag Open. More...
 
 setOpenTag ($a_open)
 Enable/Disable Open Form Tag. More...
 
 getOpenTag ()
 Get Open Form Tag Enabled. More...
 
 setCloseTag ($a_val)
 Set close tag. More...
 
 getCloseTag ()
 Get close tag. More...
 
 setPreventDoubleSubmission ($a_val)
 Set prevent double submission. More...
 
 getPreventDoubleSubmission ()
 Get prevent double submission. More...
 
 getHTML ()
 Get HTML. More...
 
 getContent ()
 Get Content. More...
 

Protected Attributes

 $provider
 
 $adminContext = false
 
- Protected Attributes inherited from ilPropertyFormGUI
 $lng
 
 $ctrl
 
 $tpl
 
 $user
 
 $settings
 
 $mode = "std"
 
 $check_input_called = false
 
 $disable_standard_message = false
 
 $top_anchor = "il_form_top"
 
 $titleicon = false
 
 $description = ""
 
 $tbl_width = false
 
 $show_top_buttons = true
 
 $hide_labels = false
 
 $force_top_buttons = false
 
- Protected Attributes inherited from ilFormGUI
 $formaction
 
 $multipart = false
 
 $keepopen = false
 
 $opentag = true
 
 $id
 
 $name
 
 $prevent_double_submission = false
 

Additional Inherited Members

- Protected Member Functions inherited from ilPropertyFormGUI
 hideRequired ($a_type)
 
 rebuildUploadedFiles ()
 try to rebuild files More...
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilLTIConsumeProviderFormGUI::__construct ( ilLTIConsumeProvider  $provider)

ilLTIConsumeProviderFormGUI constructor.

Parameters
ilLTIConsumeProvider$provider

Definition at line 30 of file class.ilLTIConsumeProviderFormGUI.php.

References $provider, and ILIAS\GlobalScreen\Provider\__construct().

31  {
33 
34  $this->provider = $provider;
35  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ initForm()

ilLTIConsumeProviderFormGUI::initForm (   $formaction,
  $saveCmd,
  $cancelCmd 
)
Parameters
$formaction
$saveCmd
$cancelCmd

Definition at line 58 of file class.ilLTIConsumeProviderFormGUI.php.

References $DIC, ilFormGUI\$formaction, ilPropertyFormGUI\$lng, ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ilLTIConsumeProvider\AVAILABILITY_CREATE, ilLTIConsumeProvider\AVAILABILITY_EXISTING, ilLTIConsumeProvider\AVAILABILITY_NONE, ilLTIConsumeProvider\getCategoriesSelectOptions(), ilCmiXapiUser\getIliasUuid(), ilLTIConsumeProviderIcon\getSupportedFileExtensions(), isAdminContext(), ilLTIConsumeProvider\PRIVACY_IDENT_IL_UUID_EXT_ACCOUNT, ilLTIConsumeProvider\PRIVACY_IDENT_IL_UUID_LOGIN, ilCmiXapiLrsType\PRIVACY_IDENT_IL_UUID_SHA256, ilCmiXapiLrsType\PRIVACY_IDENT_IL_UUID_SHA256URL, ilLTIConsumeProvider\PRIVACY_IDENT_IL_UUID_USER_ID, ilLTIConsumeProvider\PRIVACY_IDENT_REAL_EMAIL, ilLTIConsumeProvider\PRIVACY_NAME_FIRSTNAME, ilLTIConsumeProvider\PRIVACY_NAME_FULLNAME, ilLTIConsumeProvider\PRIVACY_NAME_LASTNAME, ilLTIConsumeProvider\PRIVACY_NAME_NONE, ilFormGUI\setFormAction(), ilFormPropertyGUI\setInfo(), ilPropertyFormGUI\setTitle(), ilCheckboxInputGUI\setValue(), ilRadioGroupInputGUI\setValue(), and ilTextAreaInputGUI\setValue().

59  {
60  global $DIC; /* @var \ILIAS\DI\Container $DIC */
61  $lng = $DIC->language();
62 
63  $this->setFormAction($formaction);
64  $this->addCommandButton($saveCmd, $lng->txt('save'));
65  $this->addCommandButton($cancelCmd, $lng->txt('cancel'));
66 
67  if ($this->provider->getId()) {
68  $this->setTitle($lng->txt('lti_form_provider_edit'));
69  } else {
70  $this->setTitle($lng->txt('lti_form_provider_create'));
71  }
72 
73  $titleInp = new ilTextInputGUI($lng->txt('lti_con_prov_title'), 'title');
74  $titleInp->setValue($this->provider->getTitle());
75  $titleInp->setRequired(true);
76  $this->addItem($titleInp);
77 
78  $descInp = new ilTextInputGUI($lng->txt('lti_con_prov_description'), 'description');
79  $descInp->setValue($this->provider->getDescription());
80  $this->addItem($descInp);
81 
82  $iconInp = new ilImageFileInputGUI($lng->txt('lti_con_prov_icon'), 'icon');
83  $iconInp->setInfo($lng->txt('obj_tile_image_info'));
85  $iconInp->setUseCache(false);
86  if ($this->provider->hasProviderIcon() && $this->provider->getProviderIcon()->exists()) {
87  $iconInp->setImage($this->provider->getProviderIcon()->getAbsoluteFilePath());
88  } else {
89  $iconInp->setImage('');//todo default image?
90  }
91  $this->addItem($iconInp);
92 
93  if ($this->isAdminContext()) {
94  $availabilityInp = new ilRadioGroupInputGUI($lng->txt('lti_con_prov_availability'), 'availability');
95  $availabilityInp->setValue($this->provider->getAvailability());
96  $availabilityInp->setRequired(true);
97  $optionCreate = new ilRadioOption(
98  $lng->txt('lti_con_prov_availability_create'),
100  );
101  $availabilityInp->addOption($optionCreate);
102  $optionCreate = new ilRadioOption(
103  $lng->txt('lti_con_prov_availability_existing'),
105  );
106  $availabilityInp->addOption($optionCreate);
107  $optionCreate = new ilRadioOption(
108  $lng->txt('lti_con_prov_availability_non'),
110  );
111  $availabilityInp->addOption($optionCreate);
112  $this->addItem($availabilityInp);
113  }
114 
115 
116  $sectionHeader = new ilFormSectionHeaderGUI();
117  $sectionHeader->setTitle($lng->txt('lti_con_prov_authentication'));
118  $this->addItem($sectionHeader);
119 
120 
121  $providerUrlInp = new ilTextInputGUI($lng->txt('lti_con_prov_url'), 'provider_url');
122  $providerUrlInp->setValue($this->provider->getProviderUrl());
123  $providerUrlInp->setRequired(true);
124  $this->addItem($providerUrlInp);
125  //Abfrage ob Key und secret von Objekterstellern eingegeben werden soll
126  $item = new ilCheckboxInputGUI($lng->txt('lti_con_prov_provider_key_global'), 'provider_key_global');
127  $item->setValue("1");
128  if (!$this->provider->isProviderKeyCustomizable()) {
129  $item->setChecked(true);
130  }
131  $item->setInfo($lng->txt('lti_con_prov_provider_key_global_info'));
132 
133  $providerKeyInp = new ilTextInputGUI($lng->txt('lti_con_prov_key'), 'provider_key');
134  $providerKeyInp->setValue($this->provider->getProviderKey());
135  $providerKeyInp->setRequired(true);
136  $item->addSubItem($providerKeyInp);
137 
138  $providerSecretInp = new ilTextInputGUI($lng->txt('lti_con_prov_secret'), 'provider_secret');
139  $providerSecretInp->setValue($this->provider->getProviderSecret());
140  $providerSecretInp->setRequired(true);
141  $item->addSubItem($providerSecretInp);
142 
143  $this->addItem($item);
144 
145  //privacy-settings
146 
147  $sectionHeader = new ilFormSectionHeaderGUI();
148  $sectionHeader->setTitle($lng->txt('lti_con_prov_privacy_settings'));
149  $this->addItem($sectionHeader);
150 
151  $item = new ilRadioGroupInputGUI($DIC->language()->txt('conf_privacy_ident'), 'privacy_ident');
152  $op = new ilRadioOption(
153  $DIC->language()->txt('conf_privacy_ident_il_uuid_user_id'),
155  );
156  $op->setInfo($DIC->language()->txt('conf_privacy_ident_il_uuid_user_id_info'));
157  $item->addOption($op);
158  $op = new ilRadioOption(
159  $DIC->language()->txt('conf_privacy_ident_il_uuid_login'),
161  );
162  $op->setInfo($DIC->language()->txt('conf_privacy_ident_il_uuid_login_info'));
163  $item->addOption($op);
164  $op = new ilRadioOption(
165  $DIC->language()->txt('conf_privacy_ident_il_uuid_ext_account'),
167  );
168  $op->setInfo($DIC->language()->txt('conf_privacy_ident_il_uuid_ext_account_info'));
169  $item->addOption($op);
170  $op = new ilRadioOption(
171  $DIC->language()->txt('conf_privacy_ident_il_uuid_sha256'),
173  );
174  $op->setInfo($DIC->language()->txt('conf_privacy_ident_il_uuid_sha256_info'));
175  $item->addOption($op);
176  $op = new ilRadioOption(
177  $DIC->language()->txt('conf_privacy_ident_il_uuid_sha256url'),
179  );
180  $op->setInfo($DIC->language()->txt('conf_privacy_ident_il_uuid_sha256url_info'));
181  $item->addOption($op);
182  $op = new ilRadioOption(
183  $DIC->language()->txt('conf_privacy_ident_real_email'),
185  );
186  $op->setInfo($DIC->language()->txt('conf_privacy_ident_real_email_info'));
187  $item->addOption($op);
188  $item->setValue($this->provider->getPrivacyIdent());
189  $item->setInfo(
190  $DIC->language()->txt('conf_privacy_ident_info') . ' ' . ilCmiXapiUser::getIliasUuid() . '.ilias'
191  );
192  $item->setRequired(false);
193  $this->addItem($item);
194 
195  $item = new ilRadioGroupInputGUI($DIC->language()->txt('conf_privacy_name'), 'privacy_name');
196  $op = new ilRadioOption($DIC->language()->txt('conf_privacy_name_none'), ilLTIConsumeProvider::PRIVACY_NAME_NONE);
197  $op->setInfo($DIC->language()->txt('conf_privacy_name_none_info'));
198  $item->addOption($op);
199  $op = new ilRadioOption($DIC->language()->txt('conf_privacy_name_firstname'), ilLTIConsumeProvider::PRIVACY_NAME_FIRSTNAME);
200  $op->setInfo($DIC->language()->txt('conf_privacy_name_firstname_info'));
201  $item->addOption($op);
202  $op = new ilRadioOption($DIC->language()->txt('conf_privacy_name_lastname'), ilLTIConsumeProvider::PRIVACY_NAME_LASTNAME);
203  $op->setInfo($DIC->language()->txt('conf_privacy_name_lastname_info'));
204  $item->addOption($op);
205  $op = new ilRadioOption($DIC->language()->txt('conf_privacy_name_fullname'), ilLTIConsumeProvider::PRIVACY_NAME_FULLNAME);
206  $op->setInfo($DIC->language()->txt('conf_privacy_name_fullname_info'));
207  $item->addOption($op);
208  $item->setValue($this->provider->getPrivacyName());
209  $item->setInfo($DIC->language()->txt('conf_privacy_name_info'));
210  $item->setRequired(false);
211  $this->addItem($item);
212 
213  $includeUserImage = new ilCheckboxInputGUI($lng->txt('lti_con_prov_inc_usr_pic'), 'inc_usr_pic');
214  $includeUserImage->setInfo($lng->txt('lti_con_prov_inc_usr_pic_info'));
215  $includeUserImage->setChecked($this->provider->getIncludeUserPicture());
216  $this->addItem($includeUserImage);
217 
218  $item = new ilCheckboxInputGUI($lng->txt('lti_con_prov_external_provider'), 'is_external_provider');
219  $item->setValue("1");
220  if ($this->provider->IsExternalProvider()) {
221  $item->setChecked(true);
222  }
223  $item->setInfo($lng->txt('lti_con_prov_external_provider_info'));
224  $this->addItem($item);
225 
226 
227  $sectionHeader = new ilFormSectionHeaderGUI();
228  $sectionHeader->setTitle($lng->txt('lti_con_prov_learning_progress_options'));
229  $this->addItem($sectionHeader);
230  $item = new ilCheckboxInputGUI($lng->txt('lti_con_prov_has_outcome_service'), 'has_outcome_service');
231  $item->setValue("1");
232  if ($this->provider->getHasOutcome()) {
233  $item->setChecked(true);
234  }
235  $item->setInfo($lng->txt('lti_con_prov_has_outcome_service_info'));
236  $masteryScore = new ilNumberInputGUI($lng->txt('lti_con_prov_mastery_score_default'), 'mastery_score');
237  $masteryScore->setInfo($lng->txt('lti_con_prov_mastery_score_default_info'));
238  $masteryScore->setSuffix('%');
239  $masteryScore->allowDecimals(true);
240  $masteryScore->setDecimals(2);
241  $masteryScore->setMinvalueShouldBeGreater(false);
242  $masteryScore->setMinValue(0);
243  $masteryScore->setMaxvalueShouldBeLess(false);
244  $masteryScore->setMaxValue(100);
245  $masteryScore->setSize(4);
246  $masteryScore->setValue($this->provider->getMasteryScorePercent());
247  $item->addSubItem($masteryScore);
248  $this->addItem($item);
249 
250 
251  $sectionHeader = new ilFormSectionHeaderGUI();
252  $sectionHeader->setTitle($lng->txt('lti_con_prov_launch_options'));
253  $this->addItem($sectionHeader);
254 
255  $item = new ilCheckboxInputGUI($lng->txt('lti_con_prov_use_provider_id'), 'use_provider_id');
256  $item->setValue("1");
257  if ($this->provider->getUseProviderId()) {
258  $item->setChecked(true);
259  }
260  $item->setInfo($lng->txt('lti_con_prov_use_provider_id_info'));
261 
262  $this->addItem($item);
263 
264  $item = new ilCheckboxInputGUI($lng->txt('lti_con_prov_always_learner'), 'always_learner');
265  $item->setValue("1");
266  if ($this->provider->getAlwaysLearner()) {
267  $item->setChecked(true);
268  }
269  $item->setInfo($lng->txt('lti_con_prov_always_learner_info'));
270  $this->addItem($item);
271 
272  $item = new ilCheckboxInputGUI($lng->txt('lti_con_prov_use_xapi'), 'use_xapi');
273  $item->setValue("1");
274  if ($this->provider->getUseXapi()) {
275  $item->setChecked(true);
276  }
277  $item->setInfo($lng->txt('lti_con_prov_use_xapi_info'));
278 
279  $subitem = new ilTextInputGUI($lng->txt('lti_con_prov_xapi_launch_url'), 'xapi_launch_url');
280  $subitem->setValue($this->provider->getXapiLaunchUrl());
281  $subitem->setInfo($lng->txt('lti_con_prov_xapi_launch_url_info'));
282  $subitem->setRequired(true);
283  $subitem->setMaxLength(255);
284  $item->addSubItem($subitem);
285 
286  $subitem = new ilTextInputGUI($lng->txt('lti_con_prov_xapi_launch_key'), 'xapi_launch_key');
287  $subitem->setValue($this->provider->getXapiLaunchKey());
288  $subitem->setInfo($lng->txt('lti_con_prov_xapi_launch_key_info'));
289  $subitem->setRequired(true);
290  $subitem->setMaxLength(64);
291  $item->addSubItem($subitem);
292 
293  $subitem = new ilTextInputGUI($lng->txt('lti_con_prov_xapi_launch_secret'), 'xapi_launch_secret');
294  $subitem->setValue($this->provider->getXapiLaunchSecret());
295  $subitem->setInfo($lng->txt('lti_con_prov_xapi_launch_secret_info'));
296  $subitem->setRequired(true);
297  $subitem->setMaxLength(64);
298  $item->addSubItem($subitem);
299 
300  $subitem = new ilTextInputGUI($lng->txt('lti_con_prov_xapi_activity_id'), 'xapi_activity_id');
301  $subitem->setValue($this->provider->getXapiActivityId());
302  $subitem->setInfo($lng->txt('lti_con_prov_xapi_activity_id_info'));
303  $subitem->setMaxLength(128);
304  $item->addSubItem($subitem);
305 
306  $this->addItem($item);
307 
308  $item = new ilTextAreaInputGUI($lng->txt('lti_con_prov_custom_params'), 'custom_params');
309  $item->setValue($this->provider->getCustomParams());
310  $item->setRows(6);
311  $item->setInfo($lng->txt('lti_con_prov_custom_params_info'));
312  $this->addItem($item);
313 
314  $sectionHeader = new ilFormSectionHeaderGUI();
315  $sectionHeader->setTitle($lng->txt('lti_con_prov_group_options'));
316  $this->addItem($sectionHeader);
317 
318  $item = new ilTextInputGUI($lng->txt('lti_con_prov_keywords'), 'keywords');
319  $item->setValue($this->provider->getKeywords());
320  $item->setInfo($lng->txt('lti_con_prov_keywords_info'));
321  $item->setMaxLength(1000);
322  $this->addItem($item);
323 
324  $category = new ilRadioGroupInputGUI($DIC->language()->txt('lti_con_prov_category'), 'category');
325  $category->setInfo($DIC->language()->txt('lti_con_prov_category_info'));
326  $category->setValue($this->provider->getCategory());
327  $category->setRequired(true);
328  foreach (ilLTIConsumeProvider::getCategoriesSelectOptions() as $value => $label) {
329  $category->addOption(new ilRadioOption($label, $value));
330  }
331  $this->addItem($category);
332 
333  $sectionHeader = new ilFormSectionHeaderGUI();
334  $sectionHeader->setTitle($lng->txt('lti_con_prov_hints'));
335  $this->addItem($sectionHeader);
336 
337  $remarksInp = new ilTextAreaInputGUI($lng->txt('lti_con_prov_remarks'), 'remarks');
338  $remarksInp->setValue($this->provider->getRemarks());
339  $remarksInp->setRows(6);
340  $this->addItem($remarksInp);
341  }
This class represents an option in a radio group.
This class represents a section header in a property form.
setValue($a_value)
Set Value.
This class represents a checkbox property in a property form.
setFormAction($a_formaction)
Set FormAction.
addItem($a_item)
Add Item (Property, SectionHeader).
setInfo($a_info)
Set Information Text.
This class represents a property in a property form.
setTitle($a_title)
Set Title.
This class represents a number property in a property form.
setValue($a_value)
Set Value.
global $DIC
Definition: goto.php:24
addCommandButton($a_cmd, $a_text, $a_id="")
Add Command button.
This class represents an image file property in a property form.
This class represents a text area property in a property form.
+ Here is the call graph for this function:

◆ initProvider()

ilLTIConsumeProviderFormGUI::initProvider ( ilLTIConsumeProvider  $provider)

Definition at line 343 of file class.ilLTIConsumeProviderFormGUI.php.

References ilPropertyFormGUI\getInput(), ilPropertyFormGUI\getItemByPostVar(), isAdminContext(), ilLTIConsumeProvider\isProviderKeyCustomizable(), ilLTIConsumeProvider\isValidCategory(), ilLTIConsumeProvider\setAlwaysLearner(), ilLTIConsumeProvider\setAvailability(), ilLTIConsumeProvider\setCategory(), ilLTIConsumeProvider\setCustomParams(), ilLTIConsumeProvider\setDescription(), ilLTIConsumeProvider\setHasOutcome(), ilLTIConsumeProvider\setIncludeUserPicture(), ilLTIConsumeProvider\setIsExternalProvider(), ilLTIConsumeProvider\setKeywords(), ilLTIConsumeProvider\setMasteryScorePercent(), ilLTIConsumeProvider\setPrivacyIdent(), ilLTIConsumeProvider\setPrivacyName(), ilLTIConsumeProvider\setProviderIconUploadInput(), ilLTIConsumeProvider\setProviderKey(), ilLTIConsumeProvider\setProviderKeyCustomizable(), ilLTIConsumeProvider\setProviderSecret(), ilLTIConsumeProvider\setProviderUrl(), ilLTIConsumeProvider\setRemarks(), ilLTIConsumeProvider\setTitle(), ilLTIConsumeProvider\setUseProviderId(), ilLTIConsumeProvider\setUseXapi(), ilLTIConsumeProvider\setXapiActivityId(), ilLTIConsumeProvider\setXapiLaunchKey(), ilLTIConsumeProvider\setXapiLaunchSecret(), and ilLTIConsumeProvider\setXapiLaunchUrl().

344  {
345  $provider->setTitle($this->getInput('title'));
346  $provider->setDescription($this->getInput('description'));
347 
348  $provider->setProviderIconUploadInput($this->getItemByPostVar('icon'));
349 
350 
351  $provider->setHasOutcome((bool) $this->getInput('has_outcome_service'));
352  $provider->setMasteryScorePercent($this->getInput('mastery_score'));
353 
354  if ($this->isAdminContext()) {
355  $provider->setAvailability($this->getInput('availability'));
356  }
357 
358  if ($this->getInput('provider_key_global') == 1) {
359  $provider->setProviderKeyCustomizable(false);
360  $provider->setProviderKey($this->getInput('provider_key'));
361  $provider->setProviderSecret($this->getInput('provider_secret'));
362  } else {
363  $provider->setProviderKeyCustomizable(true);
364  }
365  $provider->setPrivacyIdent($this->getInput('privacy_ident'));
366  $provider->setPrivacyName($this->getInput('privacy_name'));
367  $provider->setIncludeUserPicture((bool) $this->getInput('inc_usr_pic'));
368  $provider->setIsExternalProvider((bool) $this->getInput('is_external_provider'));
369 
370  $provider->setAlwaysLearner((bool) $this->getInput('always_learner'));
371 
372  $provider->setUseProviderId((bool) $this->getInput('use_provider_id'));
373  $provider->setXapiActivityId($this->getInput('xapi_activity_id'));
374 
375  $provider->setUseXapi((bool) $this->getInput('use_xapi'));
376  $provider->setXapiLaunchUrl($this->getInput('xapi_launch_url'));
377  $provider->setXapiLaunchKey($this->getInput('xapi_launch_key'));
378  $provider->setXapiLaunchSecret($this->getInput('xapi_launch_secret'));
379  $provider->setCustomParams($this->getInput('custom_params'));
380  $provider->setKeywords($this->getInput('keywords'));
381 
382  if ($provider->isValidCategory($this->getInput('category'))) {
383  $provider->setCategory($this->getInput('category'));
384  }
385 
386  if (null !== $this->getInput('provider_url')) {
387  $provider->setProviderUrl($this->getInput('provider_url'));
388  }
389  if ($provider->isProviderKeyCustomizable()) {
390  $provider->setProviderKey($this->getInput('provider_key'));
391  $provider->setProviderSecret($this->getInput('provider_secret'));
392  }
393  $provider->setRemarks($this->getInput('remarks'));
394  }
getItemByPostVar($a_post_var)
Get Item by POST variable.
setIsExternalProvider(bool $is_external_provider)
setMasteryScorePercent(float $mastery_score_percent)
setXapiLaunchSecret(string $xapi_launch_secret)
setXapiLaunchUrl(string $xapi_launch_url)
setPrivacyName(string $privacy_name)
setIncludeUserPicture(bool $include_user_picture)
setUseProviderId(bool $use_provider_id)
setCustomParams(string $custom_params)
setProviderKey(string $provider_key)
setAlwaysLearner(bool $always_learner)
setXapiActivityId(string $xapi_activity_id)
setProviderKeyCustomizable(bool $provider_key_customizable)
setProviderIconUploadInput(ilImageFileInputGUI $providerIconUploadInput)
setXapiLaunchKey(string $xapi_launch_key)
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.
setProviderSecret(string $provider_secret)
setDescription(string $description)
setProviderUrl(string $provider_url)
+ Here is the call graph for this function:

◆ isAdminContext()

ilLTIConsumeProviderFormGUI::isAdminContext ( )
Returns
bool

Definition at line 40 of file class.ilLTIConsumeProviderFormGUI.php.

References $adminContext.

Referenced by initForm(), and initProvider().

+ Here is the caller graph for this function:

◆ setAdminContext()

ilLTIConsumeProviderFormGUI::setAdminContext ( bool  $adminContext)
Parameters
bool$adminContext

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

References $adminContext.

49  {
50  $this->adminContext = $adminContext;
51  }

Field Documentation

◆ $adminContext

ilLTIConsumeProviderFormGUI::$adminContext = false
protected

Definition at line 24 of file class.ilLTIConsumeProviderFormGUI.php.

Referenced by isAdminContext(), and setAdminContext().

◆ $provider

ilLTIConsumeProviderFormGUI::$provider
protected

Definition at line 19 of file class.ilLTIConsumeProviderFormGUI.php.

Referenced by __construct().


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