Skip to content

Commit

Permalink
Admin: Add configuration setting 'quiz_question_edit_open_advanced_pa…
Browse files Browse the repository at this point in the history
…rams_by_default' to show questions advanced settings by default - refs #4242
  • Loading branch information
ywarnier committed Oct 13, 2024
1 parent 69a6625 commit 5e9f2f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main/exercise/question.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1791,7 +1791,9 @@ public function createForm(&$form, $exercise)
}

$form->addButtonAdvancedSettings('advanced_params');
$form->addHtml('<div id="advanced_params_options" style="display:none">');

$displayAdvancedParamsOptions = api_get_configuration_value('quiz_question_edit_open_advanced_params_by_default') ? 'block' : 'none';
$form->addHtml('<div id="advanced_params_options" style="display:'.$displayAdvancedParamsOptions.'">');

if (isset($zoomOptions['options'])) {
$form->addElement('text', 'imageZoom', get_lang('ImageURL'));
Expand Down
2 changes: 2 additions & 0 deletions main/install/configuration.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,8 @@
// $_configuration['quiz_question_delete_automatically_when_deleting_exercise'] = false;
// Opens the quiz question description by default
//$_configuration['quiz_question_description_open_by_default'] = false;
// Opens advanced parameters options by default when creating or editing quiz questions
//$_configuration['quiz_question_edit_open_advanced_params_by_default'] = false;
// Define how many seconds an AJAX request should be started to avoid loss of connection.
//$_configuration['quiz_keep_alive_ping_interval'] = 0;
// Hide search form in session list
Expand Down

0 comments on commit 5e9f2f0

Please sign in to comment.