[svn r11893] update reporting

skala
Eric Marguin 18 years ago
parent b5dc2ca657
commit ee3519107f
  1. 79
      main/mySpace/index.php
  2. 14
      main/mySpace/myStudents.php
  3. 9
      main/mySpace/student.php
  4. 9
      main/tracking/courseLog.php

@ -68,25 +68,38 @@ $menu_items = array();
if(api_is_allowed_to_create_course())
{
if(!$isCoach && !api_is_platform_admin())
{
$view = 'teacher';
}
if($view=='teacher')
{
$menu_items[] = get_lang('TeacherInterface');
$title = get_lang('YourCourseList');
}
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);
if($nb_teacher_courses)
{
$menu_items[] = '<a href="'.api_get_self().'?view=teacher">'.get_lang('TeacherInterface').'</a>';
if(!$isCoach && !api_is_platform_admin())
{
$view = 'teacher';
}
if($view=='teacher')
{
$menu_items[] = get_lang('TeacherInterface');
$title = get_lang('YourCourseList');
}
else
{
$menu_items[] = '<a href="'.api_get_self().'?view=teacher">'.get_lang('TeacherInterface').'</a>';
}
}
}
if($isCoach)
{
if(!api_is_allowed_to_create_course() && !api_is_platform_admin())
if($nb_teacher_courses==0 && !api_is_platform_admin())
{
$view = 'teacher';
$view = 'coach';
}
if($view=='coach')
{
@ -98,7 +111,7 @@ if($isCoach)
$menu_items[] = '<a href="'.api_get_self().'?view=coach">'.get_lang('CoachInterface').'</a>';
}
}
if(api_is_platform_admin)
if(api_is_platform_admin())
{
if($view=='admin')
{
@ -112,15 +125,18 @@ if(api_is_platform_admin)
}
$nb_menu_items = count($menu_items);
foreach($menu_items as $key=> $item)
if($nb_menu_items>1)
{
echo $item;
if($key!=$nb_menu_items-1)
foreach($menu_items as $key=> $item)
{
echo ' | ';
echo $item;
if($key!=$nb_menu_items-1)
{
echo ' | ';
}
}
echo '<br />';
}
echo '<br />';
echo '<div align="left" style="float:left"><h4>'.$title.'</h4></div>
<div align="right">
<a href="#" onclick="window.print()"><img align="absbottom" src="../img/printmgr.gif">&nbsp;'.get_lang('Print').'</a>
@ -403,16 +419,6 @@ echo '<div class="clear">&nbsp;</div>';
if(api_is_allowed_to_create_course() && $view=='teacher')
{
$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);
if($nb_teacher_courses)
{
@ -528,19 +534,19 @@ if(api_is_allowed_to_create_course() && $view=='teacher')
if(api_is_platform_admin() && $view=='admin'){
$table = new SortableTable('tracking_list_coaches', 'count_coaches');
$table -> set_header(0, get_lang('FirstName'), true);
$table -> set_header(1, get_lang('LastName'), true);
$table -> set_header(2, get_lang('AverageTimeSpentOnThePlatform'), false);
$table -> set_header(3, get_lang('LastConnexion'), false);
$table -> set_header(0, get_lang('FirstName'), true, 'align="center"');
$table -> set_header(1, get_lang('LastName'), true, 'align="center"');
$table -> set_header(2, get_lang('TimeSpentOnThePlatform'), false);
$table -> set_header(3, get_lang('LastConnexion'), false, 'align="center"');
$table -> set_header(4, get_lang('NbStudents'), false);
$table -> set_header(5, get_lang('CountCours'), false);
$table -> set_header(6, get_lang('NumberOfSessions'), false);
$table -> set_header(7, get_lang('Details'), false,'align="center"');
$table -> set_header(7, get_lang('Probationers'), false,'align="center"');
$csv_content[] = array(
get_lang('FirstName'),
get_lang('LastName'),
get_lang('AverageTimeSpentOnThePlatform'),
get_lang('TimeSpentOnThePlatform'),
get_lang('LastConnexion'),
get_lang('NbStudents'),
get_lang('CountCours'),
@ -585,6 +591,9 @@ if(api_is_platform_admin() && $view=='admin'){
);
}
$table -> updateColAttributes(0,array('align'=>'left'));
$table -> updateColAttributes(1,array('align'=>'left'));
$table -> updateColAttributes(3,array('align'=>'left'));
$table -> updateColAttributes(7,array('align'=>'center'));
$table -> display();

@ -406,7 +406,7 @@ if(!empty($_GET['student']))
<?php echo get_lang('Time'); ?>
</th>
<th>
<?php echo get_lang('Progress'); ?>
<?php echo get_lang('Score'); ?>
</th>
<th>
<?php echo get_lang('Progress'); ?>
@ -487,7 +487,7 @@ if(!empty($_GET['student']))
}
else
{
$score = $score / $nb_quiz.' %';
$score = round($score / $nb_quiz,2).' %';
}
@ -507,13 +507,13 @@ if(!empty($_GET['student']))
<td>
<?php echo stripslashes($a_learnpath['name']); ?>
</td>
<td align="center">
<td align="right">
<?php echo api_time_to_hms($total_time) ?>
</td>
<td align="center">
<td align="right">
<?php echo $score ?>
</td>
<td align="center">
<td align="right">
<?php echo $progress ?>
</td>
<td align="center">
@ -628,11 +628,11 @@ if(!empty($_GET['student']))
echo $a_exercices['title'];
echo " </td>
";
echo " <td align='center'>
echo " <td align='right'>
";
echo $pourcentageScore.' %';
echo " </td>
<td align='center'>
<td align='right'>
";
echo $a_essais['essais'];
echo " </td>

@ -100,14 +100,14 @@ if($isCoach || api_is_platform_admin())
if(count($a_students)>0)
{
$table = new SortableTable('tracking', 'count_student_coached');
$table -> set_header(0, get_lang('LastName'));
$table -> set_header(1, get_lang('FirstName'));
$table -> set_header(0, get_lang('LastName'), true, 'align="center');
$table -> set_header(1, get_lang('FirstName'), true, 'align="center');
$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'));
$table -> set_header(7, get_lang('LatestLogin'), 'align="center');
$table -> set_header(8, get_lang('Details'),false);
if($export_csv)
@ -185,6 +185,9 @@ if($isCoach || api_is_platform_admin())
{
$table -> addRow($row,'align="right"');
}
$table -> updateColAttributes(0,array('align'=>'left'));
$table -> updateColAttributes(1,array('align'=>'left'));
$table -> updateColAttributes(7,array('align'=>'left'));
$table -> setColAttributes(8,array('align'=>'center'));
$table -> display();

@ -465,14 +465,14 @@ else {
if(count($a_students)>0)
{
$table = new SortableTable('tracking', 'count_student_in_course');
$table -> set_header(0, get_lang('LastName'));
$table -> set_header(1, get_lang('FirstName'));
$table -> set_header(0, get_lang('LastName'), true, 'align="center"');
$table -> set_header(1, get_lang('FirstName'), true, 'align="center"');
$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'));
$table -> set_header(7, get_lang('LatestLogin'), true, 'align="center"');
$table -> set_header(8, get_lang('Details'),false);
if($export_csv)
@ -537,6 +537,9 @@ else {
{
$table -> addRow($row,'align="right"');
}
$table -> setColAttributes(0,array('align'=>'left'));
$table -> setColAttributes(1,array('align'=>'left'));
$table -> setColAttributes(7,array('align'=>'left'));
$table -> setColAttributes(8,array('align'=>'center'));
$table -> display();

Loading…
Cancel
Save