diff --git a/main/exercice/question_pool.php b/main/exercice/question_pool.php index 99ab8c8b0f..e494a702e1 100755 --- a/main/exercice/question_pool.php +++ b/main/exercice/question_pool.php @@ -385,7 +385,7 @@ if($is_allowedToEdit) //echo $sql; $exerciseId=0; } - + $result=Database::query($sql); $nbrQuestions=Database::num_rows($result); @@ -398,9 +398,9 @@ if($is_allowedToEdit) ''; if(!empty($page)) { - echo '<< ',get_lang('PreviousPage'),' | '; + echo '<< ',get_lang('PreviousPage'),' | '; } elseif($nbrQuestions > $limitQuestPage) { - echo '<< ',get_lang('PreviousPage'),' | '; + echo '<< ',get_lang('PreviousPage'),' | '; } if($nbrQuestions > $limitQuestPage) { @@ -416,8 +416,10 @@ if($is_allowedToEdit) '; if(!empty($fromExercise)) { - echo ' ', - '',get_lang('Question'),'', + if (api_get_session_id() == 0 ){ + echo ' '; + } + echo '',get_lang('Question'),'', '',get_lang('Level'),'', '',get_lang('Reuse'),''; } else { @@ -427,11 +429,10 @@ if($is_allowedToEdit) } echo ''; $i=1; - echo '
';
 
-	echo '
'; $session_id = api_get_session_id(); while ($row = Database::fetch_array($result)) { + // if we come from the exercise administration to get a question, // don't show the questions already used by that exercise @@ -445,7 +446,9 @@ if($is_allowedToEdit) //if (!$fromExercise || !isset($objExercise) || !($objExercise instanceOf Exercise) || (!$objExercise->isInList($row['id']))) if (!$fromExercise || !isset($objExercise) || !($objExercise instanceOf Exercise) || (is_array($objExercise->questionList)) ) { echo ''; - echo ' '; + if (api_get_session_id() == 0 ){ + echo ' '; + } echo ' ',$row['question'],''; echo ' '; if (empty($fromExercise)) { @@ -484,9 +487,12 @@ if($is_allowedToEdit) ''; } echo ''; - echo '
- -
'; + + if (api_get_session_id() == 0 ){ + echo '
+ +
'; + } Display::display_footer(); } else { // if not admin of course