From 85aed14238e2fb75da1e6ec95a4e0de14b23cb82 Mon Sep 17 00:00:00 2001
From: Julio Montoya <gugli100@gmail.com>
Date: Fri, 21 Jan 2011 18:47:14 +0100
Subject: [PATCH] Fixing sql query

---
 main/exercice/exercise.lib.php | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/main/exercice/exercise.lib.php b/main/exercice/exercise.lib.php
index 17b33ba7ab..89a87b5fda 100755
--- a/main/exercice/exercise.lib.php
+++ b/main/exercice/exercise.lib.php
@@ -751,7 +751,8 @@ function get_session_time_control_key($exercise_id) {
  * @todo this function should be moved in a library  + no global calls 
  */
 function get_count_exam_results($exercise_id = null) {
- global $is_allowedToEdit, $is_tutor,$_cid,$_user,$TBL_USER, $TBL_EXERCICES,$TBL_TRACK_EXERCICES, $TBL_TRACK_ATTEMPT_RECORDING,$filter_by_not_revised,$filter_by_revised,$documentPath;
+    //@todo replace all this globals
+    global $is_allowedToEdit, $is_tutor,$_cid,$_user,$TBL_USER, $TBL_EXERCICES,$TBL_TRACK_EXERCICES, $TBL_TRACK_HOTPOTATOES, $TBL_TRACK_ATTEMPT_RECORDING,$filter_by_not_revised,$filter_by_revised,$documentPath;
     $session_id_and = ' AND te.session_id = ' . api_get_session_id() . ' ';
     if ($is_allowedToEdit || $is_tutor) {
         $user_id_and = '';
@@ -832,8 +833,8 @@ function get_count_exam_results($exercise_id = null) {
  * @todo this function should be moved in a library  + no global calls 
  */
 function get_exam_results_data($from, $number_of_items, $column, $direction) {
-
-    global $is_allowedToEdit, $is_tutor,$_cid,$_user,$TBL_USER, $TBL_EXERCICES,$TBL_TRACK_EXERCICES, $TBL_TRACK_ATTEMPT_RECORDING,$filter_by_not_revised,$filter_by_revised,$documentPath,$filter;
+    //@todo replace all this globals
+    global $is_allowedToEdit, $is_tutor,$_cid,$_user,$TBL_USER, $TBL_EXERCICES,$TBL_TRACK_HOTPOTATOES, $TBL_TRACK_EXERCICES, $TBL_TRACK_ATTEMPT_RECORDING,$filter_by_not_revised,$filter_by_revised,$documentPath,$filter;
     $session_id_and = ' AND te.session_id = ' . api_get_session_id() . ' ';
     if ($is_allowedToEdit || $is_tutor) {
         $user_id_and = '';