Skip to content

Commit

Permalink
Admin: Add configuration setting quiz_show_description_on_results_pag…
Browse files Browse the repository at this point in the history
…e to control whether the test description is shown on the results page or not - refs BT#11784
  • Loading branch information
ywarnier committed Jan 27, 2019
1 parent f4653e5 commit a7fbce4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion main/inc/lib/exercise.lib.php
Expand Up @@ -4785,7 +4785,9 @@ public static function displayQuestionListByAttempt(
echo $totalScoreText;

// Ofaj change BT#11784
if (!empty($objExercise->description)) {
if (api_get_configuration_value('quiz_show_description_on_results_page')
&& (!empty($objExercise->description)))
{
echo Display::div($objExercise->description, ['class' => 'exercise_description']);
}

Expand Down
2 changes: 2 additions & 0 deletions main/install/configuration.dist.php
Expand Up @@ -559,6 +559,8 @@
//$_configuration["allow_teacher_comment_audio"] = false;
// Block copy/paste/save/print keys and right-clicks in exercises
//$_configuration['quiz_prevent_copy_paste'] = false;
// Always show the test description on the results page of the test
//$_configuration['quiz_show_description_on_results_page'] = false;

// Hide search form in session list
//$_configuration['hide_search_form_in_session_list'] = false;
Expand Down

1 comment on commit a7fbce4

@jmontoyaa
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be added in master, as a new setting (in the database)

Please sign in to comment.