X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Feducation.func.inc.php;h=dbfba28d506e7bd2a5b2fc97ca178c54f79d2244;hb=28c20b86be8b40cecba0d83080879f81c49e07ad;hp=64da8f10e766384b46b21a405b26ebd686e28cb1;hpb=7972436ae72911c7f2e8d5f3a26204a7ca0ee39d;p=platal.git
diff --git a/include/education.func.inc.php b/include/education.func.inc.php
index 64da8f1..dbfba28 100644
--- a/include/education.func.inc.php
+++ b/include/education.func.inc.php
@@ -1,6 +1,6 @@
';
- $res = XDB::iterator("SELECT e.id AS id, e.name AS name, g.pays AS country
+ $html = '';
+ $res = XDB::iterator("SELECT e.id AS id, gc.countryFR AS country,
+ IF(CHAR_LENGTH(e.name) > 76, e.abbreviation, e.name) AS name
FROM profile_education_enum AS e
- INNER JOIN geoloc_pays AS g ON (e.country = g.a2)
- ORDER BY g.pays, e.name");
+ LEFT JOIN geoloc_countries AS gc ON (e.country = gc.iso_3166_1_a2)
+ WHERE EXISTS (SELECT *
+ FROM profile_education_degree AS d
+ WHERE e.id = d.eduid)
+ ORDER BY gc.countryFR, e.name");
$country = "";
while ($arr_edu = $res->next()) {
if ($arr_edu["country"] != $country) {
+ if ($country) {
+ $html .= '';
+ }
$country = $arr_edu["country"];
- $html .= "