diff --git a/main/inc/ajax/myspace.ajax.php b/main/inc/ajax/myspace.ajax.php
index c7ea4e4565..8fe04d410f 100644
--- a/main/inc/ajax/myspace.ajax.php
+++ b/main/inc/ajax/myspace.ajax.php
@@ -3,6 +3,9 @@
/**
* Responses to AJAX calls
*/
+
+$language_file = array ('tracking');
+
require_once '../global.inc.php';
$action = $_GET['a'];
@@ -11,7 +14,7 @@ require_once api_get_path(SYS_CODE_PATH).'mySpace/myspace.lib.php';
switch ($action) {
case 'access_detail':
- $user_id = Security::remove_XSS($_REQUEST['student']);
+ $user_id = intval($_REQUEST['student']);
$course_code = Security::remove_XSS($_REQUEST['course']);
$type = Security::remove_XSS($_REQUEST['type']);
$range = Security::remove_XSS($_REQUEST['range']);
@@ -48,9 +51,9 @@ switch ($action) {
$db['stats'] = $foo_stats;
$db['graph_result'] = grapher($sql_result, $start_date, $end_date);
} else {
- $db['result'] = '
No se encontro información habilitada del usuario
';
- $db['graph_result'] = ' No se encontro información habilitada del usuario
';
- $db['stats'] = ' No se encontro información registrada para este rango
';
+ $db['result'] = Display::return_message(get_lang('NoDataAvailable'), 'warning');
+ $db['graph_result'] = Display::return_message(get_lang('NoDataAvailable'), 'warning');
+ $db['stats'] = Display::return_message(get_lang('NoDataAvailable'), 'warning');
}
header('Cache-Control: no-cache');
echo json_encode($db); // requires: PHP >= 5.2.0, PECL json >= 1.2.0
diff --git a/main/mySpace/access_details.php b/main/mySpace/access_details.php
index 28a2be4164..753605c180 100755
--- a/main/mySpace/access_details.php
+++ b/main/mySpace/access_details.php
@@ -9,6 +9,7 @@
* @param integer $user_id the user id
* @param string $course_code the course code
* @author Julio Montoya
+* @author Jorge Frisancho Jibaja - select between dates
*
*/
@@ -30,6 +31,7 @@ $this_section = SECTION_TRACKING;
/* MAIN */
$user_id = intval($_REQUEST['student']);
$session_id = intval($_GET['id_session']);
+$type = Security::remove_XSS($_REQUEST['type']);
$course_code = Security::remove_XSS($_REQUEST['course']);
$connections = MySpace::get_connections_to_course($user_id, $course_code, $session_id);
@@ -173,14 +175,14 @@ api_display_tool_title(get_lang('DetailsStudentInCourse'));
?>
@@ -188,7 +190,7 @@ api_display_tool_title(get_lang('DetailsStudentInCourse'));
-
+
'.get_lang('Average').': '.$rst['avg'].'
';
$foo_stats .= '
'.get_lang('Quantity').' : '.$rst['times'].'
';
echo $foo_stats;
+ } else {
+ echo Display::display_warning_message(get_lang('NoDataAvailable'));
}
- else{
- echo ('
No se encontro información habilitada del usuario
');
- }?>
+ ?>
@@ -220,8 +222,9 @@ api_display_tool_title(get_lang('DetailsStudentInCourse'));
if ($result_to_print != "") {
echo $result_to_print;
} else {
- echo (' No se encontro información habilitada del usuario
');
- }?>
+ Display::display_warning_message(get_lang('NoDataAvailable'));
+ }
+ ?>
-
GetData();
- if ($cache->IsInCache($graph_id, $data_set->GetData())) {
- //if (0) {
+ //if ($cache->IsInCache($graph_id, $data_set->GetData())) {
+ if (0) {
//if we already created the img
// echo 'in cache';
$img_file = $cache->GetHash($graph_id, $data_set->GetData());
@@ -2058,9 +2058,8 @@ function grapher($sql_result, $start_date, $end_date, $type = "") {
// Finish the graph
$test->setFontProperties(api_get_path(LIBRARY_PATH).'pchart/fonts/tahoma.ttf', 8);
-
- $test->setFontProperties(api_get_path(LIBRARY_PATH).'pchart/fonts/tahoma.ttf', 10);
- $test->drawTitle(60, 22, get_lang('AccessDetails', ''), 50, 50, 50, 585);
+ $test->setFontProperties(api_get_path(LIBRARY_PATH).'pchart/fonts/tahoma.ttf', 10);
+ $test->drawTitle(60, 22, get_lang('AccessDetails'), 50, 50, 50, 585);
//------------------
//echo 'not in cache';