From 78e91ea709be4af3bc0c45c93149a232f8efc7d3 Mon Sep 17 00:00:00 2001 From: Ivan Tcholakov Date: Mon, 11 May 2009 12:02:06 +0200 Subject: [PATCH] [svn r20472] FS#306 - The tracking tool (obsolete?): Improvements for better encoding support. --- main/tracking/courseLog.php | 4 ++-- main/tracking/courseLogCSV.php | 6 +++--- main/tracking/personnalLog.php | 2 +- main/tracking/toolaccess_details.php | 8 ++++---- main/tracking/userLog.php | 10 +++++----- main/tracking/userlogCSV.php | 6 +++--- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/main/tracking/courseLog.php b/main/tracking/courseLog.php index acdf796115..a8d658697c 100644 --- a/main/tracking/courseLog.php +++ b/main/tracking/courseLog.php @@ -125,8 +125,8 @@ function count_student_in_course() { function sort_users($a,$b) { - $a = trim(strtolower($a[$_SESSION['tracking_column']])); - $b = trim(strtolower($b[$_SESSION['tracking_column']])); + $a = trim(api_strtolower($a[$_SESSION['tracking_column']])); + $b = trim(api_strtolower($b[$_SESSION['tracking_column']])); if ($_SESSION['tracking_direction'] == 'DESC') { return strcmp($b, $a); } else { diff --git a/main/tracking/courseLogCSV.php b/main/tracking/courseLogCSV.php index a537bbb07f..3a7ae655f5 100644 --- a/main/tracking/courseLogCSV.php +++ b/main/tracking/courseLogCSV.php @@ -485,7 +485,7 @@ if($is_allowedToTrack && $_configuration['tracking_enabled']) while ($ar3['status'] != '') { require_once('../newscorm/learnpathItem.class.php'); $time = learnpathItem::get_scorm_time('php',$ar3['total_time']); - $title = htmlentities($ar3['title'],ENT_QUOTES,$lp_charset); + $title = api_htmlentities($ar3['title'],ENT_QUOTES,$lp_charset); $line .= $title.";".$ar3['status'].";".$ar3['score'].";".$time; $ar3=Database::fetch_array($result3); } @@ -538,8 +538,8 @@ if($is_allowedToTrack && $_configuration['tracking_enabled']) header('Content-Description: '.$filename); header('Content-transfer-encoding: binary'); - echo html_entity_decode($title_line); - echo html_entity_decode($line); + echo api_html_entity_decode($title_line, ENT_COMPAT, $charset); + echo api_html_entity_decode($line, ENT_COMPAT, $charset); exit; diff --git a/main/tracking/personnalLog.php b/main/tracking/personnalLog.php index 06cbad542f..cface73d19 100644 --- a/main/tracking/personnalLog.php +++ b/main/tracking/personnalLog.php @@ -309,4 +309,4 @@ else } Display::display_footer(); -?> \ No newline at end of file +?> diff --git a/main/tracking/toolaccess_details.php b/main/tracking/toolaccess_details.php index f5ca56dc47..a14f305d38 100644 --- a/main/tracking/toolaccess_details.php +++ b/main/tracking/toolaccess_details.php @@ -1,4 +1,4 @@ - "; if(isset($_cid)) echo "$_cid : "; - echo " $langToolList + echo " ".get_lang('ToolList')." "; @@ -151,7 +151,7 @@ $reqdate=$_REQUEST['reqdate']; else { echo ""; - echo "
".$langNoResult."
"; + echo "
".get_lang('NoResult')."
"; echo""; } echo ""; @@ -306,4 +306,4 @@ $reqdate=$_REQUEST['reqdate']; \ No newline at end of file +?> diff --git a/main/tracking/userLog.php b/main/tracking/userLog.php index efcc5f4597..db6e74d76e 100644 --- a/main/tracking/userLog.php +++ b/main/tracking/userLog.php @@ -1,4 +1,4 @@ -"../group/group_space.php?gidReq=$_gid", "name */ if(isset($uInfo)) { - $interbreadcrumb[]= array ('url'=>'../user/userInfo.php?uInfo='.Security::remove_XSS($uInfo), "name"=> ucfirst(get_lang('Users'))); + $interbreadcrumb[]= array ('url'=>'../user/userInfo.php?uInfo='.Security::remove_XSS($uInfo), "name"=> api_ucfirst(get_lang('Users'))); } $nameTools = get_lang('ToolName'); @@ -188,7 +188,7 @@ $is_allowedToTrackEverybodyInCourse = $is_allowedToTrack; // allowed to track al */ function myEnc($isostring,$supposed_encoding='ISO-8859-15') { - return htmlentities($isostring,ENT_QUOTES,$supposed_encoding); + return api_htmlentities($isostring,ENT_QUOTES,$supposed_encoding); } /** @@ -781,7 +781,7 @@ if( ( $is_allowedToTrack || $is_allowedToTrackEverybodyInCourse ) && $_configura while ($ar3['status'] != '') { require_once('../newscorm/learnpathItem.class.php'); $time = learnpathItem::get_scorm_time('php',$ar3['total_time']); - $title = htmlentities($ar3['title'],ENT_QUOTES,$lp_charset); + $title = api_htmlentities($ar3['title'],ENT_QUOTES,$lp_charset); echo "   "; echo "$title{$ar3['status']}{$ar3['score']}$time"; echo ""; @@ -831,4 +831,4 @@ if( ( $is_allowedToTrack || $is_allowedToTrackEverybodyInCourse ) && $_configura \ No newline at end of file +?> diff --git a/main/tracking/userlogCSV.php b/main/tracking/userlogCSV.php index a9b9794c67..78dfd8981e 100644 --- a/main/tracking/userlogCSV.php +++ b/main/tracking/userlogCSV.php @@ -179,7 +179,7 @@ $is_allowedToTrackEverybodyInCourse = $is_allowedToTrack; // allowed to track al */ function myEnc($isostring,$supposed_encoding='ISO-8859-15') { - return htmlentities($isostring,ENT_QUOTES,$supposed_encoding); + return api_htmlentities($isostring,ENT_QUOTES,$supposed_encoding); } /** @@ -686,8 +686,8 @@ if( ( $is_allowedToTrack || $is_allowedToTrackEverybodyInCourse ) && $_configura header('Content-Description: '.$filename); header('Content-transfer-encoding: binary'); - echo html_entity_decode($title_line); - echo html_entity_decode($line); + echo api_html_entity_decode($title_line, ENT_QUOTES, $charset); + echo api_html_entity_decode($line, ENT_QUOTES, $charset); exit;