61 $lng = $DIC->language();
67 if ($this->provider->getId()) {
74 $titleInp->setValue($this->provider->getTitle());
75 $titleInp->setRequired(
true);
79 $descInp->setValue($this->provider->getDescription());
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());
89 $iconInp->setImage(
'');
95 $availabilityInp->
setValue($this->provider->getAvailability());
96 $availabilityInp->setRequired(
true);
98 $lng->txt(
'lti_con_prov_availability_create'),
101 $availabilityInp->addOption($optionCreate);
103 $lng->txt(
'lti_con_prov_availability_existing'),
106 $availabilityInp->addOption($optionCreate);
108 $lng->txt(
'lti_con_prov_availability_non'),
111 $availabilityInp->addOption($optionCreate);
112 $this->
addItem($availabilityInp);
117 $sectionHeader->setTitle(
$lng->txt(
'lti_con_prov_authentication'));
118 $this->
addItem($sectionHeader);
122 $providerUrlInp->setValue($this->provider->getProviderUrl());
123 $providerUrlInp->setRequired(
true);
124 $this->
addItem($providerUrlInp);
128 if (!$this->provider->isProviderKeyCustomizable()) {
129 $item->setChecked(
true);
131 $item->setInfo(
$lng->txt(
'lti_con_prov_provider_key_global_info'));
134 $providerKeyInp->setValue($this->provider->getProviderKey());
135 $providerKeyInp->setRequired(
true);
136 $item->addSubItem($providerKeyInp);
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);
148 $sectionHeader->setTitle(
$lng->txt(
'lti_con_prov_privacy_settings'));
149 $this->
addItem($sectionHeader);
153 $DIC->language()->txt(
'conf_privacy_ident_il_uuid_user_id'),
156 $op->
setInfo($DIC->language()->txt(
'conf_privacy_ident_il_uuid_user_id_info'));
157 $item->addOption($op);
159 $DIC->language()->txt(
'conf_privacy_ident_il_uuid_login'),
162 $op->
setInfo($DIC->language()->txt(
'conf_privacy_ident_il_uuid_login_info'));
163 $item->addOption($op);
165 $DIC->language()->txt(
'conf_privacy_ident_il_uuid_ext_account'),
168 $op->
setInfo($DIC->language()->txt(
'conf_privacy_ident_il_uuid_ext_account_info'));
169 $item->addOption($op);
171 $DIC->language()->txt(
'conf_privacy_ident_il_uuid_SHA256'),
174 $op->
setInfo($DIC->language()->txt(
'conf_privacy_ident_il_uuid_SHA256_info'));
175 $item->addOption($op);
177 $DIC->language()->txt(
'conf_privacy_ident_real_email'),
180 $op->
setInfo($DIC->language()->txt(
'conf_privacy_ident_real_email_info'));
181 $item->addOption($op);
182 $item->setValue($this->provider->getPrivacyIdent());
186 $item->setRequired(
false);
191 $op->
setInfo($DIC->language()->txt(
'conf_privacy_name_none_info'));
192 $item->addOption($op);
194 $op->
setInfo($DIC->language()->txt(
'conf_privacy_name_firstname_info'));
195 $item->addOption($op);
197 $op->
setInfo($DIC->language()->txt(
'conf_privacy_name_lastname_info'));
198 $item->addOption($op);
200 $op->
setInfo($DIC->language()->txt(
'conf_privacy_name_fullname_info'));
201 $item->addOption($op);
202 $item->setValue($this->provider->getPrivacyName());
203 $item->setInfo($DIC->language()->txt(
'conf_privacy_name_info'));
204 $item->setRequired(
false);
208 $includeUserImage->
setInfo(
$lng->txt(
'lti_con_prov_inc_usr_pic_info'));
209 $includeUserImage->setChecked($this->provider->getIncludeUserPicture());
210 $this->
addItem($includeUserImage);
214 if ($this->provider->IsExternalProvider()) {
215 $item->setChecked(
true);
217 $item->setInfo(
$lng->txt(
'lti_con_prov_external_provider_info'));
222 $sectionHeader->setTitle(
$lng->txt(
'lti_con_prov_learning_progress_options'));
223 $this->
addItem($sectionHeader);
226 if ($this->provider->getHasOutcome()) {
227 $item->setChecked(
true);
229 $item->setInfo(
$lng->txt(
'lti_con_prov_has_outcome_service_info'));
230 $masteryScore =
new ilNumberInputGUI(
$lng->txt(
'lti_con_prov_mastery_score_default'),
'mastery_score');
231 $masteryScore->
setInfo(
$lng->txt(
'lti_con_prov_mastery_score_default_info'));
232 $masteryScore->setSuffix(
'%');
233 $masteryScore->allowDecimals(
true);
234 $masteryScore->setDecimals(2);
235 $masteryScore->setMinvalueShouldBeGreater(
false);
236 $masteryScore->setMinValue(0);
237 $masteryScore->setMaxvalueShouldBeLess(
false);
238 $masteryScore->setMaxValue(100);
239 $masteryScore->setSize(4);
240 $masteryScore->setValue($this->provider->getMasteryScorePercent());
241 $item->addSubItem($masteryScore);
246 $sectionHeader->setTitle(
$lng->txt(
'lti_con_prov_launch_options'));
247 $this->
addItem($sectionHeader);
251 if ($this->provider->getUseProviderId()) {
252 $item->setChecked(
true);
254 $item->setInfo(
$lng->txt(
'lti_con_prov_use_provider_id_info'));
260 if ($this->provider->getAlwaysLearner()) {
261 $item->setChecked(
true);
263 $item->setInfo(
$lng->txt(
'lti_con_prov_always_learner_info'));
268 if ($this->provider->getUseXapi()) {
269 $item->setChecked(
true);
271 $item->setInfo(
$lng->txt(
'lti_con_prov_use_xapi_info'));
273 $subitem =
new ilTextInputGUI(
$lng->txt(
'lti_con_prov_xapi_launch_url'),
'xapi_launch_url');
274 $subitem->setValue($this->provider->getXapiLaunchUrl());
275 $subitem->setInfo(
$lng->txt(
'lti_con_prov_xapi_launch_url_info'));
276 $subitem->setRequired(
true);
277 $subitem->setMaxLength(255);
278 $item->addSubItem($subitem);
280 $subitem =
new ilTextInputGUI(
$lng->txt(
'lti_con_prov_xapi_launch_key'),
'xapi_launch_key');
281 $subitem->setValue($this->provider->getXapiLaunchKey());
282 $subitem->setInfo(
$lng->txt(
'lti_con_prov_xapi_launch_key_info'));
283 $subitem->setRequired(
true);
284 $subitem->setMaxLength(64);
285 $item->addSubItem($subitem);
287 $subitem =
new ilTextInputGUI(
$lng->txt(
'lti_con_prov_xapi_launch_secret'),
'xapi_launch_secret');
288 $subitem->setValue($this->provider->getXapiLaunchSecret());
289 $subitem->setInfo(
$lng->txt(
'lti_con_prov_xapi_launch_secret_info'));
290 $subitem->setRequired(
true);
291 $subitem->setMaxLength(64);
292 $item->addSubItem($subitem);
294 $subitem =
new ilTextInputGUI(
$lng->txt(
'lti_con_prov_xapi_activity_id'),
'xapi_activity_id');
295 $subitem->setValue($this->provider->getXapiActivityId());
296 $subitem->setInfo(
$lng->txt(
'lti_con_prov_xapi_activity_id_info'));
297 $subitem->setMaxLength(128);
298 $item->addSubItem($subitem);
303 $item->
setValue($this->provider->getCustomParams());
305 $item->setInfo(
$lng->txt(
'lti_con_prov_custom_params_info'));
309 $sectionHeader->setTitle(
$lng->txt(
'lti_con_prov_group_options'));
310 $this->
addItem($sectionHeader);
313 $item->setValue($this->provider->getKeywords());
314 $item->setInfo(
$lng->txt(
'lti_con_prov_keywords_info'));
315 $item->setMaxLength(1000);
318 $category =
new ilRadioGroupInputGUI($DIC->language()->txt(
'lti_con_prov_category'),
'category');
319 $category->
setInfo($DIC->language()->txt(
'lti_con_prov_category_info'));
320 $category->setValue($this->provider->getCategory());
321 $category->setRequired(
true);
328 $sectionHeader->setTitle(
$lng->txt(
'lti_con_prov_hints'));
329 $this->
addItem($sectionHeader);
332 $remarksInp->
setValue($this->provider->getRemarks());
333 $remarksInp->setRows(6);
352 if ($this->
getInput(
'provider_key_global') == 1) {
380 if (null !== $this->
getInput(
'provider_url')) {
isProviderKeyCustomizable()
This class represents an option in a radio group.
const PRIVACY_IDENT_IL_UUID_USER_ID
setUseXapi(bool $use_xapi)
setIsExternalProvider(bool $is_external_provider)
const PRIVACY_IDENT_IL_UUID_EXT_ACCOUNT
setValue($a_value)
Set Value.
const AVAILABILITY_CREATE
const PRIVACY_NAME_LASTNAME
setRemarks(string $remarks)
setHasOutcome(bool $has_outcome)
setMasteryScorePercent(float $mastery_score_percent)
setXapiLaunchSecret(string $xapi_launch_secret)
setXapiLaunchUrl(string $xapi_launch_url)
setPrivacyName(string $privacy_name)
setIncludeUserPicture(bool $include_user_picture)
const PRIVACY_NAME_FIRSTNAME
setUseProviderId(bool $use_provider_id)
static getCategoriesSelectOptions()
setCustomParams(string $custom_params)
setProviderKey(string $provider_key)
setAlwaysLearner(bool $always_learner)
static getSupportedFileExtensions()
setXapiActivityId(string $xapi_activity_id)
setProviderKeyCustomizable(bool $provider_key_customizable)
setProviderIconUploadInput(ilImageFileInputGUI $providerIconUploadInput)
setXapiLaunchKey(string $xapi_launch_key)
const PRIVACY_NAME_FULLNAME
setPrivacyIdent($privacy_ident)
isValidCategory(string $category)
setCategory(string $category)
setKeywords(string $keywords)
const PRIVACY_IDENT_REAL_EMAIL
__construct(Container $dic, ilPlugin $plugin)
setProviderSecret(string $provider_secret)
This class represents a text area property in a property form.
const PRIVACY_IDENT_IL_UUID_SHA256
const AVAILABILITY_EXISTING
setDescription(string $description)
setProviderUrl(string $provider_url)
setAvailability(int $availability)
const PRIVACY_IDENT_IL_UUID_LOGIN