From 1eb829a13c89ee5f5cc89d834760b2228d467a86 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Mon, 31 May 2010 17:33:16 +0200 Subject: [PATCH 1/3] Fixing question pool pagination + changing with nice icons --- main/exercice/question_pool.php | 67 ++++++++++++++++----------------- 1 file changed, 32 insertions(+), 35 deletions(-) diff --git a/main/exercice/question_pool.php b/main/exercice/question_pool.php index e494a702e1..215a0b862c 100755 --- a/main/exercice/question_pool.php +++ b/main/exercice/question_pool.php @@ -40,11 +40,12 @@ if(isset($_GET['exerciseId'])){ $exerciseId = intval($_GET['exerciseId']); } if(isset($_GET['exerciseLevel'])){ - $exerciseLevel = intval($_GET['exerciseLevel']); + $exerciseLevel = intval($_REQUEST['exerciseLevel']); } if(isset($_GET['answerType'])){ - $answerType = intval($_GET['answerType']); + $answerType = intval($_REQUEST['answerType']); } +$page = 0; if(!empty($_GET['page'])){ $page = intval($_GET['page']); } @@ -136,8 +137,7 @@ if($is_allowedToEdit) { // destruction of the Question object unset($objQuestionTmp); - if(!$objExcercise instanceOf Exercise) - { + if(!$objExcercise instanceOf Exercise) { $objExercise = new Exercise(); $objExercise->read($fromExercise); } @@ -176,7 +176,7 @@ if (isset($_SESSION['gradebook'])){ if (!empty($gradebook) && $gradebook=='view') { $interbreadcrumb[]= array ( - 'url' => '../gradebook/'.$_SESSION['gradebook_dest'], + 'url' => '../gradebook/'.Security::remove_XSS($_SESSION['gradebook_dest']), 'name' => get_lang('ToolGradebook') ); } @@ -186,35 +186,25 @@ $nameTools=get_lang('QuestionPool'); $interbreadcrumb[]=array("url" => "exercice.php","name" => get_lang('Exercices')); // if admin of course -if($is_allowedToEdit) -{ - Display::display_header($nameTools,"Exercise"); -?> - -

- -
- - '.$nameTools.''; + echo '
'; if (isset($type)) { $url = api_get_self().'?type=1'; } else { $url = api_get_self(); } - ?> - -
- '; + if (isset($type)) { echo ''; } + echo ''; + echo get_lang('Exercice').' :'; + echo ' - - : -