Loading module/StepStar/Module.php +2 −1 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ class Module implements ConsoleBannerProviderInterface, ConsoleUsageProviderInte { // Nom du module const NAME = __NAMESPACE__; const STEP_STAR__CONSOLE_ROUTE__ENVOYER_THESES = 'step-star:envoyer-theses'; public function getConfig() { Loading Loading @@ -64,7 +65,7 @@ class Module implements ConsoleBannerProviderInterface, ConsoleUsageProviderInte /** * @see EnvoiConsoleController::envoyerThesesAction() */ STEP_STAR__CONSOLE_ROUTE__ENVOYER_THESES . ' [--these=<id>] [--etat=<etat>] [--etablissement=<etab>] [--force]' => self::STEP_STAR__CONSOLE_ROUTE__ENVOYER_THESES . ' [--these=<id>] [--etat=<etat>] [--etablissement=<etab>] [--force]' => "Pour chaque thèse spécifiée, génère le fichier XML intermédiaire puis le fichier TEF puis envoie ce dernier vers STEP/STAR.", [ '<id>', "Ids des thèses concernées, séparées par une virgule.", "Facultatif"], [ '<etat>', "États des thèses, séparés par une virgule, ex : 'E,S'.", "Facultatif"], Loading module/StepStar/config/module.config.php +1 −3 Original line number Diff line number Diff line Loading @@ -47,8 +47,6 @@ use StepStar\Service\Zip\ZipService; use StepStar\Service\Zip\ZipServiceFactory; use UnicaenAuth\Guard\PrivilegeController; const STEP_STAR__CONSOLE_ROUTE__ENVOYER_THESES = 'step-star:envoyer-theses'; return [ 'step_star' => [ 'xml' => [ Loading Loading @@ -306,7 +304,7 @@ return [ 'envoyer-theses' => [ 'type' => Simple::class, 'options' => [ 'route' => STEP_STAR__CONSOLE_ROUTE__ENVOYER_THESES . ' [--these=] [--etat=] [--etablissement=] [--force]', 'route' => Module::STEP_STAR__CONSOLE_ROUTE__ENVOYER_THESES . ' [--these=] [--etat=] [--etablissement=] [--force]', 'defaults' => [ /** * @see EnvoiConsoleController::envoyerThesesAction() Loading module/StepStar/src/StepStar/Controller/Envoi/EnvoiConsoleController.php +1 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ class EnvoiConsoleController extends AbstractConsoleController throw new InvalidArgumentException("Aucune these trouvee avec les criteres specifies"); } $this->envoiFacade->setSaveLog(true); $this->envoiFacade->setSaveLogs(true); $logs = $this->envoiFacade->envoyerTheses($theses, $force, $command); /** @var \StepStar\Entity\Db\Log $log */ Loading module/StepStar/src/StepStar/Controller/Envoi/EnvoiController.php +10 −27 Original line number Diff line number Diff line Loading @@ -17,9 +17,6 @@ class EnvoiController extends AbstractController private EnvoiForm $envoiForm; /** * @param \StepStar\Form\EnvoiForm $envoiForm */ public function setEnvoiForm(EnvoiForm $envoiForm): void { $this->envoiForm = $envoiForm; Loading @@ -28,10 +25,12 @@ class EnvoiController extends AbstractController /** * Action pour envoyer plusieurs theses vers STEP/STAR. */ public function envoyerThesesAction(): array public function envoyerThesesAction() { if ($this->getRequest()->isPost()) { $this->envoiForm->setData($this->getRequest()->getPost()); $request = $this->getRequest(); if ($request->isPost()) { $data = $request->getPost(); $this->envoiForm->setData($data); if ($this->envoiForm->isValid()) { $command = $this->getRequest()->getUriString(); Loading @@ -46,38 +45,22 @@ class EnvoiController extends AbstractController $this->flashMessenger()->addErrorMessage("Aucune these trouvee avec les criteres specifies"); } /** * 04/08/2022 * * Tant que le bug #4371 n'est pas corrigé dans la lib Saxon/C, l'envoi depuis l'IHM ne peut pas fonctionner. * * @see https://www.saxonica.com/saxon-c/documentation1.2/index.html#!starting/installingphp : * "There is currently an outstanding bug in the Saxon/C 1.2 PHP extension (See bug issue #4371) * which causes the browser to hang wen running a PHP script with Saxon/C code. * Please replace the file php7_saxon.cpp with the this patched verson: php7_saxon.cpp" * * @see https://saxonica.plan.io/issues/4371 */ $this->envoiFacade->setSaveLog(false); $this->envoiFacade->setSaveLogs(true); $logs = $this->envoiFacade->envoyerTheses($theses, $force, $command); /** @var \StepStar\Entity\Db\Log $log */ foreach ($logs as $log) { if ($log->isSuccess()) { $this->flashMessenger()->addSuccessMessage($log->getLog()); $this->flashMessenger()->addSuccessMessage($log->getLogToHtml()); } else { $this->flashMessenger()->addErrorMessage($log->getLog()); $this->flashMessenger()->addErrorMessage($log->getLogToHtml()); } } return $this->redirect()->refresh(); } } $this->flashMessenger()->addErrorMessage( ":-( Tant que le bug <a href='https://saxonica.plan.io/issues/4371'>#4371</a> n'est pas corrigé dans la lib Saxon/C, l'envoi d'une thèse depuis cette page est impossible, désolé." ); $this->envoiForm->get('submit')->setAttribute('disabled', true); return [ 'form' => $this->envoiForm, ]; Loading module/StepStar/src/StepStar/Entity/Db/Log.php +1 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ class Log private string $command; private ?string $tefFileContentHash; private ?string $tefFileContent; private bool $success; private bool $success = false; private string $log = ''; private DateTime $startedOn; private DateTime $endedOn; Loading Loading
module/StepStar/Module.php +2 −1 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ class Module implements ConsoleBannerProviderInterface, ConsoleUsageProviderInte { // Nom du module const NAME = __NAMESPACE__; const STEP_STAR__CONSOLE_ROUTE__ENVOYER_THESES = 'step-star:envoyer-theses'; public function getConfig() { Loading Loading @@ -64,7 +65,7 @@ class Module implements ConsoleBannerProviderInterface, ConsoleUsageProviderInte /** * @see EnvoiConsoleController::envoyerThesesAction() */ STEP_STAR__CONSOLE_ROUTE__ENVOYER_THESES . ' [--these=<id>] [--etat=<etat>] [--etablissement=<etab>] [--force]' => self::STEP_STAR__CONSOLE_ROUTE__ENVOYER_THESES . ' [--these=<id>] [--etat=<etat>] [--etablissement=<etab>] [--force]' => "Pour chaque thèse spécifiée, génère le fichier XML intermédiaire puis le fichier TEF puis envoie ce dernier vers STEP/STAR.", [ '<id>', "Ids des thèses concernées, séparées par une virgule.", "Facultatif"], [ '<etat>', "États des thèses, séparés par une virgule, ex : 'E,S'.", "Facultatif"], Loading
module/StepStar/config/module.config.php +1 −3 Original line number Diff line number Diff line Loading @@ -47,8 +47,6 @@ use StepStar\Service\Zip\ZipService; use StepStar\Service\Zip\ZipServiceFactory; use UnicaenAuth\Guard\PrivilegeController; const STEP_STAR__CONSOLE_ROUTE__ENVOYER_THESES = 'step-star:envoyer-theses'; return [ 'step_star' => [ 'xml' => [ Loading Loading @@ -306,7 +304,7 @@ return [ 'envoyer-theses' => [ 'type' => Simple::class, 'options' => [ 'route' => STEP_STAR__CONSOLE_ROUTE__ENVOYER_THESES . ' [--these=] [--etat=] [--etablissement=] [--force]', 'route' => Module::STEP_STAR__CONSOLE_ROUTE__ENVOYER_THESES . ' [--these=] [--etat=] [--etablissement=] [--force]', 'defaults' => [ /** * @see EnvoiConsoleController::envoyerThesesAction() Loading
module/StepStar/src/StepStar/Controller/Envoi/EnvoiConsoleController.php +1 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ class EnvoiConsoleController extends AbstractConsoleController throw new InvalidArgumentException("Aucune these trouvee avec les criteres specifies"); } $this->envoiFacade->setSaveLog(true); $this->envoiFacade->setSaveLogs(true); $logs = $this->envoiFacade->envoyerTheses($theses, $force, $command); /** @var \StepStar\Entity\Db\Log $log */ Loading
module/StepStar/src/StepStar/Controller/Envoi/EnvoiController.php +10 −27 Original line number Diff line number Diff line Loading @@ -17,9 +17,6 @@ class EnvoiController extends AbstractController private EnvoiForm $envoiForm; /** * @param \StepStar\Form\EnvoiForm $envoiForm */ public function setEnvoiForm(EnvoiForm $envoiForm): void { $this->envoiForm = $envoiForm; Loading @@ -28,10 +25,12 @@ class EnvoiController extends AbstractController /** * Action pour envoyer plusieurs theses vers STEP/STAR. */ public function envoyerThesesAction(): array public function envoyerThesesAction() { if ($this->getRequest()->isPost()) { $this->envoiForm->setData($this->getRequest()->getPost()); $request = $this->getRequest(); if ($request->isPost()) { $data = $request->getPost(); $this->envoiForm->setData($data); if ($this->envoiForm->isValid()) { $command = $this->getRequest()->getUriString(); Loading @@ -46,38 +45,22 @@ class EnvoiController extends AbstractController $this->flashMessenger()->addErrorMessage("Aucune these trouvee avec les criteres specifies"); } /** * 04/08/2022 * * Tant que le bug #4371 n'est pas corrigé dans la lib Saxon/C, l'envoi depuis l'IHM ne peut pas fonctionner. * * @see https://www.saxonica.com/saxon-c/documentation1.2/index.html#!starting/installingphp : * "There is currently an outstanding bug in the Saxon/C 1.2 PHP extension (See bug issue #4371) * which causes the browser to hang wen running a PHP script with Saxon/C code. * Please replace the file php7_saxon.cpp with the this patched verson: php7_saxon.cpp" * * @see https://saxonica.plan.io/issues/4371 */ $this->envoiFacade->setSaveLog(false); $this->envoiFacade->setSaveLogs(true); $logs = $this->envoiFacade->envoyerTheses($theses, $force, $command); /** @var \StepStar\Entity\Db\Log $log */ foreach ($logs as $log) { if ($log->isSuccess()) { $this->flashMessenger()->addSuccessMessage($log->getLog()); $this->flashMessenger()->addSuccessMessage($log->getLogToHtml()); } else { $this->flashMessenger()->addErrorMessage($log->getLog()); $this->flashMessenger()->addErrorMessage($log->getLogToHtml()); } } return $this->redirect()->refresh(); } } $this->flashMessenger()->addErrorMessage( ":-( Tant que le bug <a href='https://saxonica.plan.io/issues/4371'>#4371</a> n'est pas corrigé dans la lib Saxon/C, l'envoi d'une thèse depuis cette page est impossible, désolé." ); $this->envoiForm->get('submit')->setAttribute('disabled', true); return [ 'form' => $this->envoiForm, ]; Loading
module/StepStar/src/StepStar/Entity/Db/Log.php +1 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ class Log private string $command; private ?string $tefFileContentHash; private ?string $tefFileContent; private bool $success; private bool $success = false; private string $log = ''; private DateTime $startedOn; private DateTime $endedOn; Loading