Commit 4cbc7e8d authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Merge branch 'hotfix_PV_signature' into ModuleFormation

parents 932452da a65cc9be
Loading
Loading
Loading
Loading
+2 −2
Changes for doc/release-notes/v2.2.1.md: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
# Version 2.2.0
# Version 2.2.1

## 1. Sur le serveur d'application

@@ -6,7 +6,7 @@
  pour installer la nouvelle version :

```bash
git fetch --tags && git checkout --force 2.2.0 && bash ./install.sh
git fetch --tags && git checkout --force 2.2.1 && bash ./install.sh
```

- Selon le moteur PHP que vous avez installé, rechargez le service, exemple :
+87
Changes for doc/release-notes/v2.2.2.md: 87 added lines, 0 removed lines.
Original line number Diff line number Diff line
# Version 2.2.2

## 1. Sur le serveur d'application

- Placez-vous dans le répertoire de l'application puis lancez la commande suivante
  pour installer la nouvelle version :

```bash
git fetch --tags && git checkout --force 2.2.2 && bash ./install.sh
```

- Selon le moteur PHP que vous avez installé, rechargez le service, exemple :
    - php7.3-fpm         : `service php7.3-fpm reload`
    - apache2-mod-php7.3 : `service apache2 reload`

## 2. Dans la base de données

```sql
create table USER_TOKEN
(
  ID NUMBER not null
    constraint USER_TOKEN_PK
      primary key,
  USER_ID NUMBER not null,
  TOKEN VARCHAR2(256) not null,
  ACTION VARCHAR2(256),
  ACTIONS_COUNT NUMBER default 0 not null,
  ACTIONS_MAX_COUNT NUMBER default 0 not null,
  CREATED_ON DATE default sysdate not null,
  EXPIRED_ON DATE not null,
  LAST_USED_ON DATE
)
;
comment on table USER_TOKEN is 'Jetons d''authentification utilisateur'
;
comment on column USER_TOKEN.USER_ID is 'Identifiant unique de l''utilisateur'
;
comment on column USER_TOKEN.TOKEN is 'Le jeton !'
;
comment on column USER_TOKEN.ACTION is 'Spécification de l''action précise autorisée, le cas échéant'
;
comment on column USER_TOKEN.ACTIONS_COUNT is 'Nombre d''utilisation du jeton'
;
comment on column USER_TOKEN.ACTIONS_MAX_COUNT is 'Nombre maximum d''utilisations du jeton autorisée (0 = pas de limite)'
;
comment on column USER_TOKEN.CREATED_ON is 'Date de création du jeton'
;
comment on column USER_TOKEN.EXPIRED_ON is 'Date d''expiration du jeton'
;
comment on column USER_TOKEN.LAST_USED_ON is 'Date de dernière utilisation du jeton'
;

create unique index USER_TOKEN_USER_ACTION_UN
  on USER_TOKEN (USER_ID, ACTION)
;

create sequence user_token_id_seq
;

insert into CATEGORIE_PRIVILEGE(ID, CODE, LIBELLE, ORDRE)
values (CATEGORIE_PRIVILEGE_ID_SEQ.nextval, 'unicaen-auth-token', 'Jetons utilisateur', 10)
;

insert into PRIVILEGE(ID, CATEGORIE_ID, CODE, LIBELLE, ORDRE)
with d(ordre, code, lib) as (
  select 10, 'lister', 'Lister les jetons utilisateur' from dual union
  select 20, 'consulter', 'Consulter un jeton utilisateur' from dual union
  select 30, 'creer', 'Créer un jeton utilisateur' from dual union
  select 40, 'modifier', 'Modifier un jeton utilisateur' from dual union
  select 50, 'prolonger', 'Prolonger un jeton utilisateur' from dual union
  select 60, 'supprimer', 'Supprimer un jeton utilisateur' from dual union
  select 70, 'tester', 'Tester un jeton utilisateur' from dual
)
select privilege_id_seq.nextval, cp.id, d.code, d.lib, d.ordre
from d
       join CATEGORIE_PRIVILEGE cp on cp.CODE = 'unicaen-auth-token'
;

----->
-----> Pensez ensuite à accorder les privilèges dans Administration > Droits d'accès > Gestion des profils.
----->
```

## 3. Dans l'application SyGAL

Pensez maintenant à vous rendre dans SyGAL sur la page "Droits d'accès > Profils" pour accorder les nouveaux
privilèges de la catégorie "Rapports d'activité" aux profils concernés : Doctorant, MDD, ED, etc.
+200
Changes for module/Application/view/application/rapport/rapport-activite/consulter.phtml: 200 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?php

namespace Application;

use Application\Entity\Db\Rapport;
use Application\Entity\Db\These;
use Application\Entity\Db\TypeValidation;
use Application\Form\RapportActiviteForm;
use Application\Provider\Privilege\RapportPrivileges;
use Application\View\Renderer\PhpRenderer;

/**
 * @var PhpRenderer $this
 * @var These $these
 * @var Rapport[] $rapports
 * @var RapportActiviteForm $form
 * @var bool $tousLesRapportsTeleverses
 * @var TypeValidation $typeValidation
 *
 * @see \Application\Controller\Rapport\RapportActiviteController::consulterAction()
 */

$routeName = 'rapport-activite';
$privilege_TELEVERSER_TOUT = RapportPrivileges::RAPPORT_ACTIVITE_TELEVERSER_TOUT;
$privilege_TELEVERSER_SIEN = RapportPrivileges::RAPPORT_ACTIVITE_TELEVERSER_SIEN;
$privilege_SUPPRIMER_TOUT = RapportPrivileges::RAPPORT_ACTIVITE_SUPPRIMER_TOUT;
$privilege_SUPPRIMER_SIEN = RapportPrivileges::RAPPORT_ACTIVITE_SUPPRIMER_SIEN;
$privilege_TELECHARGER_TOUT = RapportPrivileges::RAPPORT_ACTIVITE_TELECHARGER_TOUT;
$privilege_TELECHARGER_SIEN = RapportPrivileges::RAPPORT_ACTIVITE_TELECHARGER_SIEN;
$privilege_VALIDER_TOUT = RapportPrivileges::RAPPORT_ACTIVITE_VALIDER_TOUT;
$privilege_VALIDER_SIEN = RapportPrivileges::RAPPORT_ACTIVITE_VALIDER_SIEN;
$privilege_DEVALIDER_TOUT = RapportPrivileges::RAPPORT_ACTIVITE_DEVALIDER_TOUT;
$privilege_DEVALIDER_SIEN = RapportPrivileges::RAPPORT_ACTIVITE_DEVALIDER_SIEN;

$form->prepare();
$rapportProto = (new Rapport())->setThese($these);
$canAdd = $this->isAllowed($rapportProto, $privilege_TELEVERSER_TOUT) || $this->isAllowed($rapportProto, $privilege_TELEVERSER_SIEN);
if ($tousLesRapportsTeleverses) {
    $canAdd = false;
}
?>

<?php $this->headTitle($this->translate($title = "Rapports d'activité"))
    ->prepend($these->getDoctorant()->getIndividu()->getNomUsuel()) ?>

<h1 class="page-header">
    <?php echo $this->translate($title); ?>
    <small><?php echo $this->partial('application/these/partial/titre') ?></small>
</h1>

<?php echo $this->messenger()->addMessagesFromFlashMessengerWithNoNamespace(); ?>

<p class="lead">
    <strong>Rapports d'activité : <u>selon l'état d'avancement de votre thèse et selon les obligations définies par votre Ecole Doctorale</u>.</strong>
</p>
<ul class="lead">
    <li>
        <strong>Vous devez rédiger un rapport d'activité annuel qui doit être déposé ci-dessous avant le 30 juin.</strong>.
        Son dépôt conditionne le cas échéant l'autorisation de réinscription en thèse.
        <a href="<?php echo $this->url('fichier/telecharger-permanent', ['idPermanent' => 'RAPPORT_ACTIVITE_ANNUEL']) ?>"
        >Cliquez ici pour télécharger le document.</a>
    </li>
    <li>
        <strong>Vous devez rédiger un rapport d'activité de fin de thèse</strong> au moment de votre soutenance.
        Dans ce cas, les données indiquées doivent couvrir l'ensemble de la thèse. Il doit être
        <strong>déposé ci-dessous dans l’application SyGAL au maximum 1 mois avant votre date de soutenance.</strong>
        Son dépôt conditionne votre autorisation de soutenance.
        <a href="<?php echo $this->url('fichier/telecharger-permanent', ['idPermanent' => 'RAPPORT_ACTIVITE_FINTHESE']) ?>"
        >Cliquez ici pour télécharger le document.</a>
    </li>
</ul>
<ul class="lead">
    <li>Complétez le document téléchargé, faites-le signer par vos directions de thèse et de laboratoire ;</li>
    <li>Scannez le document signé et téléversez-le en version PDF.</li>
</ul>

<div class="row">
    <div class="col-md-11">

        <h2>Rapports téléversés</h2>

        <?php if (count($rapports) > 0): ?>

            <?php echo $this->partial('application/rapport/partial/rapports-table', [
                'rapports' => $rapports,
                'routeName' => $routeName,
                'typeValidation' => $typeValidation,
                'privilege_TELEVERSER_TOUT' => $privilege_TELEVERSER_TOUT,
                'privilege_TELEVERSER_SIEN' => $privilege_TELEVERSER_SIEN,
                'privilege_SUPPRIMER_TOUT' => $privilege_SUPPRIMER_TOUT,
                'privilege_SUPPRIMER_SIEN' => $privilege_SUPPRIMER_SIEN,
                'privilege_TELECHARGER_TOUT' => $privilege_TELECHARGER_TOUT,
                'privilege_TELECHARGER_SIEN' => $privilege_TELECHARGER_SIEN,
                'privilege_VALIDER_TOUT' => $privilege_VALIDER_TOUT,
                'privilege_VALIDER_SIEN' => $privilege_VALIDER_SIEN,
                'privilege_DEVALIDER_TOUT' => $privilege_DEVALIDER_TOUT,
                'privilege_DEVALIDER_SIEN' => $privilege_DEVALIDER_SIEN,
                'displayEtablissement' => false,
                'displayType' => true,
                'displayDoctorant' => false,
                'displayDirecteurThese' => false,
                'displayEcoleDoctorale' => false,
                'displayUniteRecherche' => false,
                'displayValidation' => true,
            ]) ?>

        <?php else: ?>

            Aucun.

        <?php endif; ?>

    </div>
</div>

<div class="row">
    <div class="col-md-offset-1 col-md-8">

<!--        --><?php //if ($tousLesRapportsTeleverses): ?>
<!--            <div class="row">-->
<!--                <div class="col-md-6 text-success">-->
<!--                    <p>-->
<!--                        <span class="glyphicon glyphicon-info-sign"></span>-->
<!--                        Toutes les années universitaires d'inscription du doctorant ont fait l'objet d'un téléversement de rapport.-->
<!--                    </p>-->
<!--                </div>-->
<!--            </div>-->
<!--        --><?php //endif ?>

        <?php $ajouterFormVisible = !empty($form->getMessages()); ?>
        <div id="ajouterDiv">
            <div class="row">
                <div class="col-md-4">
                    <a href="#" id="ajouterBtn" class="btn btn-primary <?php echo $canAdd ? '' : 'disabled' ?>"
                       style="display: <?php echo !$ajouterFormVisible ? 'inherit' : 'none' ?>">
                        <span class="glyphicon glyphicon-plus"></span> Téléverser un rapport</a>
                </div>
            </div>

            <div id="ajouterForm" style="display: <?php echo $ajouterFormVisible ? 'inherit' : 'none' ?>">
                <h3>Formulaire de téléversement</h3>

                <?php echo $this->form()->openTag($form) ?>
                <div class="row">
                    <div class="col-md-6">
                        <?php echo $this->formControlGroup($form->get('estFinal')); ?>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-4">
                        <?php echo $this->formControlGroup($form->get('anneeUniv')) ?>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-7">
                        <?php
                        echo $this->formControlGroup($form->get('files'));
                        echo $this->formControlGroup($form->get('security'));
                        echo $this->formSubmit($form->get('submit')->setAttributes(['class' => 'btn btn-primary']));
                        ?>
                    </div>
                </div>
                <?php echo $this->form()->closeTag() ?>
                <div class="row">
                    <div class="col-md-3">
                        <a href="#" id="annulerBtn" class="btn btn-danger">Annuler</a>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>


<script>
    $(function() {
        var $ajouterBtn = $("#ajouterBtn");
        var $annulerBtn = $("#annulerBtn");
        var $ajouterForm = $("#ajouterForm");

        $ajouterBtn.on('click', function() {
            $ajouterForm.show();
            $ajouterBtn.hide();
            return false;
        });
        $annulerBtn.on('click', function() {
            $ajouterForm.hide();
            $ajouterBtn.show();
            return false;
        });
        $('[data-toggle=confirmation]').confirmation({
            rootSelector: '[data-toggle=confirmation]',
            container: 'body',
            title: "Êtes-vous sûr(e) ?",
            btnOkLabel: "Oui",
            btnCancelLabel: "Non",
        });
    });
</script>
+4 −8
Changes for module/Soutenance/src/Soutenance/Service/Exporter/ProcesVerbal/proces-verbal-soutenance-2.phtml: 4 added lines, 8 removed lines.
Original line number Diff line number Diff line
@@ -237,13 +237,9 @@ use Soutenance\Entity\Proposition;
    <strong>Noms et signatures des membres du jury</strong>

    <?php
        /** @var Acteur[] $rapporteurs */
        /** @var Acteur[] $membres */
//        $rapporteurs = $informations->getRapporteurs();
//        $membres = $informations->getMembres();
//        $acteurs = array_merge($rapporteurs, $membres);
          $jury = $informations->getJury();
          usort($jury, function(Acteur $a, Acteur $b) { return $a->getIndividu()->getNomComplet() > $b->getIndividu()->getNomComplet(); });
          $signataires = $informations->getJury();
          $signataires = array_diff($signataires, $informations->getDirecteurs(), $informations->getCodirecteurs());
          usort($signataires, function(Acteur $a, Acteur $b) { return $a->getIndividu()->getNomComplet() > $b->getIndividu()->getNomComplet(); });
    ?>

    <?php $position = 0; ?>
@@ -251,7 +247,7 @@ use Soutenance\Entity\Proposition;

    <?php

    foreach ($jury as $membre) :
    foreach ($signataires as $membre) :
    ?>

    <?php if ($position % 2 == 0 and $position !== 0) : ?>