-
-   | 
-   | 
-   | 
-   | 
-
-
-			'.get_lang('NoCoursesForThisSession').' | 
-		';
-} else {
-	// select the courses
-
-    $orderBy = "ORDER BY position";
-	$sql = "SELECT c.id, code, title, visual_code, nbr_users
-			FROM $tbl_course c INNER JOIN $tbl_session_rel_course sc
-			ON (c.id = sc.c_id)
-			WHERE
-			    sc.c_id = c.id AND
-			    session_id='$sessionId'
-			$orderBy";
-
-    $result = Database::query($sql);
-    $courses = Database::store_result($result);
-    $count = 0;
-
-	foreach ($courses as $course) {
-		//select the number of users
-		$sql = "SELECT count(*)
-                FROM $tbl_session_rel_user sru,
-                $tbl_session_rel_course_rel_user srcru
-				WHERE
-				    srcru.user_id = sru.user_id AND
-				    srcru.session_id = sru.session_id AND
-				    srcru.c_id = '".intval($course['id'])."' AND
-				    sru.relation_type <> ".SESSION_RELATION_TYPE_RRHH." AND
-				    srcru.session_id = '".intval($sessionId)."'";
-
-		$rs = Database::query($sql);
-		$course['nbr_users'] = Database::result($rs, 0, 0);
-
-		// Get coachs of the courses in session
-
-		$sql = "SELECT user.lastname, user.firstname, user.username
-                FROM $tbl_session_rel_course_rel_user session_rcru, $tbl_user user
-				WHERE
-				    session_rcru.user_id = user.user_id AND
-				    session_rcru.session_id = '".intval($sessionId)."' AND
-				    session_rcru.c_id ='".intval($course['id'])."' AND
-				    session_rcru.status=2";
-		$rs = Database::query($sql);
-
-		$coachs = array();
-		if (Database::num_rows($rs) > 0) {
-			while($info_coach = Database::fetch_array($rs)) {
-				$coachs[] = api_get_person_name($info_coach['firstname'], $info_coach['lastname']).' ('.$info_coach['username'].')';
-			}
-		} else {
-			$coach = get_lang('None');
-		}
-
-		if (count($coachs) > 0) {
-			$coach = implode('
',$coachs);
-		} else {
-			$coach = get_lang('None');
-		}
-
-        $orderButtons = null;
-
-        $upIcon = 'up.png';
-        $urlUp = api_get_self().'?id_session='.$sessionId.'&course_id='.$course['id'].'&action=move_up';
-
-        if ($count == 0) {
-            $upIcon = 'up_na.png';
-            $urlUp = '#';
-        }
-
-        $orderButtons = Display::url(
-            Display::return_icon($upIcon, get_lang('MoveUp')),
-            $urlUp
-        );
-
-        $downIcon = 'down.png';
-        $downUrl = api_get_self().'?id_session='.$sessionId.'&course_id='.$course['id'].'&action=move_down';
-
-        if ($count +1 == count($courses)) {
-            $downIcon = 'down_na.png';
-            $downUrl = '#';
-        }
-
-        $orderButtons .= Display::url(
-            Display::return_icon($downIcon, get_lang('MoveDown')),
-            $downUrl
-        );
-
-		//hide_course_breadcrumb the parameter has been added to hide the name of the course, that appeared in the default $interbreadcrumb
-		echo '
-		
-			| '.Display::url($course['title'].' ('.$course['visual_code'].')', api_get_path(WEB_COURSE_PATH).$course['code'].'/?id_session='.$sessionId),' | 
-			'.$coach.' | 
-			'.$course['nbr_users'].' | 
-			
-                '.Display::return_icon('course_home.gif', get_lang('Course')).'
-                '.$orderButtons.'
-                '.Display::return_icon('user.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'
-                '.Display::return_icon('import_csv.png', get_lang('ImportUsersToACourse'), null, ICON_SIZE_SMALL).'
-				'.Display::return_icon('statistics.gif', get_lang('Tracking')).' 
-				'.Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'
-				'.Display::return_icon('delete.png', get_lang('Delete')).'
-			 | 
-		
';
-        $count++;
-	}
-}
-?>
-
-
+
+   | 
+   | 
+   | 
+   | 
+
+
+			'.get_lang('NoCoursesForThisSession').' | 
+		';
+} else {
+	// select the courses
+
+    $orderBy = "ORDER BY position";
+	$sql = "SELECT c.id, code, title, visual_code, nbr_users
+			FROM $tbl_course c INNER JOIN $tbl_session_rel_course sc
+			ON (c.id = sc.c_id)
+			WHERE
+			    sc.c_id = c.id AND
+			    session_id='$sessionId'
+			$orderBy";
+
+    $result = Database::query($sql);
+    $courses = Database::store_result($result);
+    $count = 0;
+
+	foreach ($courses as $course) {
+		//select the number of users
+		$sql = "SELECT count(*)
+                FROM $tbl_session_rel_user sru,
+                $tbl_session_rel_course_rel_user srcru
+				WHERE
+				    srcru.user_id = sru.user_id AND
+				    srcru.session_id = sru.session_id AND
+				    srcru.c_id = '".intval($course['id'])."' AND
+				    sru.relation_type <> ".SESSION_RELATION_TYPE_RRHH." AND
+				    srcru.session_id = '".intval($sessionId)."'";
+
+		$rs = Database::query($sql);
+		$course['nbr_users'] = Database::result($rs, 0, 0);
+
+		// Get coachs of the courses in session
+
+		$sql = "SELECT user.lastname, user.firstname, user.username
+                FROM $tbl_session_rel_course_rel_user session_rcru, $tbl_user user
+				WHERE
+				    session_rcru.user_id = user.user_id AND
+				    session_rcru.session_id = '".intval($sessionId)."' AND
+				    session_rcru.c_id ='".intval($course['id'])."' AND
+				    session_rcru.status=2";
+		$rs = Database::query($sql);
+
+		$coachs = array();
+		if (Database::num_rows($rs) > 0) {
+			while($info_coach = Database::fetch_array($rs)) {
+				$coachs[] = api_get_person_name($info_coach['firstname'], $info_coach['lastname']).' ('.$info_coach['username'].')';
+			}
+		} else {
+			$coach = get_lang('None');
+		}
+
+		if (count($coachs) > 0) {
+			$coach = implode('
',$coachs);
+		} else {
+			$coach = get_lang('None');
+		}
+
+        $orderButtons = null;
+
+        $upIcon = 'up.png';
+        $urlUp = api_get_self().'?id_session='.$sessionId.'&course_id='.$course['id'].'&action=move_up';
+
+        if ($count == 0) {
+            $upIcon = 'up_na.png';
+            $urlUp = '#';
+        }
+
+        $orderButtons = Display::url(
+            Display::return_icon($upIcon, get_lang('MoveUp')),
+            $urlUp
+        );
+
+        $downIcon = 'down.png';
+        $downUrl = api_get_self().'?id_session='.$sessionId.'&course_id='.$course['id'].'&action=move_down';
+
+        if ($count +1 == count($courses)) {
+            $downIcon = 'down_na.png';
+            $downUrl = '#';
+        }
+
+        $orderButtons .= Display::url(
+            Display::return_icon($downIcon, get_lang('MoveDown')),
+            $downUrl
+        );
+
+		//hide_course_breadcrumb the parameter has been added to hide the name of the course, that appeared in the default $interbreadcrumb
+		echo '
+		
+			| '.Display::url($course['title'].' ('.$course['visual_code'].')', api_get_path(WEB_COURSE_PATH).$course['code'].'/?id_session='.$sessionId),' | 
+			'.$coach.' | 
+			'.$course['nbr_users'].' | 
+			
+                '.Display::return_icon('course_home.gif', get_lang('Course')).'
+                '.$orderButtons.'
+                '.Display::return_icon('user.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'
+                '.Display::return_icon('import_csv.png', get_lang('ImportUsersToACourse'), null, ICON_SIZE_SMALL).'
+				'.Display::return_icon('statistics.gif', get_lang('Tracking')).' 
+				'.Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'
+				'.Display::return_icon('delete.png', get_lang('Delete')).'
+			 | 
+		
';
+        $count++;
+	}
+}
+?>
+
+