[svn r11833] Fix display bugs and other minor bugs in the reporting (FS 1386-1387-1388)

skala
Julian Prud'homme 18 years ago
parent c8e0e89a0e
commit 6c8aa260f8
  1. 6
      main/auth/profile.php
  2. 26
      main/mySpace/index.php
  3. 30
      main/mySpace/myStudents.php
  4. 15
      main/mySpace/student.php
  5. 2
      main/tracking/courseLog.php

@ -1,5 +1,5 @@
<?php
// $Id: profile.php 11570 2007-03-14 13:03:17Z elixir_julian $
// $Id: profile.php 11833 2007-04-02 15:05:02Z elixir_julian $
/*
==============================================================================
Dokeos - elearning and course management software
@ -607,9 +607,5 @@ echo '<img '.$img_attributes.'/>';
$form->display();
echo '<div id="myprofilefooter">
<a href="'.api_get_path(WEB_CODE_PATH).'tracking/personnalLog.php">'.get_lang('MyStats').'</a>
| <a href="'.api_get_path(WEB_CODE_PATH).'auth/courses.php">'.get_lang('MyCourses').'</a></div>';
Display :: display_footer();
?>

@ -126,7 +126,7 @@ if($isCoach)
$avgResultsToExercises = $avgResultsToExercises/$nbStudents;
// average courses by student
$avgCoursesPerStudent = round($totalCourses / $nbStudents,1);
$avgCoursesPerStudent = round($totalCourses / $nbStudents,2);
// average time spent on the platform
$avgTimeSpent = $totalTimeSpent / $nbStudents;
@ -190,7 +190,7 @@ if($isCoach)
'.get_lang('AverageProgressInLearnpath').'
</td>
<td align="right">
'.round($avgTotalProgress,1).' %
'.round($avgTotalProgress,2).' %
</td>
</tr>
<tr>
@ -198,7 +198,7 @@ if($isCoach)
'.get_lang('AverageResultsToTheExercices').'
</td>
<td align="right">
'.round($avgResultsToExercises,1).' %
'.round($avgResultsToExercises,2).' %
</td>
</tr>
<tr>
@ -206,7 +206,7 @@ if($isCoach)
'.get_lang('AveragePostsInForum').'
</td>
<td align="right">
'.round($nb_posts,1).'
'.round($nb_posts,2).'
</td>
</tr>
<tr>
@ -214,7 +214,7 @@ if($isCoach)
'.get_lang('AverageAssignments').'
</td>
<td align="right">
'.round($nb_assignments,1).'
'.round($nb_assignments,2).'
</td>
</tr>
</table>
@ -257,7 +257,7 @@ if($isCoach)
}
$a_courses = array_merge($a_courses, Tracking::get_courses_list_from_session($a_session['id']));
}
$nb_courses_per_session = round(count($a_courses)/$nbSessions,1);
$nb_courses_per_session = round(count($a_courses)/$nbSessions,2);
//csv part
@ -267,7 +267,7 @@ if($isCoach)
$csv_content[] = array( get_lang('NbActiveSessions').';'.$nb_sessions_current);
$csv_content[] = array( get_lang('NbPastSessions').';'.$nb_sessions_past);
$csv_content[] = array( get_lang('NbFutureSessions').';'.$nb_sessions_future);
$csv_content[] = array( get_lang('NbStudentPerSession').';'.round($nbStudents/$nbSessions,1));
$csv_content[] = array( get_lang('NbStudentPerSession').';'.round($nbStudents/$nbSessions,2));
$csv_content[] = array( get_lang('NbCoursesPerSession').';'.$nb_courses_per_session);
$csv_content[] = array();
}
@ -310,7 +310,7 @@ if($isCoach)
'.get_lang('NbStudentPerSession').'
</td>
<td align="right">
'.round($nbStudents/$nbSessions,1).'
'.round($nbStudents/$nbSessions,2).'
</td>
</tr>
<tr>
@ -417,10 +417,10 @@ if($nb_teacher_courses)
if($nb_students_in_course>0)
{
$avg_time_spent_in_course = api_time_to_hms($avg_time_spent_in_course / $nb_students_in_course);
$avg_progress_in_course = round($avg_progress_in_course / $nb_students_in_course,1).' %';
$avg_score_in_course = round($avg_score_in_course / $nb_students_in_course,1).' %';
$avg_messages_in_course = round($avg_messages_in_course / $nb_students_in_course,1);
$avg_assignments_in_course = round($avg_assignments_in_course / $nb_students_in_course,1);
$avg_progress_in_course = round($avg_progress_in_course / $nb_students_in_course,2).' %';
$avg_score_in_course = round($avg_score_in_course / $nb_students_in_course,2).' %';
$avg_messages_in_course = round($avg_messages_in_course / $nb_students_in_course,2);
$avg_assignments_in_course = round($avg_assignments_in_course / $nb_students_in_course,2);
}
$table_row = array();
@ -443,7 +443,7 @@ if($nb_teacher_courses)
$avg_assignments_in_course,
);
$table -> addRow($table_row, 'align="right"');
$table -> addRow($table_row, 'align="left"');
}
$table -> setColAttributes(7,array('align'=>'center'));

@ -184,9 +184,12 @@ if(!empty($_GET['student']))
$avg_student_score += Tracking :: get_avg_student_score($a_infosUser['user_id'],$course_code);
}
}
$avg_student_progress = round($avg_student_progress / $nb_courses,1);
$avg_student_score = round($avg_student_score / $nb_courses,1);
$avg_student_progress = round($avg_student_progress / $nb_courses,2);
$avg_student_score = round($avg_student_score / $nb_courses,2);
$last_connection_date = Tracking::get_last_connection_date($a_infosUser['user_id']);
if($last_connection_date==''){
$last_connection_date=get_lang('NoConnexion');
}
$time_spent_on_the_platform = api_time_to_hms(Tracking::get_time_spent_on_the_platform($a_infosUser['user_id']));
// cvs informations
@ -294,34 +297,34 @@ if(!empty($_GET['student']))
<td>
<table>
<tr>
<td class="none">
<td class="none" align="right">
<?php echo get_lang('LatestLogin') ?>
</td>
<td class="none">
<td class="none" align="left">
<?php echo $last_connection_date ?>
</td>
</tr>
<tr>
<td class="none">
<td class="none" align="right">
<?php echo get_lang('TimeSpentOnThePlatform') ?>
</td>
<td class="none">
<td class="none" align="left">
<?php echo $time_spent_on_the_platform ?>
</td>
</tr>
<tr>
<td class="none">
<td class="none" align="right">
<?php echo get_lang('Progress') ?>
</td>
<td class="none">
<td class="none" align="left">
<?php echo $avg_student_progress.' %' ?>
</td>
</tr>
<tr>
<td class="none">
<td class="none" align="right">
<?php echo get_lang('Score') ?>
</td>
<td class="none">
<td class="none" align="left">
<?php echo $avg_student_score.' %' ?>
</td>
</tr>
@ -381,7 +384,7 @@ if(!empty($_GET['student']))
$a_date_end = explode('-',$a_infosCours['date_end']);
$date_end = $a_date_end[2].'/'.$a_date_end[1].'/'.$a_date_end[0];
$dateSession = get_lang('From').' '.$date_start.' '.get_lang('To').' '.$date_end;
$tableTitle = $a_infosCours['title'].'&nbsp; | &nbsp;'.get_lang('Tutor').' : '.$a_infosCours['tutor_name'];
$tableTitle = $a_infosCours['title'].'&nbsp; | &nbsp;'.get_lang('Tutor').' : '.stripslashes($a_infosCours['tutor_name']);
$csv_content[] = array();
$csv_content[] = array($tableTitle);
@ -478,7 +481,7 @@ if(!empty($_GET['student']))
<?php echo $progress ?>
</td>
<td align="center">
<?php echo date('Y-m-d',$start_time) ?>
<?php if($start_time!='') echo date('Y-m-d',$start_time); else echo '-'; ?>
</td>
<td align="center">
<?php
@ -547,7 +550,8 @@ if(!empty($_GET['student']))
$sqlEssais = " SELECT COUNT(ex.exe_id) as essais
FROM $tbl_stats_exercices AS ex
WHERE ex.exe_cours_id = '".$a_infosCours['code']."'
AND ex.exe_exo_id = ".$a_exercices['id']
AND ex.exe_exo_id = ".$a_exercices['id']."
AND exe_user_id='".$_GET["student"]."'"
;
$resultEssais = api_sql_query($sqlEssais);
$a_essais = mysql_fetch_array($resultEssais);

@ -100,7 +100,7 @@ if($isCoach)
$table -> set_header(4, get_lang('Score'),false);
$table -> set_header(5, get_lang('Student_publication'),false);
$table -> set_header(6, get_lang('Messages'),false);
$table -> set_header(7, get_lang('LatestLogin'),false);
$table -> set_header(7, get_lang('LatestLogin'));
$table -> set_header(8, get_lang('Details'),false);
if($export_csv)
@ -148,7 +148,18 @@ if($isCoach)
$row[] = $avg_student_score.' %';
$row[] = $total_assignments;
$row[] = $total_messages;
$row[] = Tracking :: get_last_connection_date($student_id);
$string_date=Tracking :: get_last_connection_date($student_id);
$timestamp=strtotime($string_date);
$currentTimestamp=mktime();
//If the last connection is > than 7 days, the text is red
if($currentTimestamp-$timestamp>345600){
$row[] = '<span style="color: #F00;">'.$string_date.'</span>';
}
else{
$row[] = $string_date;
}
if($export_csv)
{

@ -472,7 +472,7 @@ else {
$table -> set_header(4, get_lang('Score'),false);
$table -> set_header(5, get_lang('Student_publication'),false);
$table -> set_header(6, get_lang('Messages'),false);
$table -> set_header(7, get_lang('LatestLogin'),false);
$table -> set_header(7, get_lang('LatestLogin'));
$table -> set_header(8, get_lang('Details'),false);
if($export_csv)

Loading…
Cancel
Save