Commit 70b75bf6 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Abandon de l'extraction du numéro étudiant à partir du source_code.

parent 60996da7
Loading
Loading
Loading
Loading
+0 −17
Original line number Diff line number Diff line
@@ -2,12 +2,8 @@

namespace Application\Controller;

use Application\Command\MergeCommand;
use Application\Command\TruncateAndMergeCommand;
use Application\Entity\Db\Attestation;
use Application\Entity\Db\Diffusion;
use Application\Entity\Db\Doctorant;
use Application\Entity\Db\Etablissement;
use Application\Entity\Db\Fichier;
use Application\Entity\Db\Individu;
use Application\Entity\Db\MailConfirmation;
@@ -15,7 +11,6 @@ use Application\Entity\Db\MetadonneeThese;
use Application\Entity\Db\NatureFichier;
use Application\Entity\Db\RdvBu;
use Application\Entity\Db\Role;
use Application\Entity\Db\Structure;
use Application\Entity\Db\These;
use Application\Entity\Db\TypeValidation;
use Application\Entity\Db\Variable;
@@ -54,11 +49,9 @@ use UnicaenApp\Exception\RuntimeException;
use UnicaenApp\Service\EntityManagerAwareTrait;
use UnicaenApp\Service\MessageCollectorAwareTrait;
use UnicaenApp\Traits\MessageAwareInterface;
use UnicaenApp\Util;
use Zend\Form\Element\Hidden;
use Zend\Form\Element\Radio;
use Zend\Form\Element\Submit;
use Zend\Form\Element\Text;
use Zend\Form\Form;
use Zend\Http\Response;
use Zend\InputFilter\InputFilter;
@@ -128,10 +121,6 @@ class TheseController extends AbstractController
            ->setItemCountPerPage((int)$maxi)
            ->setCurrentPageNumber((int)$page);

        $numeroEtudiantExtractor = function(Doctorant $doctorant) {
            return $this->sourceCodeStringHelper->removePrefixFrom($doctorant->getSourceCode());
        };

        return new ViewModel([
            'theses'                => $paginator,
            'text'                  => $text,
@@ -139,7 +128,6 @@ class TheseController extends AbstractController
            'displayEtablissement'  => !$etablissement,
            'displayDateSoutenance' => $etatThese === These::ETAT_SOUTENUE || !$etatThese,
            'etatThese'             => $etatThese,
            'numeroEtudiantExtractor' => $numeroEtudiantExtractor,
        ]);
    }

@@ -227,10 +215,6 @@ class TheseController extends AbstractController
        $rattachements = null;
        if ($unite !== null) $rattachements = $this->getUniteRechercheService()->findEtablissementRattachement($unite);

        $numeroEtudiantExtractor = function(Doctorant $doctorant) {
            return $this->sourceCodeStringHelper->removePrefixFrom($doctorant->getSourceCode());
        };

        //TODO JP remplacer dans modifierPersopassUrl();
        $urlModification = $this->url()->fromRoute('doctorant/modifier-persopass',['back' => 1, 'doctorant' => $these->getDoctorant()->getId()], [], true);

@@ -255,7 +239,6 @@ class TheseController extends AbstractController
            'etatMailContact'           => $etatMailContact,
            'rattachements'             => $rattachements,
            'validationsDesCorrectionsEnAttente' => $validationsDesCorrectionsEnAttente,
            'numeroEtudiantExtractor'   => $numeroEtudiantExtractor,
        ]);
        $view->setTemplate('application/these/identite');

+10 −0
Original line number Diff line number Diff line
@@ -102,6 +102,16 @@ class Doctorant implements DoctorantInterface, HistoriqueAwareInterface, Resourc
        return $this->id;
    }

    /**
     * Get numeroEtudiant
     *
     * @return string
     */
    public function getNumeroEtudiant()
    {
        return $this->getIndividu()->getSupannId(); // todo: à remplacer par $this->>numeroEtudiant lorsqu'il sera importé.
    }

    /**
     * Set dateNaissance
     *
+1 −2
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ use Application\View\Renderer\PhpRenderer;
 * @var string       $mailContact
 * @var string       $etatMailContact
 * @var Validation[] $validationsDesCorrectionsEnAttente
 * @var callable     $numeroEtudiantExtractor
 *
 * @see TheseController::detailIdentiteAction()
 */
@@ -94,7 +93,7 @@ $financementFormatter->setDisplayAs(FinancementFormatter::DISPLAY_AS_LINE);
                <strong>
                    <?php echo $this->translate("N° étudiant :"); ?>
                </strong>
                <?php echo $numeroEtudiantExtractor($these->getDoctorant()) ?> <br>
                <?php echo $these->getDoctorant()->getNumeroEtudiant() ?> <br>

                <strong>
                    <?php echo $this->translate("Adresse électronique :"); ?>
+2 −3
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@ use Zend\Paginator\Paginator;
 * @var Role        $roleDirecteurThese
 * @var bool        $displayEtablissement
 * @var bool        $displayDateSoutenance
 * @var callable    $numeroEtudiantExtractor
 *
 * @see \Application\Controller\TheseController::indexAction()
 */
@@ -136,7 +135,7 @@ $acteursFormatterCodirecteurs->asSeparated()
                <td>
                    <span title="<?php echo $these->getTitre() ?>">
                        <a href="<?php echo $this->url('these/identite', ['these' => $these->getId()], [], true) ?>">
                            <?php echo $this->partial('application/these/partial/titre', ['these' => $these, 'useTitreThese' => true, 'numeroEtudiantExtractor' => $numeroEtudiantExtractor]) ?>
                            <?php echo $this->partial('application/these/partial/titre', ['these' => $these, 'useTitreThese' => true]) ?>
                        </a>
                    </span>
                </td>
@@ -152,7 +151,7 @@ $acteursFormatterCodirecteurs->asSeparated()
                    }
                ?>
                <td><?php echo $these->getEtatThese() ?></td>
                <td><?php echo $numeroEtudiantExtractor($these->getDoctorant()) ?></td>
                <td><?php echo $these->getDoctorant()->getNumeroEtudiant() ?></td>
                <td><?php echo $these->getDoctorant()->getIndividu()->getNomComplet() ?></td>
                <td class="acteurs">

+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ $acteursFormatter = new ActeursFormatter();
        <td>
            <?php echo $these->getDoctorant()->getNomComplet(true, true, true) ?>
            (<?php echo $these->getDoctorant()->getDateNaissanceToString() ?>) <br>
<?php echo $these->getDoctorant()->getIndividu()->getSupannId() ?> <br>
<?php echo $these->getDoctorant()->getNumeroEtudiant() ?> <br>
            Nationalité: <?php echo $these->getDoctorant()->getNationalite() ?>
        </td>
    </tr>