[svn r10051] update for the reporting

skala
Eric Marguin 19 years ago
parent 9b4a8633e2
commit 7d79623968
  1. BIN
      main/img/admins.gif
  2. BIN
      main/img/coachs.gif
  3. BIN
      main/img/courses.gif
  4. BIN
      main/img/students.gif
  5. BIN
      main/img/teachers.gif
  6. 11
      main/mySpace/cours.php
  7. 32
      main/mySpace/index.php
  8. 1351
      main/mySpace/myStudents.php
  9. 6
      main/mySpace/session.php
  10. 49
      main/mySpace/student.php

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -207,20 +207,21 @@
$resultCoursesCoach = api_sql_query($sqlCourse);
$a_courses = array_merge($a_courses_teacher,api_store_result($resultCoursesCoach));
}
else{
$a_courses=$a_courses_teacher;
}
}
}
$resultCourse = api_sql_query($sqlCourse);
$a_header[]=get_lang('Title');
$a_header[]=get_lang('Tutor');
$a_header[]=get_lang('Teachers');
if(mysql_num_rows($resultCourse)>0)
if(count($a_courses)>0)
{
echo '<table class="data_table">
<tr>

@ -125,10 +125,26 @@ function is_coach(){
//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)){
@ -292,7 +308,7 @@ function is_coach(){
if(api_is_platform_admin()){
echo '<div class="admin_section">
<h4>
<a href="teachers.php">'.get_lang('Trainers').' ('.$nbFormateurs.')</a>
<a href="teachers.php"><img src="'.api_get_path(WEB_IMG_PATH).'teachers.gif">&nbsp;'.get_lang('Trainers').' ('.$nbFormateurs.')</a>
</h4>
</div>';
}
@ -300,7 +316,7 @@ function is_coach(){
if(api_is_platform_admin() || $is_allowedCreateCourse){
echo '<div class="admin_section">
<h4>
<a href="coaches.php">'.get_lang("Tutor").' ('.$nbCoachs.')</a>
<a href="coaches.php"><img src="'.api_get_path(WEB_IMG_PATH).'coachs.gif">&nbsp;'.get_lang("Tutor").' ('.$nbCoachs.')</a>
</h4>
</div>';
}
@ -308,29 +324,29 @@ function is_coach(){
<div class="admin_section">
<h4>
<?php
echo "<a href='student.php'>".get_lang('Probationers').' ('.$nbStagiaire.')'."</a>";
echo "<a href='student.php'><img src='".api_get_path(WEB_IMG_PATH)."students.gif'>&nbsp;".get_lang('Probationers').' ('.$nbStagiaire.')'."</a>";
?>
</h4>
</div>
<div class="admin_section">
<h4>
<?php echo "<a href='admin.php'>".get_lang('Administrators')." (".$i_nb_admin.")</a>"; ?>
<?php echo "<a href='admin.php'><img src='".api_get_path(WEB_IMG_PATH)."admins.gif'>&nbsp;".get_lang('Administrators')." (".$i_nb_admin.")</a>"; ?>
</h4>
</div>
<div class="admin_section">
<h4>
<?php echo "<a href='cours.php'>".get_lang('Course').' ('.$nbCours.')'."</a>"; ?>
<?php echo "<a href='cours.php'><img src='".api_get_path(WEB_IMG_PATH)."courses.gif'>&nbsp;".get_lang('Course').' ('.$nbCours.')'."</a>"; ?>
</h4>
</div>
<div class="admin_section">
<h4>
<?php echo "<a href='session.php'>".get_lang('Sessions').' ('.$nbSessions.')'."</a>"; ?>
<?php echo "<a href='session.php'><img src='".api_get_path(WEB_IMG_PATH)."sessions.gif'>&nbsp;".get_lang('Sessions').' ('.$nbSessions.')'."</a>"; ?>
</h4>
</div>
<div class="admin_section">
<h4>
<?php echo get_lang('Tracks'); ?>
<?php echo "<img src='".api_get_path(WEB_IMG_PATH)."statistics.gif'>&nbsp;".get_lang('Tracks'); ?>
</h4>
<ul>
<li>

File diff suppressed because it is too large Load Diff

@ -95,7 +95,7 @@ ob_start();
if($is_allowedCreateCourse){
$sqlSessions = " SELECT DISTINCT id_session, name
$sqlSessions = " SELECT DISTINCT $tbl_sessions.id, name
FROM $tbl_session_course as session_course, $tbl_course_user as course_rel_user, $tbl_sessions as session
WHERE session.id=session_course.id_session AND session_course.course_code=course_rel_user.course_code AND course_rel_user.status='1' AND (course_rel_user.user_id='".$_user['user_id']."' OR session_course.id_coach='".$_user['user_id']."')
";
@ -132,7 +132,7 @@ ob_start();
while($a_sessions = mysql_fetch_array($resultSessions))
{
$i_id_session=$a_sessions['id_session'];
$i_id_session=$a_sessions['id'];
/*
//On récupère tous les cours de la session courante
$sql="SELECT course.title FROM $tbl_course as course, $tbl_session_course as session_rel_course " .
@ -151,7 +151,7 @@ ob_start();
</tr>
';
$a_data[$i_user_id]["name"]=$a_sessions['name'];
$a_data[$i_id_session]["name"]=$a_sessions['name'];
}
echo '</table>';

@ -85,7 +85,7 @@ ob_start();
$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='$i_teacher_id' 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)){
@ -143,7 +143,7 @@ ob_start();
$s_course_code=$a_courses["course_code"];
$sqlStudents = "SELECT DISTINCT user.user_id,lastname,firstname,email FROM $tbl_session_course_user as srcru, $tbl_user as user WHERE srcru.id_user=user.user_id AND srcru.course_code='$s_course_code'";
$result_students=api_sql_query($sqlStudents);
echo $sqlStudents;
if(mysql_num_rows($result_students)>0){
while($a_students_temp=mysql_fetch_array($result_students)){
@ -310,13 +310,7 @@ ob_start();
'.get_lang('Email').'
</th>
<th>
'.get_lang('Tutor').'
</th>
<th>
'.get_lang('Courses').'
</th>
<th>
'.get_lang('TakenSessions').'
'.get_lang('Tracking').'
</th>
</tr>
';
@ -328,7 +322,7 @@ ob_start();
$s_css_class="row_odd";
if($i%20==0 && $i!=0){
echo '<tr>
/*echo '<tr>
<th>
'.get_lang('Lastname').'
</th>
@ -348,6 +342,21 @@ ob_start();
'.get_lang('TakenSessions').'
</th>
</tr>
';*/
echo '<tr>
<th>
'.get_lang('Lastname').'
</th>
<th>
'.get_lang('Firstname').'
</th>
<th>
'.get_lang('Email').'
</th>
<th>
'.get_lang('Tracking').'
</th>
</tr>
';
}
}
@ -360,10 +369,10 @@ ob_start();
echo '<tr class="'.$s_css_class.'">
<td>
';
echo $a_current_student[1];
echo "<a href='myStudents.php?student=".$a_current_student[0]."#infosStudent'>".$a_current_student[1]."</a>";
echo ' </td>
<td>
'.$a_current_student[2].'
<a href="myStudents.php?student='.$a_current_student[0].'#infosStudent">'.$a_current_student[2].'</a>
</td>
<td>
';
@ -377,20 +386,14 @@ ob_start();
}
echo ' </td>';
if($a_current_student["teacher"]==true){
echo '<td>
<a href="coaches.php?id_student='.$a_current_student[0].'">-></a>
</td>
<td>
<a href="cours.php?type=student&user_id='.$a_current_student[0].'">-></a>
</td>
<td align="center">
<a href="'.$_SERVER['PHP_SELF'].'?student='.$a_current_student[0].'#sessionSuivie"> -> </a>
</td>';
if($a_current_student["teacher"]==true){
echo '<td align="center"><a href="coaches.php?id_student='.$a_current_student[0].'"><img src="'.api_get_path(WEB_IMG_PATH).'members.gif" alt="'.get_lang("StudentTutors").'" title="'.get_lang("StudentTutors").'"></a>&nbsp;<a href="cours.php?type=student&user_id='.$a_current_student[0].'"><img src="'.api_get_path(WEB_IMG_PATH).'course.gif" alt="'.get_lang("StudentCourses").'" title="'.get_lang("StudentCourses").'"></a>&nbsp;<a href="'.$_SERVER['PHP_SELF'].'?student='.$a_current_student[0].'#sessionSuivie"><img src="'.api_get_path(WEB_IMG_PATH).'agenda.gif" alt="'.get_lang("StudentSessions").'" title="'.get_lang("StudentSessions").'"></a>';
}
else{
echo '<td colspan="3"></td>';
echo '<td></td>';
}
echo '</tr>';

Loading…
Cancel
Save