diff --git a/main/exercice/exercise.class.php b/main/exercice/exercise.class.php
index b4eb3c7825..1c9b30af19 100644
--- a/main/exercice/exercise.class.php
+++ b/main/exercice/exercise.class.php
@@ -819,7 +819,8 @@ class Exercise {
');
// Random questions
- $form->addElement('html','
');
+ // style="" and not "display:none" to avoid #4029 Random and number of attempt menu empty
+ $form->addElement('html','
');
if ($type=='full') {
@@ -932,9 +933,10 @@ class Exercise {
//Attempts
$attempt_option=range(0,10);
$attempt_option[0]=get_lang('Infinite');
-
+
$form->addElement('select', 'exerciseAttempts',get_lang('ExerciseAttempts'),$attempt_option, array('id'=>'exerciseAttempts','class'=>'chzn-select'));
-
+
+ // Exercice time limit
$form->addElement('checkbox', 'activate_start_date_check',get_lang('EnableStartTime'),null, array('onclick' => 'activate_start_date()'));
$var = Exercise::selectTimeLimit();
diff --git a/main/exercice/exercise_admin.php b/main/exercice/exercise_admin.php
index e3b1691835..56bd4951e4 100644
--- a/main/exercice/exercise_admin.php
+++ b/main/exercice/exercise_admin.php
@@ -127,16 +127,17 @@ $htmlHeadXtra[] = '';
+ // to correct #4029 Random and number of attempt menu empty added window.onload=advanced_parameters;
$htmlHeadXtra[] = '';
// INIT EXERCISE