19declare(strict_types=1);
 
   45        $this->
initForm($formaction, $saveCommand, $cancelCommand);
 
   51        $DIC->language()->loadLanguageModule(
'lti');
 
   56        $this->
setTitle($DIC->language()->txt(
'lti_settings_form'));
 
   59        $item->setValue($this->
object->getProvider()->getTitle());
 
   60        $item->setInfo(htmlspecialchars($this->
object->getProvider()->getDescription()));
 
   65        $item->setMaxLength(128);
 
   66        $item->setRequired(
true);
 
   67        $item->setInfo(
$DIC->language()->txt(
'title_info'));
 
   68        $item->setValue($this->
object->getTitle());
 
   72        $item->setInfo(
$DIC->language()->txt(
'description_info'));
 
   74        $item->setValue($this->
object->getDescription());
 
   78        $item->setInfo(
$DIC->language()->txt(
"online_info"));
 
   80        if (!$this->
object->getOfflineStatus()) {
 
   81            $item->setChecked(
true);
 
   85        if ($this->
object->getProvider()->getLtiVersion() == 
'LTI-1p0' && $this->object->getProvider()->isProviderKeyCustomizable()) {
 
   87            $sectionHeader->setTitle(
$DIC->language()->txt(
'lti_con_prov_authentication'));
 
   90            $providerKeyInp = 
new ilTextInputGUI(
$DIC->language()->txt(
'lti_con_prov_key'), 
'provider_key');
 
   91            $providerKeyInp->setValue($this->
object->getCustomLaunchKey());
 
   92            $providerKeyInp->setRequired(
true);
 
   93            $this->
addItem($providerKeyInp);
 
   95            $providerSecretInp = 
new ilTextInputGUI(
$DIC->language()->txt(
'lti_con_prov_secret'), 
'provider_secret');
 
   96            $providerSecretInp->setValue($this->
object->getCustomLaunchSecret());
 
   97            $providerSecretInp->setRequired(
true);
 
   98            $this->
addItem($providerSecretInp);
 
  101        if ($this->
object->getProvider()->getHasOutcome()) {
 
  103            $sectionHeader->setTitle(
$DIC->language()->txt(
'learning_progress_options'));
 
  104            $this->
addItem($sectionHeader);
 
  106            $masteryScore->setInfo(
$DIC->language()->txt(
'mastery_score_info'));
 
  107            $masteryScore->setSuffix(
'%');
 
  108            $masteryScore->allowDecimals(
true);
 
  109            $masteryScore->setDecimals(2);
 
  110            $masteryScore->setMinvalueShouldBeGreater(
false);
 
  111            $masteryScore->setMinValue(0);
 
  112            $masteryScore->setMaxvalueShouldBeLess(
false);
 
  113            $masteryScore->setMaxValue(100);
 
  114            $masteryScore->setSize(4);
 
  115            $masteryScore->setValue((
string) $this->
object->getMasteryScorePercent());
 
  120        $item->setTitle(
$DIC->language()->txt(
'lti_form_section_appearance'));
 
  124        $item->setRequired(
true);
 
  125        $item->setValue($this->
object->getLaunchMethod());
 
  127            $DIC->language()->txt(
'launch_method_own_win'),
 
  130        $optOwnWindow->setInfo(
$DIC->language()->txt(
'launch_method_own_win_info'));
 
  131        $item->addOption($optOwnWindow);
 
  133            $DIC->language()->txt(
'launch_method_new_win'),
 
  136        $optAnyWindow->setInfo(
$DIC->language()->txt(
'launch_method_new_win_info'));
 
  137        $item->addOption($optAnyWindow);
 
  139            $DIC->language()->txt(
'launch_method_embedded'),
 
  142        $optEmbedded->setInfo(
$DIC->language()->txt(
'launch_method_embedded_info'));
 
  143        $item->addOption($optEmbedded);
 
  147        $customParams->setRows(6);
 
  148        $customParams->setValue($this->
object->getCustomParams());
 
  149        $customParams->setInfo(
$DIC->language()->txt(
'lti_con_prov_custom_params_info'));
 
  152        if ($this->
object->getProvider()->getUseXapi()) {
 
  154            $item->setInfo(
$DIC->language()->txt(
"use_xapi_info"));
 
  155            $item->setValue(
"1");
 
  156            if ($this->
object->getUseXapi()) {
 
  157                $item->setChecked(
true);
 
  160            if (!strlen($this->
object->getProvider()->getXapiActivityId())) {
 
  162                $subitem->setSize(40);
 
  163                $subitem->setMaxLength(128);
 
  164                $subitem->setRequired(
true);
 
  165                $subitem->setInfo(
$DIC->language()->txt(
'activity_id_info'));
 
  166                $subitem->setValue($this->
object->getCustomActivityId());
 
  167                $item->addSubItem($subitem);
 
  171            $subitem->setInfo(
$DIC->language()->txt(
"show_statements_info"));
 
  172            $subitem->setValue(
"1");
 
  173            if ($this->
object->isStatementsReportEnabled()) {
 
  174                $subitem->setChecked(
true);
 
  176            $item->addSubItem($subitem);
 
  179            $highscore->setValue(
"1");
 
  180            $highscore->setChecked($this->
object->getHighscoreEnabled());
 
  181            $highscore->setInfo(
$DIC->language()->txt(
"highscore_description"));
 
  183            $highscore_tables->setRequired(
true);
 
  184            $highscore_tables->setValue((
string) $this->
object->getHighscoreMode());
 
  186            $highscore_table_own->setInfo(
$DIC->language()->txt(
'highscore_own_table_description'));
 
  187            $highscore_tables->addOption($highscore_table_own);
 
  189            $highscore_table_other->setInfo(
$DIC->language()->txt(
'highscore_top_table_description'));
 
  190            $highscore_tables->addOption($highscore_table_other);
 
  192            $highscore_table_other->setInfo(
$DIC->language()->txt(
'highscore_all_tables_description'));
 
  193            $highscore_tables->addOption($highscore_table_other);
 
  194            $highscore->addSubItem($highscore_tables);
 
  195            $highscore_top_num = 
new ilNumberInputGUI(
$DIC->language()->txt(
"highscore_top_num"), 
"highscore_top_num");
 
  196            $highscore_top_num->setSize(4);
 
  197            $highscore_top_num->setRequired(
true);
 
  198            $highscore_top_num->setMinValue(1);
 
  199            $highscore_top_num->setSuffix(
$DIC->language()->txt(
"highscore_top_num_unit"));
 
  200            $highscore_top_num->setValue((
string) $this->
object->getHighscoreTopNum(0));
 
  201            $highscore_top_num->setInfo(
$DIC->language()->txt(
"highscore_top_num_description"));
 
  202            $highscore->addSubItem($highscore_top_num);
 
  203            $highscore_achieved_ts = 
new ilCheckboxInputGUI(
$DIC->language()->txt(
"highscore_achieved_ts"), 
"highscore_achieved_ts");
 
  204            $highscore_achieved_ts->setValue(
"1");
 
  205            $highscore_achieved_ts->setChecked($this->
object->getHighscoreAchievedTS());
 
  206            $highscore_achieved_ts->setInfo(
$DIC->language()->txt(
"highscore_achieved_ts_description"));
 
  207            $highscore->addSubItem($highscore_achieved_ts);
 
  208            $highscore_percentage = 
new ilCheckboxInputGUI(
$DIC->language()->txt(
"highscore_percentage"), 
"highscore_percentage");
 
  209            $highscore_percentage->setValue(
"1");
 
  210            $highscore_percentage->setChecked($this->
object->getHighscorePercentage());
 
  211            $highscore_percentage->setInfo(
$DIC->language()->txt(
"highscore_percentage_description"));
 
  212            $highscore->addSubItem($highscore_percentage);
 
  214            $highscore_wtime->setValue(
"1");
 
  215            $highscore_wtime->setChecked($this->
object->getHighscoreWTime());
 
  216            $highscore_wtime->setInfo(
$DIC->language()->txt(
"highscore_wtime_description"));
 
  217            $highscore->addSubItem($highscore_wtime);
 
  219            $item->addSubItem($highscore);
 
  243            if (!strlen($this->
object->getProvider()->getXapiActivityId())) {
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
setCustomLaunchSecret(string $customLaunchSecret)
 
const HIGHSCORE_SHOW_TOP_TABLE
 
getHighscoreEnabled()
Gets the setting which determines if the highscore feature is enabled.
 
setHighscoreMode(int $mode)
 
setHighscorePercentage(bool $a_percentage)
Sets if the percentages of the scores pass should be shown.
 
setCustomParams(string $customParams)
 
setHighscoreEnabled(bool $a_enabled)
HIGHSCORE.
 
const LAUNCH_METHOD_EMBEDDED
 
setHighscoreAchievedTS(bool $a_achieved_ts)
Sets if the date and time of the scores achievement should be displayed.
 
setLaunchMethod(string $launchMethod)
 
const HIGHSCORE_SHOW_OWN_TABLE
 
const LAUNCH_METHOD_NEW_WIN
 
setStatementsReportEnabled(bool $statementsReportEnabled)
 
setMasteryScorePercent(float $mastery_score_percent)
 
const HIGHSCORE_SHOW_ALL_TABLES
 
setHighscoreTopNum(int $a_top_num)
Sets the number of entries which are to be shown in the top-rankings table.
 
setHighscoreWTime(bool $a_wtime)
Sets if the workingtime of the scores should be shown.
 
setCustomLaunchKey(string $customLaunchKey)
 
setCustomActivityId(string $custom_activity_id)
 
const LAUNCH_METHOD_OWN_WIN
 
setUseXapi(bool $use_xapi)
 
setOfflineStatus(bool $status)
 
setDescription(string $desc)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
This class represents a text area property in a property form.
 
This class represents a text property in a property form.
 
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc