diff --git a/main/mySpace/myStudents.php b/main/mySpace/myStudents.php index cfe0e3e49e..06a4a5886c 100644 --- a/main/mySpace/myStudents.php +++ b/main/mySpace/myStudents.php @@ -44,15 +44,26 @@ $csv_content = array(); 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")); + if(isset($_GET['id_coach']) && intval($_GET['id_coach'])!=0){ + $interbreadcrumb[] = array ("url" => "student.php?id_coach=".$_GET['id_coach'], "name" => get_lang("CoachStudents")); + $interbreadcrumb[] = array ("url" => "myStudents.php?student=".$_GET['student'].'&id_coach='.$_GET['id_coach'], "name" => get_lang("StudentDetails")); + } + else{ + $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")); + if(isset($_GET['id_coach']) && intval($_GET['id_coach'])!=0){ + $interbreadcrumb[] = array ("url" => "student.php?id_coach=".$_GET['id_coach'], "name" => get_lang("CoachStudents")); + } + else{ + $interbreadcrumb[] = array ("url" => "student.php", "name" => get_lang("MyStudents")); + } } api_block_anonymous_users(); @@ -770,12 +781,19 @@ if(!empty($_GET['student'])) '.$score.' - - - - - - '; + '; + if(isset($_GET['id_coach']) && intval($_GET['id_coach'])!=0){ + echo ' + + '; + } + else{ + echo ' + + '; + } + echo ''; + } } else diff --git a/main/mySpace/student.php b/main/mySpace/student.php index d686eb1188..4c5d2e227e 100644 --- a/main/mySpace/student.php +++ b/main/mySpace/student.php @@ -19,8 +19,13 @@ if($export_csv) ob_start(); } $csv_content = array(); - -$nameTools= get_lang("Students"); + +if(isset($_GET['id_coach']) && intval($_GET['id_coach'])!=0){ + $nameTools= get_lang("CoachStudents"); +} +else{ + $nameTools= get_lang("Students"); +} $this_section = "session_my_space"; @@ -166,7 +171,12 @@ if($isCoach || api_is_platform_admin()) $csv_content[] = $row; } - $row[] = ''; + if(isset($_GET['id_coach']) && intval($_GET['id_coach'])!=0){ + $row[] = ''; + } + else{ + $row[] = ''; + } $all_datas[] = $row;