45 $DIC->language()->loadLanguageModule(
'lti');
50 $this->
setTitle($DIC->language()->txt(
'lti_settings_form'));
53 $item->
setValue($this->object->getProvider()->getTitle());
54 $item->setInfo($this->object->getProvider()->getDescription());
57 $item =
new ilTextInputGUI($DIC->language()->txt(
'title'),
'title');
59 $item->setMaxLength(128);
60 $item->setRequired(
true);
61 $item->setInfo($DIC->language()->txt(
'title_info'));
62 $item->setValue($this->object->getTitle());
66 $item->
setInfo($DIC->language()->txt(
'description_info'));
68 $item->setValue($this->object->getDescription());
72 $item->
setInfo($DIC->language()->txt(
"online_info"));
74 if (!$this->object->getOfflineStatus()) {
75 $item->setChecked(
true);
79 if ($this->object->getProvider()->isProviderKeyCustomizable()) {
81 $sectionHeader->setTitle($DIC->language()->txt(
'lti_con_prov_authentication'));
84 $providerKeyInp =
new ilTextInputGUI($DIC->language()->txt(
'lti_con_prov_key'),
'provider_key');
85 $providerKeyInp->setValue($this->object->getCustomLaunchKey());
86 $providerKeyInp->setRequired(
true);
87 $this->
addItem($providerKeyInp);
89 $providerSecretInp =
new ilTextInputGUI($DIC->language()->txt(
'lti_con_prov_secret'),
'provider_secret');
90 $providerSecretInp->setValue($this->object->getCustomLaunchSecret());
91 $providerSecretInp->setRequired(
true);
92 $this->
addItem($providerSecretInp);
95 if ($this->object->getProvider()->getHasOutcome()) {
97 $sectionHeader->setTitle($DIC->language()->txt(
'learning_progress_options'));
99 $masteryScore =
new ilNumberInputGUI($DIC->language()->txt(
'mastery_score'),
'mastery_score');
100 $masteryScore->
setInfo($DIC->language()->txt(
'mastery_score_info'));
101 $masteryScore->setSuffix(
'%');
102 $masteryScore->allowDecimals(
true);
103 $masteryScore->setDecimals(2);
104 $masteryScore->setMinvalueShouldBeGreater(
false);
105 $masteryScore->setMinValue(0);
106 $masteryScore->setMaxvalueShouldBeLess(
false);
107 $masteryScore->setMaxValue(100);
108 $masteryScore->setSize(4);
109 $masteryScore->setValue($this->object->getMasteryScorePercent());
114 $item->setTitle($DIC->language()->txt(
'lti_form_section_appearance'));
119 $item->setValue($this->object->getLaunchMethod());
121 $DIC->language()->txt(
'launch_method_own_win'),
124 $optOwnWindow->
setInfo($DIC->language()->txt(
'launch_method_own_win_info'));
125 $item->addOption($optOwnWindow);
127 $DIC->language()->txt(
'launch_method_new_win'),
130 $optAnyWindow->
setInfo($DIC->language()->txt(
'launch_method_new_win_info'));
131 $item->addOption($optAnyWindow);
133 $DIC->language()->txt(
'launch_method_embedded'),
136 $optEmbedded->
setInfo($DIC->language()->txt(
'launch_method_embedded_info'));
137 $item->addOption($optEmbedded);
141 if ($this->object->getProvider()->getUseXapi()) {
143 $item->
setInfo($DIC->language()->txt(
"use_xapi_info"));
144 $item->setValue(
"1");
145 if ($this->object->getUseXapi()) {
146 $item->setChecked(
true);
149 if (!strlen($this->object->getProvider()->getXapiActivityId())) {
150 $subitem =
new ilTextInputGUI($DIC->language()->txt(
'activity_id'),
'activity_id');
151 $subitem->setSize(40);
152 $subitem->setMaxLength(128);
153 $subitem->setRequired(
true);
154 $subitem->setInfo($DIC->language()->txt(
'activity_id_info'));
155 $subitem->setValue($this->object->getCustomActivityId());
156 $item->addSubItem($subitem);
159 $subitem =
new ilCheckboxInputGUI($DIC->language()->txt(
'show_statements'),
'show_statements');
160 $subitem->
setInfo($DIC->language()->txt(
"show_statements_info"));
161 $subitem->setValue(
"1");
162 if ($this->object->isStatementsReportEnabled()) {
163 $subitem->setChecked(
true);
165 $item->addSubItem($subitem);
167 $highscore =
new ilCheckboxInputGUI($DIC->language()->txt(
"highscore_enabled"),
"highscore_enabled");
169 $highscore->setChecked($this->object->getHighscoreEnabled());
170 $highscore->setInfo($DIC->language()->txt(
"highscore_description"));
171 $highscore_tables =
new ilRadioGroupInputGUI($DIC->language()->txt(
'highscore_mode'),
'highscore_mode');
173 $highscore_tables->setValue($this->object->getHighscoreMode());
175 $highscore_table_own->
setInfo($DIC->language()->txt(
'highscore_own_table_description'));
176 $highscore_tables->addOption($highscore_table_own);
178 $highscore_table_other->
setInfo($DIC->language()->txt(
'highscore_top_table_description'));
179 $highscore_tables->addOption($highscore_table_other);
181 $highscore_table_other->
setInfo($DIC->language()->txt(
'highscore_all_tables_description'));
182 $highscore_tables->addOption($highscore_table_other);
183 $highscore->addSubItem($highscore_tables);
184 $highscore_top_num =
new ilNumberInputGUI($DIC->language()->txt(
"highscore_top_num"),
"highscore_top_num");
185 $highscore_top_num->
setSize(4);
186 $highscore_top_num->setRequired(
true);
187 $highscore_top_num->setMinValue(1);
188 $highscore_top_num->setSuffix($DIC->language()->txt(
"highscore_top_num_unit"));
189 $highscore_top_num->setValue($this->object->getHighscoreTopNum(null));
190 $highscore_top_num->setInfo($DIC->language()->txt(
"highscore_top_num_description"));
191 $highscore->addSubItem($highscore_top_num);
192 $highscore_achieved_ts =
new ilCheckboxInputGUI($DIC->language()->txt(
"highscore_achieved_ts"),
"highscore_achieved_ts");
193 $highscore_achieved_ts->
setValue(1);
194 $highscore_achieved_ts->setChecked($this->object->getHighscoreAchievedTS());
195 $highscore_achieved_ts->setInfo($DIC->language()->txt(
"highscore_achieved_ts_description"));
196 $highscore->addSubItem($highscore_achieved_ts);
197 $highscore_percentage =
new ilCheckboxInputGUI($DIC->language()->txt(
"highscore_percentage"),
"highscore_percentage");
199 $highscore_percentage->setChecked($this->object->getHighscorePercentage());
200 $highscore_percentage->setInfo($DIC->language()->txt(
"highscore_percentage_description"));
201 $highscore->addSubItem($highscore_percentage);
202 $highscore_wtime =
new ilCheckboxInputGUI($DIC->language()->txt(
"highscore_wtime"),
"highscore_wtime");
204 $highscore_wtime->setChecked($this->object->getHighscoreWTime());
205 $highscore_wtime->setInfo($DIC->language()->txt(
"highscore_wtime_description"));
206 $highscore->addSubItem($highscore_wtime);
208 $item->addSubItem($highscore);
222 if ($object->
getProvider()->isProviderKeyCustomizable()) {
234 if (!strlen($this->object->getProvider()->getXapiActivityId())) {
setUseXapi(bool $use_xapi)
This class represents an option in a radio group.
const LAUNCH_METHOD_OWN_WIN
const HIGHSCORE_SHOW_TOP_TABLE
setHighscoreEnabled($a_enabled)
Sets if the highscore feature should be enabled.
setValue($a_value)
Set Value.
setCustomActivityId(string $custom_activity_id)
setStatementsReportEnabled($statementsReportEnabled)
getHighscoreEnabled()
Gets the setting which determines if the highscore feature is enabled.
setHighscorePercentage($a_percentage)
Sets if the percentages of the scores pass should be shown.
setMasteryScorePercent(float $mastery_score_percent)
setCustomLaunchSecret(string $customLaunchSecret)
setHighscoreAchievedTS($a_achieved_ts)
Sets if the date and time of the scores achievement should be displayed.
setInfo($a_info)
Set Info.
setLaunchMethod(string $launchMethod)
const HIGHSCORE_SHOW_OWN_TABLE
setHighscoreWTime($a_wtime)
Sets if the workingtime of the scores should be shown.
const LAUNCH_METHOD_NEW_WIN
This class represents a non editable value in a property form.
setOfflineStatus($a_status)
Set offline status.
__construct(Container $dic, ilPlugin $plugin)
setHighscoreTopNum($a_top_num)
Sets the number of entries which are to be shown in the top-rankings table.
setCustomLaunchKey(string $customLaunchKey)
This class represents a text area property in a property form.
const LAUNCH_METHOD_EMBEDDED
const HIGHSCORE_SHOW_ALL_TABLES