'fusionax/ids' => $this->make_hook('ids', AUTH_MDP, 'admin'),
'fusionax/deceased' => $this->make_hook('deceased', AUTH_MDP, 'admin'),
'fusionax/promo' => $this->make_hook('promo', AUTH_MDP, 'admin'),
- 'fusionax/names' => $this->make_hook('names', AUTH_MDP, 'admin')
+ 'fusionax/names' => $this->make_hook('names', AUTH_MDP, 'admin'),
+ 'fusionax/edu' => $this->make_hook('edu', AUTH_MDP, 'admin')
);
} elseif (Platal::globals()->merge->state == 'done') {
return array(
}
+ function handler_edu(&$page, $action = '')
+ {
+ $page->changeTpl('fusionax/education.tpl');
+
+ $missingEducation = XDB::rawIterator("SELECT DISTINCT(f.Intitule_diplome)
+ FROM fusionax_formations AS f
+ WHERE f.Intitule_diplome != '' AND NOT EXISTS (SELECT *
+ FROM profile_education_enum AS e
+ WHERE f.Intitule_diplome = e.name)");
+ $missingDegree = XDB::rawIterator("SELECT DISTINCT(f.Intitule_formation)
+ FROM fusionax_formations AS f
+ WHERE f.Intitule_formation != '' AND NOT EXISTS (SELECT *
+ FROM profile_education_degree_enum AS e
+ WHERE f.Intitule_formation = e.abbreviation)");
+ $missingCouple = XDB::rawIterator("SELECT DISTINCT(f.Intitule_diplome) AS edu, f.Intitule_formation AS degree, ee.id AS eduid, de.id AS degreeid
+ FROM fusionax_formations AS f
+ INNER JOIN profile_education_enum AS ee ON (f.Intitule_diplome = ee.name)
+ INNER JOIN profile_education_degree_enum AS de ON (f.Intitule_formation = de.abbreviation)
+ WHERE f.Intitule_diplome != '' AND f.Intitule_formation != ''
+ AND NOT EXISTS (SELECT *
+ FROM profile_education_degree AS d
+ WHERE ee.id = d.eduid AND de.id = d.degreeid)");
+
+ $page->assign('missingEducation', $missingEducation);
+ $page->assign('missingDegree', $missingDegree);
+ $page->assign('missingCouple', $missingCouple);
+ $page->assign('missingEducationCount', $missingEducation->total());
+ $page->assign('missingDegreeCount', $missingDegree->total());
+ $page->assign('missingCoupleCount', $missingCouple->total());
+ }
+
function handler_issues_deathdate(&$page, $action = '')
{
$page->changeTpl('fusionax/deathdate_issues.tpl');
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2010 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+<h2><a href="fusionax">Fusion des annuaires X.org - AX</a> / formations</h2>
+
+<p>
+ Il y a {$missingEducationCount} université{if $missingEducationCount > 1}s{/if} manquante{if $missingEducationCount > 1}s{/if} dans
+ notre base{if $missingEducationCount eq 0}.</p>{else} :
+</p>
+<ul>
+ {iterate from=$missingEducation item=education}<li>{$education.Intitule_diplome}</li>{/iterate}
+</ul>{/if}
+
+<p>
+ Il y a {$missingDegreeCount} diplôme{if $missingDegreeCount > 1}s{/if} manquant{if $missingDegreeCount > 1}s{/if} dans
+ notre base{if $missingDegreeCount eq 0}.</p>{else} :
+</p>
+<ul>
+ {iterate from=$missingDegree item=degree}<li>{$degree.Intitule_formation}</li>{/iterate}
+</ul>{/if}
+
+<p>
+ Il y a {$missingCoupleCount} couple{if $missingCoupleCount > 1}s{/if} manquant{if $missingCoupleCount > 1}s{/if} dans
+ notre base{if $missingCoupleCount eq 0}.</p>{else} :
+</p>
+<ul>
+ {iterate from=$missingCouple item=couple}<li>{$couple.edu}, {$couple.degree} ({$couple.eduid}, {$couple.degreeid})</li>{/iterate}
+</ul>{/if}
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}