From 1569801376cf973790544f1b0a01181bd33427d7 Mon Sep 17 00:00:00 2001 From: Julian Prud'homme Date: Wed, 16 May 2007 10:21:13 +0200 Subject: [PATCH] [svn r12416] Fix a bug with the student course list : http://projects.dokeos.com/?do=details&id=1557 --- main/mySpace/myStudents.php | 60 +++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/main/mySpace/myStudents.php b/main/mySpace/myStudents.php index bd223d5206..2e6b7bec25 100644 --- a/main/mySpace/myStudents.php +++ b/main/mySpace/myStudents.php @@ -783,36 +783,38 @@ if(!empty($_GET['student'])) $csv_content[] = array(get_lang('Course'),get_lang('Time'),get_lang('Progress'),get_lang('Score')); foreach($a_courses as $course_code) { - $course_infos = CourseManager :: get_course_information($course_code); - $time_spent_on_course = api_time_to_hms(Tracking :: get_time_spent_on_the_course($a_infosUser['user_id'], $course_code)); - $progress = Tracking :: get_avg_student_progress($a_infosUser['user_id'], $course_code).' %'; - $score = Tracking :: get_avg_student_score($a_infosUser['user_id'], $course_code).' %'; - $csv_content[] = array($course_infos['title'], $time_spent_on_course, $progress, $score); - echo ' - - - '.$course_infos['title'].' - - - '.$time_spent_on_course.' - - - '.$progress.' - - - '.$score.' - '; - if(isset($_GET['id_coach']) && intval($_GET['id_coach'])!=0){ - echo ' - - '; - } - else{ - echo ' - + if(CourseManager :: is_user_subscribed_in_course($student_id,$course_code, true)){ + $course_infos = CourseManager :: get_course_information($course_code); + $time_spent_on_course = api_time_to_hms(Tracking :: get_time_spent_on_the_course($a_infosUser['user_id'], $course_code)); + $progress = Tracking :: get_avg_student_progress($a_infosUser['user_id'], $course_code).' %'; + $score = Tracking :: get_avg_student_score($a_infosUser['user_id'], $course_code).' %'; + $csv_content[] = array($course_infos['title'], $time_spent_on_course, $progress, $score); + echo ' + + + '.$course_infos['title'].' + + + '.$time_spent_on_course.' + + + '.$progress.' + + + '.$score.' '; - } - echo ''; + if(isset($_GET['id_coach']) && intval($_GET['id_coach'])!=0){ + echo ' + + '; + } + else{ + echo ' + + '; + } + echo ''; + } } }