Compare commits
6 Commits
70e2d49e7c
...
dist/envol
Author | SHA1 | Date | |
---|---|---|---|
4959a10857 | |||
d0d8183f7a | |||
d42fdbfedd | |||
4f2fa1db4f | |||
75d935aa57 | |||
27e23fffaf |
@ -180,6 +180,20 @@ class ScriptCommand extends Command
|
|||||||
$this->writeln("");
|
$this->writeln("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($this->container->getParameter('ldap_template')=="scribe") {
|
||||||
|
$script=$this->em->getRepository("CadolesCoreBundle:Script")->findOneBy(["name"=>"purgepageprofil"]);
|
||||||
|
if(!$script) {
|
||||||
|
$this->writeln("== SCRIPT = purgepageprofil");
|
||||||
|
$this->purgepageprofil();
|
||||||
|
|
||||||
|
$script=new Script();
|
||||||
|
$script->setName("purgepageprofil");
|
||||||
|
$this->em->persist($script);
|
||||||
|
$this->em->flush();
|
||||||
|
$this->writeln("");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -434,6 +448,20 @@ class ScriptCommand extends Command
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function purgepageprofil() {
|
||||||
|
$page=$this->em->getRepository('CadolesPortalBundle:Page')->findOneBy(['name'=>'PROFIL - Enseignants']);
|
||||||
|
if($page) {
|
||||||
|
$this->em->remove($page);
|
||||||
|
$this->em->flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
$page=$this->em->getRepository('CadolesPortalBundle:Page')->findOneBy(['name'=>'PROFIL - Administratifs']);
|
||||||
|
if($page) {
|
||||||
|
$this->em->remove($page);
|
||||||
|
$this->em->flush();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ class SynchroCommand extends Command
|
|||||||
$ldapfilter="(|(&(uid=*)(ENTPersonProfils=enseignant))(&(uid=*)(typeadmin=0))(&(uid=*)(typeadmin=2)))";
|
$ldapfilter="(|(&(uid=*)(ENTPersonProfils=enseignant))(&(uid=*)(typeadmin=0))(&(uid=*)(typeadmin=2)))";
|
||||||
$label="PROFIL - Enseignants";
|
$label="PROFIL - Enseignants";
|
||||||
$this->writeln(" - $label");
|
$this->writeln(" - $label");
|
||||||
if(!$simulate) $this->addmodGroup($label,$ldapfilter,$scribe_group);
|
if(!$simulate) $this->addmodGroup($label,$ldapfilter,false);
|
||||||
|
|
||||||
// Responsables
|
// Responsables
|
||||||
$ldapfilter="(&(uid=*)(ENTPersonProfils=responsable))";
|
$ldapfilter="(&(uid=*)(ENTPersonProfils=responsable))";
|
||||||
@ -140,7 +140,20 @@ class SynchroCommand extends Command
|
|||||||
$ldapfilter="(&(uid=*)(ENTPersonProfils=administratif))";
|
$ldapfilter="(&(uid=*)(ENTPersonProfils=administratif))";
|
||||||
$label="PROFIL - Administratifs";
|
$label="PROFIL - Administratifs";
|
||||||
$this->writeln(" - $label");
|
$this->writeln(" - $label");
|
||||||
if(!$simulate) $this->addmodGroup($label,$ldapfilter,$scribe_group);
|
if(!$simulate) $this->addmodGroup($label,$ldapfilter,false);
|
||||||
|
|
||||||
|
// Niveaux
|
||||||
|
$this->writeln('');
|
||||||
|
$this->writeln('== NIVEAUX ==========================================');
|
||||||
|
$results = $this->ldap->search("type=Niveau", ['cn','description','gidNumber'], $this->ldap_basedn);
|
||||||
|
foreach($results as $result) {
|
||||||
|
$cn=$result["cn"];
|
||||||
|
$ldapfilter="(&(type=Niveau)(cn=$cn))";
|
||||||
|
|
||||||
|
$label="NIVEAU - ".$result["cn"];
|
||||||
|
$this->writeln(" - $label");
|
||||||
|
if(!$simulate) $this->addmodGroup($label,$ldapfilter,false);
|
||||||
|
}
|
||||||
|
|
||||||
// Classes
|
// Classes
|
||||||
$this->writeln('');
|
$this->writeln('');
|
||||||
@ -155,6 +168,32 @@ class SynchroCommand extends Command
|
|||||||
if(!$simulate) $this->addmodGroup($label,$ldapfilter,$scribe_group);
|
if(!$simulate) $this->addmodGroup($label,$ldapfilter,$scribe_group);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Elèves des Classes
|
||||||
|
$this->writeln('');
|
||||||
|
$this->writeln('== ELEVES DES CLASSES ==========================================');
|
||||||
|
$results = $this->ldap->search("type=Classe", ['cn','description','gidNumber'], $this->ldap_basedn);
|
||||||
|
foreach($results as $result) {
|
||||||
|
$cn=$result["cn"];
|
||||||
|
$ldapfilter="(&(type=Classe)(cn=$cn))";
|
||||||
|
|
||||||
|
$label="ELEVES - ".$result["cn"];
|
||||||
|
$this->writeln(" - $label");
|
||||||
|
if(!$simulate) $this->addmodGroup($label,$ldapfilter,false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Professeurs des Classes
|
||||||
|
$this->writeln('');
|
||||||
|
$this->writeln('== PROFESSEURS DES CLASSES ==========================================');
|
||||||
|
$results = $this->ldap->search("type=Classe", ['cn','description','gidNumber'], $this->ldap_basedn);
|
||||||
|
foreach($results as $result) {
|
||||||
|
$cn=$result["cn"];
|
||||||
|
$ldapfilter="(|(&(type=Equipe)(cn=profs-$cn))(&(ENTPersonProfils=Administratif)(divcod=$cn)))";
|
||||||
|
|
||||||
|
$label="PROFESSEURS - ".$result["cn"];
|
||||||
|
$this->writeln(" - $label");
|
||||||
|
if(!$simulate) $this->addmodGroup($label,$ldapfilter,false);
|
||||||
|
}
|
||||||
|
|
||||||
// Options
|
// Options
|
||||||
$this->writeln('');
|
$this->writeln('');
|
||||||
$this->writeln('== OPTIONS ==========================================');
|
$this->writeln('== OPTIONS ==========================================');
|
||||||
|
@ -124,7 +124,7 @@ class ItemController extends Controller
|
|||||||
"labelniveau01" => $this->GetParameter("labelsniveau01"),
|
"labelniveau01" => $this->GetParameter("labelsniveau01"),
|
||||||
"ssosynchroitem" => $this->GetParameter("ssosynchroitem"),
|
"ssosynchroitem" => $this->GetParameter("ssosynchroitem"),
|
||||||
"user_attr_cas_item" => $this->GetParameter("user_attr_cas_item"),
|
"user_attr_cas_item" => $this->GetParameter("user_attr_cas_item"),
|
||||||
"activate_widsonde" => $this->GetParameter("activate_widsonde"),
|
"activate_widsonde" => ($this->GetParameter("activate_widsonde")&&$data->getId()>0),
|
||||||
));
|
));
|
||||||
|
|
||||||
// Récupération des data du formulaire
|
// Récupération des data du formulaire
|
||||||
|
@ -151,13 +151,13 @@ class ItemType extends AbstractType
|
|||||||
if($options["activate_widsonde"]) {
|
if($options["activate_widsonde"]) {
|
||||||
$builder
|
$builder
|
||||||
->add('clicksonde', CheckboxType::class, [
|
->add('clicksonde', CheckboxType::class, [
|
||||||
"label" => "Exécuter une sonde statistique sur le click",
|
"label" => "Exécuter une sonde statistique sur le clic",
|
||||||
"required" => false
|
"required" => false
|
||||||
])
|
])
|
||||||
|
|
||||||
->add('clicksondeservice', ChoiceType::class, [
|
->add('clicksondeservice', ChoiceType::class, [
|
||||||
"label" => 'Type de Service associé à la sonde',
|
"label" => 'Type de Service associé à la sonde',
|
||||||
"placeholder" => 'Selectionner un service',
|
"placeholder" => 'Sélectionner un service',
|
||||||
"required" => false,
|
"required" => false,
|
||||||
"choices" => [
|
"choices" => [
|
||||||
"ACCUEIL" => "ACCUEIL",
|
"ACCUEIL" => "ACCUEIL",
|
||||||
|
Reference in New Issue
Block a user