diff --git a/composer.json b/composer.json index 75a5172f8134d809a0df864cf52daf6196a88f7f..06a451c766c2f71bdb358b41e432719dedf1abe1 100755 --- a/composer.json +++ b/composer.json @@ -11,16 +11,15 @@ "unicaen/unicaen-app": "dev-trunk", "unicaen/unicaen-auth": "dev-trunk", "zendframework/zend-code": "2.4.*", - "zendframework/zend-form": "2.4.*", "bjyoungblood/bjy-authorize": "dev-master", "zf-commons/zfc-user": "0.1.3", - "mpdf/mpdf": "v5.7.2" + "zendframework/zend-file": ">=2.3", + "mpdf/mpdf": "v5.7.2", + "unicaen/unicaen-code": "dev-trunk" }, "require-dev": { "zendframework/zend-test": ">=2.3", - "zendframework/zend-file": ">=2.3", "phpunit/PHPUnit": ">=3.7", - "zendframework/zend-developer-tools": "dev-master", - "unicaen/unicaen-code": "dev-trunk" + "zendframework/zend-developer-tools": "dev-master" } } diff --git a/composer.lock b/composer.lock index 8165781c9cd1664f05c0cdfff3c6f6369697f19e..3a2097532b29a36fbb54239c7483aff642007d10 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "fd8b6adcbbd24ebb7bc8d3175561c54b", - "content-hash": "54e4156169f7da59e3e2ca2363511a25", + "hash": "fafdbae55d771b0f786e71d51911cd12", + "content-hash": "3bb8f2fba1529d939e569e09276fa188", "packages": [ { "name": "bjyoungblood/bjy-authorize", @@ -1066,16 +1066,16 @@ }, { "name": "symfony/console", - "version": "v3.0.1", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "ebcdc507829df915f4ca23067bd59ee4ef61f6c3" + "reference": "5a02eaadaa285e2bb727eb6bbdfb8201fcd971b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/ebcdc507829df915f4ca23067bd59ee4ef61f6c3", - "reference": "ebcdc507829df915f4ca23067bd59ee4ef61f6c3", + "url": "https://api.github.com/repos/symfony/console/zipball/5a02eaadaa285e2bb727eb6bbdfb8201fcd971b0", + "reference": "5a02eaadaa285e2bb727eb6bbdfb8201fcd971b0", "shasum": "" }, "require": { @@ -1122,7 +1122,7 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2015-12-22 10:39:06" + "time": "2016-02-02 13:44:19" }, { "name": "symfony/polyfill-mbstring", @@ -1238,7 +1238,7 @@ "source": { "type": "svn", "url": "https://svn.unicaen.fr/svn/UnicaenApp", - "reference": "/trunk/@676" + "reference": "/trunk/@681" }, "require": { "doctrine/doctrine-orm-module": ">=0.7", @@ -1288,7 +1288,7 @@ "source": { "type": "svn", "url": "https://svn.unicaen.fr/svn/UnicaenAuth", - "reference": "/trunk/@263" + "reference": "/trunk/@265" }, "require": { "bjyoungblood/bjy-authorize": ">=1.4", @@ -1311,6 +1311,31 @@ }, "description": "Module d'authentification pour les applis ZF2 de l'UCBN" }, + { + "name": "unicaen/unicaen-code", + "version": "dev-trunk", + "source": { + "type": "svn", + "url": "https://svn.unicaen.fr/svn/UnicaenCode", + "reference": "/trunk/@28" + }, + "require-dev": { + "phpunit/phpunit": ">=3.7", + "zendframework/zend-developer-tools": "dev-master", + "zendframework/zend-test": ">=2.2" + }, + "type": "library", + "autoload": { + "psr-0": { + "UnicaenCode": "src/", + "UnicaenCodeTest": "tests/" + }, + "classmap": [ + "./Module.php" + ] + }, + "description": "Boite à outils pour la programmation avec la bibliothèque Unicaen" + }, { "name": "zendframework/zend-authentication", "version": "2.4.9", @@ -1791,6 +1816,60 @@ ], "time": "2015-05-07 14:55:31" }, + { + "name": "zendframework/zend-file", + "version": "2.4.9", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-file.git", + "reference": "eafa689f26fdaaa8569b1cbe927fc5d75ca802b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-file/zipball/eafa689f26fdaaa8569b1cbe927fc5d75ca802b2", + "reference": "eafa689f26fdaaa8569b1cbe927fc5d75ca802b2", + "shasum": "" + }, + "require": { + "php": ">=5.3.23", + "zendframework/zend-stdlib": "self.version" + }, + "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "dev-master", + "zendframework/zend-filter": "self.version", + "zendframework/zend-i18n": "self.version", + "zendframework/zend-validator": "self.version" + }, + "suggest": { + "zendframework/zend-filter": "Zend\\Filter component", + "zendframework/zend-i18n": "Zend\\I18n component", + "zendframework/zend-validator": "Zend\\Validator component" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4-dev", + "dev-develop": "2.5-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\File\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "homepage": "https://github.com/zendframework/zend-file", + "keywords": [ + "file", + "zf2" + ], + "time": "2015-05-07 14:55:31" + }, { "name": "zendframework/zend-filter", "version": "2.4.9", @@ -2721,26 +2800,25 @@ }, { "name": "zendframework/zend-permissions-acl", - "version": "2.5.1", + "version": "2.6.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-permissions-acl.git", - "reference": "7f1aac3bf99d0be8f71fe4ae79981338be8a08dc" + "reference": "843bbd9c6f6d20b84dd0ce6c815d10397e98082b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-permissions-acl/zipball/7f1aac3bf99d0be8f71fe4ae79981338be8a08dc", - "reference": "7f1aac3bf99d0be8f71fe4ae79981338be8a08dc", + "url": "https://api.github.com/repos/zendframework/zend-permissions-acl/zipball/843bbd9c6f6d20b84dd0ce6c815d10397e98082b", + "reference": "843bbd9c6f6d20b84dd0ce6c815d10397e98082b", "shasum": "" }, "require": { - "php": ">=5.3.23" + "php": "^5.5 || ^7.0" }, "require-dev": { "fabpot/php-cs-fixer": "1.7.*", "phpunit/phpunit": "~4.0", - "zendframework/zend-di": "~2.5", - "zendframework/zend-servicemanager": "~2.5" + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3" }, "suggest": { "zendframework/zend-servicemanager": "To support Zend\\Permissions\\Acl\\Assertion\\AssertionManager plugin manager usage" @@ -2748,8 +2826,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" + "dev-master": "2.6-dev", + "dev-develop": "2.7-dev" } }, "autoload": { @@ -2767,7 +2845,7 @@ "acl", "zf2" ], - "time": "2015-06-03 15:32:02" + "time": "2016-02-03 21:46:45" }, { "name": "zendframework/zend-serializer", @@ -3467,22 +3545,24 @@ }, { "name": "phpspec/prophecy", - "version": "v1.5.0", + "version": "v1.6.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7" + "reference": "3c91bdf81797d725b14cb62906f9a4ce44235972" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4745ded9307786b730d7a60df5cb5a6c43cf95f7", - "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/3c91bdf81797d725b14cb62906f9a4ce44235972", + "reference": "3c91bdf81797d725b14cb62906f9a4ce44235972", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", "phpdocumentor/reflection-docblock": "~2.0", - "sebastian/comparator": "~1.1" + "sebastian/comparator": "~1.1", + "sebastian/recursion-context": "~1.0" }, "require-dev": { "phpspec/phpspec": "~2.0" @@ -3490,7 +3570,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "1.5.x-dev" } }, "autoload": { @@ -3523,7 +3603,7 @@ "spy", "stub" ], - "time": "2015-08-13 10:07:40" + "time": "2016-02-15 07:46:21" }, { "name": "phpunit/php-code-coverage", @@ -3767,16 +3847,16 @@ }, { "name": "phpunit/phpunit", - "version": "4.8.21", + "version": "4.8.23", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "ea76b17bced0500a28098626b84eda12dbcf119c" + "reference": "6e351261f9cd33daf205a131a1ba61c6d33bd483" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ea76b17bced0500a28098626b84eda12dbcf119c", - "reference": "ea76b17bced0500a28098626b84eda12dbcf119c", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6e351261f9cd33daf205a131a1ba61c6d33bd483", + "reference": "6e351261f9cd33daf205a131a1ba61c6d33bd483", "shasum": "" }, "require": { @@ -3835,7 +3915,7 @@ "testing", "xunit" ], - "time": "2015-12-12 07:45:58" + "time": "2016-02-11 14:56:33" }, { "name": "phpunit/phpunit-mock-objects", @@ -4266,16 +4346,16 @@ }, { "name": "symfony/yaml", - "version": "v3.0.1", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "3df409958a646dad2bc5046c3fb671ee24a1a691" + "reference": "3cf0709d7fe936e97bee9e954382e449003f1d9a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/3df409958a646dad2bc5046c3fb671ee24a1a691", - "reference": "3df409958a646dad2bc5046c3fb671ee24a1a691", + "url": "https://api.github.com/repos/symfony/yaml/zipball/3cf0709d7fe936e97bee9e954382e449003f1d9a", + "reference": "3cf0709d7fe936e97bee9e954382e449003f1d9a", "shasum": "" }, "require": { @@ -4311,32 +4391,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2015-12-26 13:39:53" - }, - { - "name": "unicaen/unicaen-code", - "version": "dev-trunk", - "source": { - "type": "svn", - "url": "https://svn.unicaen.fr/svn/UnicaenCode", - "reference": "/trunk/@28" - }, - "require-dev": { - "phpunit/phpunit": ">=3.7", - "zendframework/zend-developer-tools": "dev-master", - "zendframework/zend-test": ">=2.2" - }, - "type": "library", - "autoload": { - "psr-0": { - "UnicaenCode": "src/", - "UnicaenCodeTest": "tests/" - }, - "classmap": [ - "./Module.php" - ] - }, - "description": "Boite à outils pour la programmation avec la bibliothèque Unicaen" + "time": "2016-02-02 13:44:19" }, { "name": "zendframework/zend-debug", @@ -4501,60 +4556,6 @@ ], "time": "2015-05-07 14:55:31" }, - { - "name": "zendframework/zend-file", - "version": "2.4.9", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-file.git", - "reference": "eafa689f26fdaaa8569b1cbe927fc5d75ca802b2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-file/zipball/eafa689f26fdaaa8569b1cbe927fc5d75ca802b2", - "reference": "eafa689f26fdaaa8569b1cbe927fc5d75ca802b2", - "shasum": "" - }, - "require": { - "php": ">=5.3.23", - "zendframework/zend-stdlib": "self.version" - }, - "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master", - "zendframework/zend-filter": "self.version", - "zendframework/zend-i18n": "self.version", - "zendframework/zend-validator": "self.version" - }, - "suggest": { - "zendframework/zend-filter": "Zend\\Filter component", - "zendframework/zend-i18n": "Zend\\I18n component", - "zendframework/zend-validator": "Zend\\Validator component" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" - } - }, - "autoload": { - "psr-4": { - "Zend\\File\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "homepage": "https://github.com/zendframework/zend-file", - "keywords": [ - "file", - "zf2" - ], - "time": "2015-05-07 14:55:31" - }, { "name": "zendframework/zend-test", "version": "2.4.9", @@ -4621,8 +4622,8 @@ "unicaen/unicaen-app": 20, "unicaen/unicaen-auth": 20, "bjyoungblood/bjy-authorize": 20, - "zendframework/zend-developer-tools": 20, - "unicaen/unicaen-code": 20 + "unicaen/unicaen-code": 20, + "zendframework/zend-developer-tools": 20 }, "prefer-stable": false, "prefer-lowest": false, diff --git a/data/Sql/intervenant changement statut.sql b/data/Sql/intervenant changement statut.sql index 3d7db4d0bcb24ec15cdcbec97c83e169be4af552..834022455341d545d832cda1843eb6ed280165fc 100644 --- a/data/Sql/intervenant changement statut.sql +++ b/data/Sql/intervenant changement statut.sql @@ -2,7 +2,10 @@ select * from intervenant where id = 3679; select * from intervenant where source_code = '34424' AND annee_id = 2014; -update intervenant set statut_id = 4, type_id=1 WHERE id = 3681; +update intervenant set statut_id = 19 WHERE id = 6896; +update intervenant set statut_id = 19 WHERE id = 9186; + + select * from statut_intervenant; select * from type_intervenant; \ No newline at end of file diff --git a/module/Application/src/Application/Form/OffreFormation/ElementPedagogiqueSaisie.php b/module/Application/src/Application/Form/OffreFormation/ElementPedagogiqueSaisie.php index c81d3a94291b737068078d4f3125679cee8f9fe1..66c774dff584f19db39bd7297cfd2963a24ad14d 100644 --- a/module/Application/src/Application/Form/OffreFormation/ElementPedagogiqueSaisie.php +++ b/module/Application/src/Application/Form/OffreFormation/ElementPedagogiqueSaisie.php @@ -2,6 +2,8 @@ namespace Application\Form\OffreFormation; +use Application\Filter\FloatFromString; +use Application\Filter\StringFromFloat; use Application\Form\AbstractForm; use Application\Service\Traits\EtapeAwareTrait; use Application\Service\Traits\LocalContextAwareTrait; @@ -89,7 +91,7 @@ class ElementPedagogiqueSaisie extends AbstractForm $this->add([ 'name' => 'taux-fc', 'options' => [ - 'label' => 'Taux FC', + 'label' => 'FC (%)', ], 'attributes' => [ 'title' => "Taux de formation continue", @@ -104,7 +106,7 @@ class ElementPedagogiqueSaisie extends AbstractForm $this->add([ 'name' => 'taux-fi', 'options' => [ - 'label' => 'Taux FI', + 'label' => 'FI (%)', ], 'attributes' => [ 'title' => "Taux de formation initiale", @@ -119,7 +121,7 @@ class ElementPedagogiqueSaisie extends AbstractForm $this->add([ 'name' => 'taux-fa', 'options' => [ - 'label' => 'Taux FA', + 'label' => 'FA (%)', ], 'attributes' => [ 'title' => "Taux de formation en apprentissage", @@ -196,22 +198,19 @@ class ElementPedagogiqueSaisie extends AbstractForm 'taux-fc' => [ 'required' => true, 'filters' => [ - ['name' => 'Zend\Filter\StringTrim'], - new \Zend\Filter\PregReplace(['pattern' => '/,/', 'replacement' => '.']), + ['name' => FloatFromString::class], ], ], 'taux-fi' => [ 'required' => true, 'filters' => [ - ['name' => 'Zend\Filter\StringTrim'], - new \Zend\Filter\PregReplace(['pattern' => '/,/', 'replacement' => '.']), + ['name' => FloatFromString::class], ], ], 'taux-fa' => [ 'required' => true, 'filters' => [ - ['name' => 'Zend\Filter\StringTrim'], - new \Zend\Filter\PregReplace(['pattern' => '/,/', 'replacement' => '.']), + ['name' => FloatFromString::class], ], ], 'source-code' => [ @@ -265,12 +264,12 @@ class ElementPedagogiqueSaisieHydrator implements HydratorInterface $object->setEtape($this->getServiceEtape()->get($data['etape'])); $object->setPeriode($this->getServicePeriode()->get($data['periode'])); $object->setTauxFoad((float)$data['taux-foad']); - $object->setTauxFc((float)$data['taux-fc']); - $object->setTauxFi((float)$data['taux-fi']); - $object->setTauxFa((float)$data['taux-fa']); - $object->setFc((float)$data['taux-fc'] > 0); - $object->setFi((float)$data['taux-fi'] > 0); - $object->setFa((float)$data['taux-fa'] > 0); + $object->setTauxFc(FloatFromString::run($data['taux-fc']) / 100); + $object->setTauxFi(FloatFromString::run($data['taux-fi']) / 100); + $object->setTauxFa(FloatFromString::run($data['taux-fa']) / 100); + $object->setFc(FloatFromString::run($data['taux-fc']) > 0); + $object->setFi(FloatFromString::run($data['taux-fi']) > 0); + $object->setFa(FloatFromString::run($data['taux-fa']) > 0); $object->setStructure($this->getServiceStructure()->get($data['structure'])); return $object; @@ -295,9 +294,9 @@ class ElementPedagogiqueSaisieHydrator implements HydratorInterface 'periode' => ($p = $object->getPeriode()) ? $p->getId() : null, 'taux-foad' => $object->getTauxFoad(), 'structure' => ($s = $object->getStructure()) ? $s->getId() : null, - 'taux-fc' => $object->getTauxFc(), - 'taux-fi' => $object->getTauxFi(), - 'taux-fa' => $object->getTauxFa(), + 'taux-fc' => StringFromFloat::run($object->getTauxFc() * 100), + 'taux-fi' => StringFromFloat::run($object->getTauxFi() * 100), + 'taux-fa' => StringFromFloat::run($object->getTauxFa() * 100), ]; return $data; diff --git a/module/Application/view/application/offre-formation/element-pedagogique/saisir.phtml b/module/Application/view/application/offre-formation/element-pedagogique/saisir.phtml index c7705e200e7c3b29e38a92a6555e64b0526244c2..058ba22f601ea84bc8c3aa40c65d2d7a097f84eb 100644 --- a/module/Application/view/application/offre-formation/element-pedagogique/saisir.phtml +++ b/module/Application/view/application/offre-formation/element-pedagogique/saisir.phtml @@ -1,5 +1,9 @@ <?php +/** + * @var $this \Application\View\Renderer\PhpRenderer + */ + /* @var $form \Application\Form\OffreFormation\ElementPedagogiqueSaisie */ /* @var $errors array */ @@ -49,19 +53,19 @@ if ($errors) { echo $this->formControlGroup($form->get('taux-foad')); ?> </div> - <div class="col-sm-2"> + <div class="col-sm-2" style="white-space: nowrap"> <?php - echo $this->formControlGroup($form->get('taux-fi'), 'FormNumber'); + echo $this->formControlGroup($form->get('taux-fi')); ?> </div> <div class="col-sm-2"> <?php - echo $this->formControlGroup($form->get('taux-fc'), 'FormNumber'); + echo $this->formControlGroup($form->get('taux-fc')); ?> </div> <div class="col-sm-2"> <?php - echo $this->formControlGroup($form->get('taux-fa'), 'FormNumber'); + echo $this->formControlGroup($form->get('taux-fa')); ?> </div> <div class="col-sm-4">