Skip to content
Permalink
Browse files

New setting added "exercises_disable_new_attempts" see BT#15091

Disable all new exercise attempts in all the platform
  • Loading branch information...
jmontoyaa committed Nov 29, 2018
1 parent 2001098 commit ed38dc279e11ee4b030fee241d49e60226dc2bc5
Showing with 15 additions and 1 deletion.
  1. +5 −0 main/exercise/exercise_submit.php
  2. +7 −1 main/exercise/overview.php
  3. +3 −0 main/install/configuration.dist.php
@@ -331,6 +331,11 @@
Session::write('question_list_uncompressed', $questionListUncompressed);
$clock_expired_time = null;
if (empty($exercise_stat_info)) {
$disable = api_get_configuration_value('exercises_disable_new_attempts');
if ($disable) {
api_not_allowed(true);
}
if ($debug) {
error_log('5 $exercise_stat_info is empty ');
}
@@ -106,7 +106,7 @@
);
}
//Exercise description
// Exercise description
if (!empty($objExercise->description)) {
$html .= Display::div($objExercise->description, ['class' => 'exercise_description']);
}
@@ -345,6 +345,12 @@
$html .= $message;
$disable = api_get_configuration_value('exercises_disable_new_attempts');
if ($disable && empty($exercise_stat_info)) {
$exercise_url_button = Display::return_message(get_lang('NewExerciseAttemptDisabled'));
}
if (!empty($exercise_url_button)) {
$html .= Display::div(
Display::div(
@@ -1032,6 +1032,9 @@
]
];*/
// Disable all new exercise attempts in all the platform
// $_configuration['exercises_disable_new_attempts'] = false;
// ------ Custom DB changes (keep this at the end)
// Add user activation by confirmation email
// This option prevents the new user to login in the platform if your account is not confirmed via email

0 comments on commit ed38dc2

Please sign in to comment.
You can’t perform that action at this time.