uid=$login;
$message ='';
$equipes_ldap = $Se3Ldap->get_equipes();
$equipes_in=$people->get_equipes();
/* strategie de validation */
foreach($equipes_ldap as $equipe => $desc) {
if ( (isset($equipes_in[$equipe])) && (!isset($_POST[$equipe]))) {
$people->del_from_group($equipe);
$message.="Suppression de la classe ".$desc."
\n";
}
if ( !(isset($equipes_in[$equipe])) && (isset($_POST[$equipe])) && ($_POST[$equipe]=='on')) {
$people->add_to_group($equipe);
$message.="Ajout de la classe ".$desc."
\n";
}
}
return $message;
}
function TeacherMatieresProcess($uid='') {
global $Se3Ldap;
$login=isauth();
$people = new people();
if ($uid=='') $people->uid=$login;
$message ='';
$matieres_ldap = $Se3Ldap->get_matieres();
$matieres_in=$people->get_matieres();
/* strategie de validation */
foreach($matieres_ldap as $matiere => $desc) {
if ( (isset($matieres_in[$matiere])) && (!isset($_POST[$matiere]))) {
$people->del_from_group($matiere);
$message.="Suppression de la matière ".$desc."
\n";
}
if ( !(isset($matieres_in[$matiere])) && (isset($_POST[$matiere])) && ($_POST[$matiere]=='on')) {
$people->add_to_group($matiere);
$message.="Ajout de la matière ".$desc." ($matiere)
\n";
}
}
return $message;
}
?>