[svn r11409] improves reporting (there is now a teacher interface)

skala
Eric Marguin 19 years ago
parent ca9b772738
commit d38dd43c4a
  1. 384
      main/mySpace/index.php
  2. 23
      main/mySpace/myStudents.php
  3. 185
      main/mySpace/student.php
  4. 4
      main/user/user.php

@ -11,6 +11,7 @@ require (api_get_path(LIBRARY_PATH).'tracking.lib.php');
require_once(api_get_path(LIBRARY_PATH).'course.lib.php');
require_once(api_get_path(LIBRARY_PATH).'export.lib.inc.php');
ob_start();
$export_csv = isset($_GET['export']) && $_GET['export'] == 'csv' ? true : false;
$csv_content = array();
@ -35,8 +36,24 @@ $tbl_session_user = Database :: get_main_table(TABLE_MAIN_SESSION_USER);
$tbl_session_course_user = Database :: get_main_table(TABLE_MAIN_SESSION_COURSE_USER);
$tbl_admin = Database :: get_main_table(TABLE_MAIN_ADMIN);
$isCoach = api_is_coach();
/********************
* FUNCTIONS
********************/
function count_teacher_courses()
{
global $nb_teacher_courses;
return $nb_teacher_courses;
}
/**************************
* MAIN CODE
***************************/
$isCoach = api_is_coach();
if($isCoach)
{
@ -314,307 +331,136 @@ if($isCoach)
</td>
</tr>
</table>
<a href="student.php">'.get_lang('SeeSessionList').'</a>
<a href="session.php">'.get_lang('SeeSessionList').'</a>
</div>';
}
}
else
{
$sqlNbCours = " SELECT course_rel_user.course_code, course.title
FROM $tbl_course_user as course_rel_user
INNER JOIN $tbl_course as course
ON course.code = course_rel_user.course_code
WHERE course_rel_user.user_id='".$_user['user_id']."' AND course_rel_user.status='1'
";
$resultNbCours = api_sql_query($sqlNbCours, __FILE__, __LINE__);
$a_courses = api_store_result($resultNbCours);
$nb_teacher_courses = count($a_courses);
//Trainers
if(api_is_platform_admin())
{
$sqlNbFormateurs = "SELECT COUNT(user_id) FROM $tbl_user WHERE status = 1";
$resultNbFormateurs = api_sql_query($sqlNbFormateurs);
$a_nbFormateurs = mysql_fetch_array($resultNbFormateurs);
$nbFormateurs = $a_nbFormateurs[0];
}
//Coachs
$nbCoachs=0;
if(api_is_platform_admin())
{
$sqlNbCoachs = "SELECT COUNT(DISTINCT id_coach) FROM $tbl_session_course WHERE id_coach<>'0'";
$resultNbCoachs = api_sql_query($sqlNbCoachs);
$a_nbCoachs = mysql_fetch_array($resultNbCoachs);
$nbCoachs = $a_nbCoachs[0];
}
elseif($is_allowedCreateCourse)
{
$a_coach=array();
$sqlNbCours = " SELECT course_code
FROM $tbl_course_user
WHERE user_id='".$_user['user_id']."' AND status='1'
";
$resultNbCours = api_sql_query($sqlNbCours);
while($a_courses=mysql_fetch_array($resultNbCours))
{
$sql="SELECT DISTINCT id_coach FROM $tbl_session_course WHERE course_code='".$a_courses["course_code"]."'";
$resultCoach = api_sql_query($sql);
if(mysql_num_rows($resultCoach)>0)
{
while($a_temp=mysql_fetch_array($resultCoach))
{
$a_coach[]=$a_temp["id_coach"];
}
}
}
$a_coach=array_unique($a_coach);
$nbCoachs=count($a_coach);
}
if($nb_teacher_courses)
{
echo '<div align="right">
<a href="#" onclick="window.print()"><img align="absbottom" src="../img/printmgr.gif">&nbsp;'.get_lang('Print').'</a>
<a href="'.$_SERVER['PHP_SELF'].'?export=csv"><img align="absbottom" src="../img/excel.gif">&nbsp;'.get_lang('ExportAsCSV').'</a>
</div>';
$table = new SortableTable('tracking_list_course', 'count_teacher_courses');
$table -> set_header(0, get_lang('CourseTitle'), false);
$table -> set_header(1, get_lang('NbStudents'), false);
$table -> set_header(2, get_lang('TimeSpentInTheCourse'), false);
$table -> set_header(3, get_lang('AvgStudentsProgress'), false);
$table -> set_header(4, get_lang('AvgStudentsScore'), false);
$table -> set_header(5, get_lang('AvgMessages'), false);
$table -> set_header(6, get_lang('AvgAssignments'), false);
$table -> set_header(7, get_lang('Details'), false);
$csv_content[] = array(
get_lang('CourseTitle'),
get_lang('NbStudents'),
get_lang('TimeSpentInTheCourse'),
get_lang('AvgStudentsProgress'),
get_lang('AvgStudentsScore'),
get_lang('AvgMessages'),
get_lang('AvgAssignments')
);
$a_students = array();
foreach($a_courses as $course)
{
//Nombre de stagiaires (cours dans lesquels il est coach ou formateurs)
$course_code = $course['course_code'];
$nbStagiaire=0;
$a_stagiaire_teacher=array();
$avg_assignments_in_course = $avg_messages_in_course = $nb_students_in_course = $avg_progress_in_course = $avg_score_in_course = $avg_time_spent_in_course = 0;
//La personne est admin
if(api_is_platform_admin())
// students directly subscribed to the course
$sql = "SELECT user.user_id FROM $tbl_course_user as course_rel_user WHERE course_rel_user.status='5' AND course_rel_user.course_code='$course_code'";
$rs = api_sql_query($sql);
while($row = mysql_fetch_array($rs))
{
$sqlNbStagiaire = " SELECT COUNT(user_id)
FROM $tbl_user
WHERE status = 5
";
$resultNbStagiaire = api_sql_query($sqlNbStagiaire);
$a_nbStagiaire = mysql_fetch_array($resultNbStagiaire);
$nbStagiaire = $a_nbStagiaire[0];
$nb_students_in_course++;
// tracking datas
$avg_progress_in_course += Tracking :: get_avg_student_progress ($row['user_id'], $course_code);
$avg_score_in_course += Tracking :: get_avg_student_score ($row['user_id'], $course_code);
$avg_time_spent_in_course += Tracking :: get_time_spent_on_the_course ($row['user_id'], $course_code);
$a_students[] = $row['user_id'];
}
else
// students subscribed to the course throw a session
if(api_get_setting('use_session_mode') == 'true')
{
//La personne a le statut de professeur
if($is_allowedCreateCourse){
//Cours ou la personne est formateur mais dont les cours ne sont pas dans une session
$sql_select_courses="SELECT course_rel_user.course_code FROM $tbl_course_user as course_rel_user LEFT OUTER JOIN $tbl_session_course as src ON course_rel_user.course_code=src.course_code WHERE user_id='$_uid' AND status='1' AND src.course_code IS NULL";
$result_courses=api_sql_query($sql_select_courses);
while($a_courses=mysql_fetch_array($result_courses))
{
$s_course_code=$a_courses["course_code"];
$sqlStudents = "SELECT user.user_id,lastname,firstname,email FROM $tbl_course_user as course_rel_user, $tbl_user as user WHERE course_rel_user.user_id=user.user_id AND course_rel_user.status='5' AND course_rel_user.course_code='$s_course_code'";
$result_students=api_sql_query($sqlStudents);
if(mysql_num_rows($result_students)>0)
{
while($a_students_temp=mysql_fetch_array($result_students))
{
$a_stagiaire_teacher[]=$a_students_temp["user_id"];
}
}
}
$sqlNbStagiaire="SELECT DISTINCT srcru.id_user FROM $tbl_course_user as course_rel_user, $tbl_session_course_user as srcru " .
"WHERE course_rel_user.user_id='".$_user['user_id']."' AND course_rel_user.status='1' AND course_rel_user.course_code=srcru.course_code";
$resultNbStagiaire = api_sql_query($sqlNbStagiaire);
while($a_temp = mysql_fetch_array($resultNbStagiaire))
{
$a_stagiaire_teacher[]=$a_temp[0];
}
}
if($isCoach)
$sql = 'SELECT id_user as user_id
FROM '.$tbl_session_course_user.'
WHERE course_code="'.addslashes($course_code).'"';
$rs = api_sql_query($sql, __FILE__, __LINE__);
while($row = mysql_fetch_array($rs))
{
$a_stagiaire_coach=array();
$sql="SELECT id_session, course_code FROM $tbl_session_course WHERE id_coach='".$_user['user_id']."'";
$result=api_sql_query($sql);
while($a_courses=mysql_fetch_array($result))
if(!in_array($row['user_id'], $a_students))
{
$course_code=$a_courses["course_code"];
$id_session=$a_courses["id_session"];
$sqlStudents = "SELECT distinct srcru.id_user
FROM $tbl_session_course_user AS srcru
INNER JOIN $tbl_user as user
ON srcru.id_user = user.user_id
AND user.status = 5
WHERE course_code='$course_code' AND id_session='$id_session'";
$q_students=api_sql_query($sqlStudents);
$nb_students_in_course++;
while($a_temp=mysql_fetch_array($q_students))
{
$a_stagiaire_coach[]=$a_temp[0];
}
}
$a_stagiaires=array_merge($a_stagiaire_teacher,$a_stagiaire_coach);
$a_stagiaires=array_unique($a_stagiaires);
$nbStagiaire=count($a_stagiaires);
}
else
{
$nbStagiaire=count($a_stagiaire_teacher);
// tracking datas
$avg_progress_in_course += Tracking :: get_avg_student_progress ($row['user_id'], $course_code);
$avg_score_in_course += Tracking :: get_avg_student_score ($row['user_id'], $course_code);
$avg_time_spent_in_course += Tracking :: get_time_spent_on_the_course ($row['user_id'], $course_code);
$avg_messages_in_course += Tracking :: count_student_messages ($row['user_id'], $course_code);
$avg_assignments_in_course += Tracking :: count_student_assignments ($row['user_id'], $course_code);
$a_students[] = $row['user_id'];
}
}
}
//Nombre de cours
//La personne est admin donc on compte le nombre total de cours
if(api_is_platform_admin())
{
$sqlNbCours = " SELECT COUNT(code)
FROM $tbl_course
";
$resultNbCours = api_sql_query($sqlNbCours);
$a_nbCours = mysql_fetch_array($resultNbCours);
$nbCours = $a_nbCours[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);
else{
$a_cours=array();
//La personne a le statut de professeur
if($is_allowedCreateCourse)
{
$sqlNbCours = " SELECT DISTINCT course_code
FROM $tbl_course_user
WHERE user_id='".$_user['user_id']."' AND status='1'
";
$resultCours = api_sql_query($sqlNbCours);
while($a_cours_teacher = mysql_fetch_array($resultCours)){
$a_cours[]=$a_cours_teacher["course_code"];
}
}
$a_cours=array_unique($a_cours);
$nbCours=count($a_cours);
}
$table_row = array();
$table_row[] = $course['title'];
$table_row[] = $nb_students_in_course;
$table_row[] = $avg_time_spent_in_course;
$table_row[] = $avg_progress_in_course;
$table_row[] = $avg_score_in_course;
$table_row[] = $avg_messages_in_course;
$table_row[] = $avg_assignments_in_course;
$table_row[] = '<a href="../tracking/courseLog.php?cidReq='.$course_code.'"><img src="'.api_get_path(WEB_IMG_PATH).'2rightarrow.gif" border="0" /></a>';
$csv_content[] = array(
$course['title'],
$nb_students_in_course,
$avg_time_spent_in_course,
$avg_progress_in_course,
$avg_score_in_course,
$avg_messages_in_course,
$avg_assignments_in_course,
);
//Nombre de sessions
$table -> addRow($table_row, 'align="right"');
//La personne est admin donc on compte le nombre total de sessions
if(api_is_platform_admin())
{
$sqlNbSessions = " SELECT COUNT(id)
FROM $tbl_sessions
";
$resultNbSessions = api_sql_query($sqlNbSessions);
$a_nbSessions= mysql_fetch_array($resultNbSessions);
$nbSessions = $a_nbSessions[0];
}
else
{
$a_sessions=array();
if($is_allowedCreateCourse)
{
$sqlNbSessions = " SELECT DISTINCT id_session
FROM $tbl_session_course as session_course, $tbl_course_user as course_rel_user
WHERE session_course.course_code=course_rel_user.course_code AND course_rel_user.status='1' AND course_rel_user.user_id='".$_user['user_id']."'
";
$resultNbSessions = api_sql_query($sqlNbSessions);
while($a_temp = mysql_fetch_array($resultNbSessions))
{
$a_sessions[]=$a_temp["id_session"];
}
}
if($isCoach)
{
$sqlNbSessions = " SELECT DISTINCT id_session
FROM $tbl_session_course
WHERE id_coach='".$_user['user_id']."'
";
$resultNbSessions = api_sql_query($sqlNbSessions);
while($a_temp = mysql_fetch_array($resultNbSessions))
{
$a_sessions[]=$a_temp["id_session"];
}
}
$a_sessions=array_unique($a_sessions);
$nbSessions = count($a_sessions);
}
if(api_is_platform_admin())
{
echo '<div class="admin_section">
<h4>
<a href="teachers.php"><img src="'.api_get_path(WEB_IMG_PATH).'teachers.gif">&nbsp;'.get_lang('Trainers').' ('.$nbFormateurs.')</a>
</h4>
</div>';
}
if((api_is_platform_admin() || ($is_allowedCreateCourse && $nbCoachs>0)) && api_get_setting('use_session_mode')=='true')
{ // if the user is platform admin, or if he's a teacher which manage coaches
echo '<div class="admin_section">
<h4>
<a href="coaches.php"><img src="'.api_get_path(WEB_IMG_PATH).'coachs.gif">&nbsp;'.get_lang("Tutors").' ('.$nbCoachs.')</a>
</h4>
</div>';
}
if(api_is_platform_admin())
{
$table -> display();
$sql_nb_admin="SELECT count(user_id) FROM $tbl_admin";
$resultNbAdmin = api_sql_query($sql_nb_admin);
$i_nb_admin=mysql_result($resultNbAdmin,0,0);
echo '
<div class="admin_section">
<h4>
<a href="admin.php"><img src="'.api_get_path(WEB_IMG_PATH).'admins.gif>&nbsp;'.get_lang('Administrators').' ('.$i_nb_admin.')</a>
</h4>
</div>';
}
if($nbCours)
{
echo '
<div class="admin_section">
<h4>
<a href="cours.php"><img src="'.api_get_path(WEB_IMG_PATH).'courses.gif">&nbsp;'.get_lang('Courses').' ('.$nbCours.')'.'</a>
</h4>
</div>';
}
if(api_get_setting('use_session_mode')=='true'){
echo '
<div class="admin_section">
<h4>
<a href="session.php"><img src="'.api_get_path(WEB_IMG_PATH).'sessions.gif">&nbsp;'.get_lang('Sessions').' ('.$nbSessions.')'.'</a>
</h4>
</div>';
}
}
// send the csv file if asked
if($export_csv)
{
ob_end_clean();
Export :: export_table_csv($csv_content, 'reporting_index');
}

@ -24,13 +24,28 @@ $csv_content = array();
$nameTools=get_lang("StudentDetails");
$interbreadcrumb[] = array ("url" => "index.php", "name" => get_lang('MySpace'));
$interbreadcrumb[] = array ("url" => "student.php", "name" => get_lang("MyStudents"));
if(isset($_GET['details']))
{
$interbreadcrumb[] = array ("url" => "myStudents.php?student=".$_GET['student'], "name" => get_lang("StudentDetails"));
$nameTools=get_lang("DetailsStudentInCourse");
if(!empty($_GET['origin']) && $_GET['origin'] == 'tracking_course')
{
$course_infos = CourseManager :: get_course_information($_GET['course']);
$interbreadcrumb[] = array ("url" => api_get_path(WEB_COURSE_PATH).$course_infos['directory'], 'name' => $course_infos['title']);
$interbreadcrumb[] = array ("url" => "../user/user.php?cidReq=".$_GET['course'], "name" => get_lang("Users"));
}
else
{
$interbreadcrumb[] = array ("url" => "index.php", "name" => get_lang('MySpace'));
$interbreadcrumb[] = array ("url" => "student.php", "name" => get_lang("MyStudents"));
$interbreadcrumb[] = array ("url" => "myStudents.php?student=".$_GET['student'], "name" => get_lang("StudentDetails"));
$nameTools=get_lang("DetailsStudentInCourse");
}
}
else
{
$interbreadcrumb[] = array ("url" => "index.php", "name" => get_lang('MySpace'));
$interbreadcrumb[] = array ("url" => "student.php", "name" => get_lang("MyStudents"));
}
api_block_anonymous_users();

@ -36,6 +36,7 @@ if(isset($_GET["user_id"]) && $_GET["user_id"]!="" && isset($_GET["type"]) && $_
$interbreadcrumb[] = array ("url" => "coaches.php", "name" => get_lang('Tutors'));
}
$isCoach = api_is_coach();
Display :: display_header($nameTools);
@ -74,116 +75,120 @@ function sort_users($a, $b)
MAIN CODE
===============================================================================
*/
echo '<div align="right">
<a href="#" onclick="window.print()"><img align="absbottom" src="../img/printmgr.gif">&nbsp;'.get_lang('Print').'</a>
<a href="'.$_SERVER['PHP_SELF'].'?export=csv"><img align="absbottom" src="../img/excel.gif">&nbsp;'.get_lang('ExportAsCSV').'</a>
</div>';
$a_courses = Tracking :: get_courses_followed_by_coach($_user['user_id']);
$a_students = Tracking :: get_student_followed_by_coach($_user['user_id']);
$tracking_column = isset($_GET['tracking_column']) ? $_GET['tracking_column'] : 0;
$tracking_direction = isset($_GET['tracking_direction']) ? $_GET['tracking_direction'] : DESC;
if(count($a_students)>0)
if($isCoach)
{
$table = new SortableTable('tracking', 'count_student_coached');
$table -> set_header(0, get_lang('LastName'));
$table -> set_header(1, get_lang('FirstName'));
$table -> set_header(2, get_lang('Time'),false);
$table -> set_header(3, get_lang('Progress'),false);
$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(8, get_lang('Details'),false);
if($export_csv)
{
$csv_content[] = array (
get_lang('LastName'),
get_lang('FirstName'),
get_lang('Time'),
get_lang('Progress'),
get_lang('Score'),
get_lang('Student_publication'),
get_lang('Messages'),
get_lang('LatestLogin')
);
}
$all_datas = array();
foreach($a_students as $student_id)
echo '<div align="right">
<a href="#" onclick="window.print()"><img align="absbottom" src="../img/printmgr.gif">&nbsp;'.get_lang('Print').'</a>
<a href="'.$_SERVER['PHP_SELF'].'?export=csv"><img align="absbottom" src="../img/excel.gif">&nbsp;'.get_lang('ExportAsCSV').'</a>
</div>';
$a_courses = Tracking :: get_courses_followed_by_coach($_user['user_id']);
$a_students = Tracking :: get_student_followed_by_coach($_user['user_id']);
$tracking_column = isset($_GET['tracking_column']) ? $_GET['tracking_column'] : 0;
$tracking_direction = isset($_GET['tracking_direction']) ? $_GET['tracking_direction'] : DESC;
if(count($a_students)>0)
{
$student_datas = UserManager :: get_user_info_by_id($student_id);
$avg_time_spent = $avg_student_score = $avg_student_progress = $total_assignments = $total_messages = 0 ;
$nb_courses_student = 0;
foreach($a_courses as $course_code)
$table = new SortableTable('tracking', 'count_student_coached');
$table -> set_header(0, get_lang('LastName'));
$table -> set_header(1, get_lang('FirstName'));
$table -> set_header(2, get_lang('Time'),false);
$table -> set_header(3, get_lang('Progress'),false);
$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(8, get_lang('Details'),false);
if($export_csv)
{
$csv_content[] = array (
get_lang('LastName'),
get_lang('FirstName'),
get_lang('Time'),
get_lang('Progress'),
get_lang('Score'),
get_lang('Student_publication'),
get_lang('Messages'),
get_lang('LatestLogin')
);
}
$all_datas = array();
foreach($a_students as $student_id)
{
if(CourseManager :: is_user_subscribed_in_course($student_id,$course_code, true))
$student_datas = UserManager :: get_user_info_by_id($student_id);
$avg_time_spent = $avg_student_score = $avg_student_progress = $total_assignments = $total_messages = 0 ;
$nb_courses_student = 0;
foreach($a_courses as $course_code)
{
$avg_time_spent += Tracking :: get_time_spent_on_the_platform($student_id, $course_code);
$avg_student_score += Tracking :: get_avg_student_score($student_id, $course_code);
$avg_student_progress += Tracking :: get_avg_student_progress($student_id, $course_code);
$total_assignments += Tracking :: count_student_assignments($student_id, $course_code);
$total_messages += Tracking :: count_student_messages($student_id, $course_code);
$nb_courses_student++;
if(CourseManager :: is_user_subscribed_in_course($student_id,$course_code, true))
{
$avg_time_spent += Tracking :: get_time_spent_on_the_platform($student_id, $course_code);
$avg_student_score += Tracking :: get_avg_student_score($student_id, $course_code);
$avg_student_progress += Tracking :: get_avg_student_progress($student_id, $course_code);
$total_assignments += Tracking :: count_student_assignments($student_id, $course_code);
$total_messages += Tracking :: count_student_messages($student_id, $course_code);
$nb_courses_student++;
}
}
$avg_time_spent = $avg_time_spent / $nb_courses_student;
$avg_student_score = $avg_student_score / $nb_courses_student;
$avg_student_progress = $avg_student_progress / $nb_courses_student;
$row = array();
$row[] = $student_datas['lastname'];
$row[] = $student_datas['firstname'];
$row[] = api_time_to_hms($avg_time_spent);
$row[] = $avg_student_progress.' %';
$row[] = $avg_student_score.' %';
$row[] = $total_assignments;
$row[] = $total_messages;
$row[] = Tracking :: get_last_connection_date($student_id);
if($export_csv)
{
$csv_content[] = $row;
}
$row[] = '<a href="myStudents.php?student='.$student_id.'"><img src="'.api_get_path(WEB_IMG_PATH).'2rightarrow.gif" border="0" /></a>';
$all_datas[] = $row;
}
$avg_time_spent = $avg_time_spent / $nb_courses_student;
$avg_student_score = $avg_student_score / $nb_courses_student;
$avg_student_progress = $avg_student_progress / $nb_courses_student;
$row = array();
$row[] = $student_datas['lastname'];
$row[] = $student_datas['firstname'];
$row[] = api_time_to_hms($avg_time_spent);
$row[] = $avg_student_progress.' %';
$row[] = $avg_student_score.' %';
$row[] = $total_assignments;
$row[] = $total_messages;
$row[] = Tracking :: get_last_connection_date($student_id);
usort($all_datas, 'sort_users');
if($tracking_direction == 'ASC')
rsort($all_datas);
if($export_csv)
{
$csv_content[] = $row;
usort($csv_content, 'sort_users');
}
foreach($all_datas as $row)
{
$table -> addRow($row,'align="right"');
}
$row[] = '<a href="myStudents.php?student='.$student_id.'"><img src="'.api_get_path(WEB_IMG_PATH).'2rightarrow.gif" border="0" /></a>';
$table -> display();
$all_datas[] = $row;
}
usort($all_datas, 'sort_users');
if($tracking_direction == 'ASC')
rsort($all_datas);
if($export_csv)
else
{
usort($csv_content, 'sort_users');
echo get_lang('NoStudent');
}
foreach($all_datas as $row)
// send the csv file if asked
if($export_csv)
{
$table -> addRow($row,'align="right"');
ob_end_clean();
Export :: export_table_csv($csv_content, 'reporting_student_list');
}
$table -> display();
}
else
{
echo get_lang('NoStudent');
}
// send the csv file if asked
if($export_csv)
{
ob_end_clean();
Export :: export_table_csv($csv_content, 'reporting_student_list');
}

@ -591,7 +591,7 @@ function get_user_data($from, $number_of_items, $column, $direction)
*/
function modify_filter($user_id)
{
global $origin,$_user,$is_allowed_to_track;
global $origin,$_user, $_course, $is_allowed_to_track;
$result="<div style='text-align: center'>";
@ -600,7 +600,7 @@ function modify_filter($user_id)
if($is_allowed_to_track)
{
$result .= '<a href="../tracking/userLog.php?'.api_get_cidreq().'&amp;origin='.$origin.'&amp;uInfo='.$user_id.'"><img border="0" alt="'.get_lang('Tracking').'" src="../img/statistics.gif" /></a>&nbsp;';
$result .= '<a href="../mySpace/myStudents.php?student='.$user_id.'&details=true&course='.$_course['id'].'&origin=tracking_course"><img border="0" alt="'.get_lang('Tracking').'" src="../img/statistics.gif" /></a>&nbsp;';
}
if(api_is_allowed_to_edit())

Loading…
Cancel
Save