Skip to content

Commit

Permalink
Admin: Exercise: Add configuration setting 'quiz_question_description…
Browse files Browse the repository at this point in the history
…_open_by_default' to open the description for the quiz by default during the test (#5347)

Author: Juan Cortizas Ponte <124381395+juancpbinario@users.noreply.github.com>
  • Loading branch information
juancp-contidosdixitais committed Apr 19, 2024
1 parent 57545c6 commit 4728002
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main/exercise/exercise_submit.php
Original file line number Diff line number Diff line change
Expand Up @@ -1728,6 +1728,8 @@ function validate_all() {
$remind_highlight = ' remind_highlight ';
}

$openDescription = api_get_configuration_value('quiz_question_description_open_by_default') ? true : false;

// Showing the exercise description
if (!empty($objExercise->description)) {
if ($objExercise->type == ONE_PER_PAGE || ($objExercise->type != ONE_PER_PAGE && $i == 1)) {
Expand All @@ -1738,7 +1740,7 @@ function validate_all() {
[],
'description',
'exercise-collapse',
false,
$openDescription,
true
);
}
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 @@ -746,6 +746,8 @@
// If questions are reused between courses only deletes the non-reused questions
// or reused questions where the quiz has the lowest iid value from c_quiz_rel_question
// $_configuration['quiz_question_delete_automatically_when_deleting_exercise'] = false;
// Opens the quiz question description by default
//$_configuration['quiz_question_description_open_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 4728002

Please sign in to comment.