Skip to content
Snippets Groups Projects
Commit ab69eb28 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Merge branches 'develop' and 'master' of https://git.unicaen.fr/open-source/OSE

parents 3ec4a15c b91800eb
No related branches found
No related tags found
No related merge requests found
...@@ -6,3 +6,38 @@ ...@@ -6,3 +6,38 @@
* @var $viewName string * @var $viewName string
* @var $sl \Zend\ServiceManager\ServiceLocatorInterface * @var $sl \Zend\ServiceManager\ServiceLocatorInterface
*/ */
$sql = "
SELECT
w.annee_id,
w.intervenant_id,
si.source_code statut_intervenant,
s.libelle_court structure,
w.etape_code,
w.atteignable,
w.objectif,
w.realisation
FROM
tbl_workflow w
JOIN wf_etape e ON e.id = w.etape_id
JOIN statut_intervenant si ON si.id = w.statut_intervenant_id
LEFT JOIN structure s ON s.id = w.structure_id
ORDER BY
w.intervenant_id,
e.ordre
";
/** @var $em \Doctrine\ORM\EntityManager */
$em = $container->get(\Application\Constants::BDD);
$ids = $em->getConnection()->query($sql);
$feuilles = [];
foreach( $ids as $id ){
$intervenant = (int)$id['INTERVENANT_ID'];
unset($id['INTERVENANT_ID']);
$feuilles[$intervenant][] = $id;
}
var_dump($feuilles);
\ No newline at end of file
...@@ -281,7 +281,7 @@ where rang = 1 ...@@ -281,7 +281,7 @@ where rang = 1
public function delete($entity, $softDelete = true) public function delete($entity, $softDelete = true)
{ {
if (!$this->getAuthorize()->isAllowed($entity, Privileges::ODF_ELEMENT_EDITION)) { if (!$this->getAuthorize()->isAllowed($entity, Privileges::ODF_ELEMENT_EDITION)) {
throw new \UnAuthorizedException('Vous n\'êtes pas autorisé(e) à supprimer cet enseignement.'); throw new UnAuthorizedException('Vous n\'êtes pas autorisé(e) à supprimer cet enseignement.');
} }
foreach ($entity->getCheminPedagogique() as $cp) { foreach ($entity->getCheminPedagogique() as $cp) {
......
...@@ -7,6 +7,7 @@ use Application\Service\Traits\ContextServiceAwareTrait; ...@@ -7,6 +7,7 @@ use Application\Service\Traits\ContextServiceAwareTrait;
use Application\Service\Traits\GroupeTypeFormationServiceAwareTrait; use Application\Service\Traits\GroupeTypeFormationServiceAwareTrait;
use Application\Service\Traits\StructureServiceAwareTrait; use Application\Service\Traits\StructureServiceAwareTrait;
use Application\Service\Traits\TypeFormationServiceAwareTrait; use Application\Service\Traits\TypeFormationServiceAwareTrait;
use BjyAuthorize\Exception\UnAuthorizedException;
use Doctrine\ORM\QueryBuilder; use Doctrine\ORM\QueryBuilder;
use Application\Entity\Db\Etape; use Application\Entity\Db\Etape;
...@@ -151,7 +152,7 @@ class EtapeService extends AbstractEntityService ...@@ -151,7 +152,7 @@ class EtapeService extends AbstractEntityService
} }
if (!$this->getAuthorize()->isAllowed($entity, Privileges::ODF_ETAPE_EDITION)) { if (!$this->getAuthorize()->isAllowed($entity, Privileges::ODF_ETAPE_EDITION)) {
throw new \UnAuthorizedException('Vous n\'êtes pas autorisé(e) à enregistrer cette formation.'); throw new UnAuthorizedException('Vous n\'êtes pas autorisé(e) à enregistrer cette formation.');
} }
return parent::save($entity); return parent::save($entity);
...@@ -162,7 +163,7 @@ class EtapeService extends AbstractEntityService ...@@ -162,7 +163,7 @@ class EtapeService extends AbstractEntityService
public function saveModulateurs(Etape $etape) public function saveModulateurs(Etape $etape)
{ {
if (!$this->getAuthorize()->isAllowed($etape, Privileges::ODF_MODULATEURS_EDITION)) { if (!$this->getAuthorize()->isAllowed($etape, Privileges::ODF_MODULATEURS_EDITION)) {
throw new \UnAuthorizedException('Vous n\'êtes pas autorisé(e) à enregistrer cette formation.'); throw new UnAuthorizedException('Vous n\'êtes pas autorisé(e) à enregistrer cette formation.');
} }
$serviceElementModulateur = $this->getServiceElementModulateur(); $serviceElementModulateur = $this->getServiceElementModulateur();
...@@ -192,7 +193,7 @@ class EtapeService extends AbstractEntityService ...@@ -192,7 +193,7 @@ class EtapeService extends AbstractEntityService
public function delete($entity, $softDelete = true) public function delete($entity, $softDelete = true)
{ {
if (!$this->getAuthorize()->isAllowed($entity, Privileges::ODF_ETAPE_EDITION)) { if (!$this->getAuthorize()->isAllowed($entity, Privileges::ODF_ETAPE_EDITION)) {
throw new \UnAuthorizedException('Vous n\'êtes pas autorisé(e) à supprimer cette formation.'); throw new UnAuthorizedException('Vous n\'êtes pas autorisé(e) à supprimer cette formation.');
} }
return parent::delete($entity, $softDelete); return parent::delete($entity, $softDelete);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment