[svn r20463] FS#306 - The reporting module: Improvements for better encoding support.

skala
Ivan Tcholakov 16 years ago
parent 9b0bffbf6a
commit 8e32a72e5b
  1. 2
      main/mySpace/access_details.php
  2. 12
      main/mySpace/index.php
  3. 2
      main/mySpace/lp_tracking.php
  4. 4
      main/mySpace/myStudents.php
  5. 10
      main/mySpace/user_import.php

@ -186,7 +186,7 @@ if (api_is_xml_http_request()) {
$DataSet->AddAllSeries(); $DataSet->AddAllSeries();
$DataSet->RemoveSerie('Date'); $DataSet->RemoveSerie('Date');
$DataSet->SetAbsciseLabelSerie('Date'); $DataSet->SetAbsciseLabelSerie('Date');
$DataSet->SetYAxisName(ucfirst(get_lang('MinMinutes'))); $DataSet->SetYAxisName(api_ucfirst(get_lang('MinMinutes')));
$graph_id = api_get_user_id().'AccessDetails'.api_get_course_id(); $graph_id = api_get_user_id().'AccessDetails'.api_get_course_id();
$DataSet->AddAllSeries(); $DataSet->AddAllSeries();

@ -86,8 +86,8 @@ function count_coaches()
} }
function sort_users($a,$b){ function sort_users($a,$b){
$a = trim(strtolower($a[$_SESSION['tracking_column']])); $a = trim(api_strtolower($a[$_SESSION['tracking_column']]));
$b = trim(strtolower($b[$_SESSION['tracking_column']])); $b = trim(api_strtolower($b[$_SESSION['tracking_column']]));
if($_SESSION['tracking_direction'] == 'DESC') if($_SESSION['tracking_direction'] == 'DESC')
return strcmp($b, $a); return strcmp($b, $a);
else else
@ -206,7 +206,7 @@ if($nb_menu_items>1)
} }
} }
echo ' echo '
<a href="#" onclick="window.print()"><img align="absbottom" src="../img/printmgr.gif">&nbsp;'.get_lang('Print').'</a> <a href="javascript: void(0);" onclick="javascript: window.print()"><img align="absbottom" src="../img/printmgr.gif">&nbsp;'.get_lang('Print').'</a>
<a href="'.api_get_self().'?export=csv&view='.$view.'"><img align="absbottom" src="../img/excel.gif">&nbsp;'.get_lang('ExportAsCSV').'</a> <a href="'.api_get_self().'?export=csv&view='.$view.'"><img align="absbottom" src="../img/excel.gif">&nbsp;'.get_lang('ExportAsCSV').'</a>
'; ';
echo '</div>'; echo '</div>';
@ -609,7 +609,7 @@ if(api_is_allowed_to_create_course() && $view=='teacher')
$table_row[] = '<center><a href="../tracking/courseLog.php?cidReq='.$course_code.'&studentlist=true"><img src="'.api_get_path(WEB_IMG_PATH).'2rightarrow.gif" border="0" /></a></center>'; $table_row[] = '<center><a href="../tracking/courseLog.php?cidReq='.$course_code.'&studentlist=true"><img src="'.api_get_path(WEB_IMG_PATH).'2rightarrow.gif" border="0" /></a></center>';
$csv_content[] = array( $csv_content[] = array(
html_entity_decode($course['title']), api_html_entity_decode($course['title'], ENT_QUOTES, $charset),
$nb_students_in_course, $nb_students_in_course,
$avg_time_spent_in_course, $avg_time_spent_in_course,
$avg_progress_in_course, $avg_progress_in_course,
@ -752,8 +752,8 @@ if(api_is_platform_admin() && $view=='admin')
$all_datas[] = $table_row; $all_datas[] = $table_row;
$csv_content[] = array( $csv_content[] = array(
html_entity_decode($a_coachs['firstname']), api_html_entity_decode($a_coachs['firstname'], ENT_QUOTES, $charset),
html_entity_decode($a_coachs['lastname']), api_html_entity_decode($a_coachs['lastname'], ENT_QUOTES, $charset),
$time_on_platform, $time_on_platform,
$last_connection, $last_connection,
$nb_courses, $nb_courses,

@ -162,7 +162,7 @@ if($export_csv) {
include_once('../newscorm/lp_stats.php'); include_once('../newscorm/lp_stats.php');
$tracking_content = ob_get_contents(); $tracking_content = ob_get_contents();
ob_end_clean(); ob_end_clean();
echo utf8_decode($tracking_content); echo api_utf8_decode($tracking_content, $charset);
} }
Display :: display_footer(); Display :: display_footer();
?> ?>

@ -1,4 +1,4 @@
<?php //$Id: myStudents.php 20396 2009-05-07 21:23:22Z cfasanando $ <?php //$Id: myStudents.php 20463 2009-05-11 07:27:07Z ivantcholakov $
/* For licensing terms, see /dokeos_license.txt */ /* For licensing terms, see /dokeos_license.txt */
/** /**
* Implements the tracking of students in the Reporting pages * Implements the tracking of students in the Reporting pages
@ -672,7 +672,7 @@ if(!empty($_GET['student']))
$i++; $i++;
$csv_content[] = array(html_entity_decode(stripslashes($a_learnpath['name']),ENT_QUOTES,$charset),api_time_to_hms($total_time),$score.'%',$progress,date('Y-m-d',$start_time)); $csv_content[] = array(api_html_entity_decode(stripslashes($a_learnpath['name']),ENT_QUOTES,$charset),api_time_to_hms($total_time),$score.'%',$progress,date('Y-m-d',$start_time));
?> ?>
<tr class="<?php echo $s_css_class;?>"> <tr class="<?php echo $s_css_class;?>">

@ -37,15 +37,15 @@ we give 2 variables to a possible sufix. Sufix means the last numbers of the use
function make_login($firstname,$lastname) function make_login($firstname,$lastname)
{ {
$desired_username=''; $desired_username='';
if (strlen($lastname)<17) if (api_strlen($lastname)<17)
{ {
$desired_username = substr($firstname,0,1).$lastname; $desired_username = api_substr($firstname,0,1).$lastname;
} }
else else
{ {
$desired_username = substr($firstname,0,1).substr($lastname,0,16); $desired_username = api_substr($firstname,0,1).substr($lastname,0,16);
} }
return strtolower($desired_username); return api_strtolower($desired_username);
} }
@ -275,7 +275,7 @@ function validate_data($users,$id_session)
} }
} }
// 2. check if the username is too long // 2. check if the username is too long
if (strlen($user['UserName']) > 20) if (api_strlen($user['UserName']) > 20)
{ {
$user['error'] = get_lang('UserNameTooLong'); $user['error'] = get_lang('UserNameTooLong');
$errors[] = $user; $errors[] = $user;

Loading…
Cancel
Save