[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * Fonctions utilisées par la page teacher.php 5 6 * @Version $Id: teacher.inc.php 8597 2015-03-16 12:08:15Z plouf $ 7 8 * @Projet LCS / SambaEdu 9 * Fonctions Interface Homme/Machine 10 11 * @Auteurs Swirly 12 13 * @Note 14 * 15 * @Licence Distribue sous la licence GPL 16 */ 17 18 /** 19 20 * file: teacher.inc.php 21 * @Repertoire: includes/ 22 */ 23 24 require "config.inc.php"; 25 require "functions.inc.php"; 26 27 require "ldap.inc.php"; 28 require "ihm.inc.php"; 29 require "jlcipher.inc.php"; 30 31 require "crob_ldap_functions.php"; 32 require_once "people-class.inc.php"; 33 34 // HTMLPurifier 35 require_once ("traitement_data.inc.php"); 36 37 function TeacherClassesProcess($uid='') { 38 global $Se3Ldap; 39 40 $login=isauth(); 41 $people = new people(); 42 if ($uid=='') $people->uid=$login; 43 44 $message =''; 45 46 $equipes_ldap = $Se3Ldap->get_equipes(); 47 $equipes_in=$people->get_equipes(); 48 49 /* strategie de validation */ 50 foreach($equipes_ldap as $equipe => $desc) { 51 if ( (isset($equipes_in[$equipe])) && (!isset($_POST[$equipe]))) { 52 $people->del_from_group($equipe); 53 $message.="Suppression de la classe ".$desc." <br>\n"; 54 } 55 if ( !(isset($equipes_in[$equipe])) && (isset($_POST[$equipe])) && ($_POST[$equipe]=='on')) { 56 $people->add_to_group($equipe); 57 $message.="Ajout de la classe ".$desc." <br>\n"; 58 } 59 } 60 return $message; 61 } 62 63 function TeacherMatieresProcess($uid='') { 64 global $Se3Ldap; 65 66 $login=isauth(); 67 $people = new people(); 68 if ($uid=='') $people->uid=$login; 69 70 $message =''; 71 72 $matieres_ldap = $Se3Ldap->get_matieres(); 73 $matieres_in=$people->get_matieres(); 74 75 /* strategie de validation */ 76 foreach($matieres_ldap as $matiere => $desc) { 77 if ( (isset($matieres_in[$matiere])) && (!isset($_POST[$matiere]))) { 78 $people->del_from_group($matiere); 79 $message.="Suppression de la matière ".$desc." <br>\n"; 80 } 81 if ( !(isset($matieres_in[$matiere])) && (isset($_POST[$matiere])) && ($_POST[$matiere]=='on')) { 82 $people->add_to_group($matiere); 83 $message.="Ajout de la matière ".$desc." ($matiere) <br>\n"; 84 } 85 } 86 return $message; 87 } 88 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Tue Mar 17 22:47:18 2015 | Cross-referenced by PHPXref 0.7.1 |