Skip to content

Commit

Permalink
Ajout parametre masqueECTSnull
Browse files Browse the repository at this point in the history
  • Loading branch information
cdubois54 committed Dec 2, 2024
1 parent ba9fcc0 commit f9da4f2
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ public boolean isAffECTSEtudiant() {
public boolean isAffECTSIPEtudiant() {
return getBooleanValueForParameter("affECTSIPEtudiant");
}

public boolean isMasqueECTSnull() {return getBooleanValueForParameter("masqueECTSnull"); }

public boolean isMasqueSession2Vide() {
return getBooleanValueForParameter("masqueSession2Vide");
Expand Down Expand Up @@ -787,7 +789,4 @@ public void saveSwap(UtilisateurSwap swap) {
utilisateurSwapRepository.saveAndFlush(swap);

}



}
Original file line number Diff line number Diff line change
Expand Up @@ -676,12 +676,17 @@ public void setNotesElpEpr(Etudiant e, Etape et, List<ContratPedagogiqueResultat

// Récupération des crédits ECTS version 5.20.laa
// Si on a un crédit ECTS de référence et si crédit ECTS pas déjà renseigné via la session de juin.
if (creditEctsElp != null && (elp.getEcts() == null || elp.getEcts().equals(""))) {
if (creditEctsElp != null && !StringUtils.hasText(elp.getEcts())) {
//Si on a un crédit acquis
if (rpd.getNbrCrdElp() != null && rpd.getNbrCrdElp().toString() != null && !rpd.getNbrCrdElp().toString().equals("")) {
if (rpd.getNbrCrdElp() != null && StringUtils.hasText(rpd.getNbrCrdElp().toString())) {
elp.setEcts(Utils.getEctsToDisplay(rpd.getNbrCrdElp()) + "/" + creditEctsElp);
} else {
elp.setEcts("0/" + creditEctsElp);
// Si on masque les ECTS null
if(configController.isMasqueECTSnull()) {
elp.setEcts("");
} else {
elp.setEcts("0/" + creditEctsElp);
}
}
}

Expand Down Expand Up @@ -720,13 +725,17 @@ public void setNotesElpEpr(Etudiant e, Etape et, List<ContratPedagogiqueResultat
// Si on a un crédit ECTS de référence
if (creditEctsElp != null) {
//Si on a un crédit acquis
if (rpd.getNbrCrdElp() != null && rpd.getNbrCrdElp().toString() != null && !rpd.getNbrCrdElp().toString().equals("")) {
if (rpd.getNbrCrdElp() != null && StringUtils.hasText(rpd.getNbrCrdElp().toString())) {
elp.setEcts(Utils.getEctsToDisplay(rpd.getNbrCrdElp()) + "/" + creditEctsElp);
} else {
elp.setEcts("0/" + creditEctsElp);
// Si on masque les ECTS null
if(configController.isMasqueECTSnull()) {
elp.setEcts("");
} else {
elp.setEcts("0/" + creditEctsElp);
}
}
}

elp.setRes2(result);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
-- phpMyAdmin SQL Dump
-- version 4.0.10.10
-- http://www.phpmyadmin.net
--
-- Version du serveur: 5.5.34-log
-- Version de PHP: 5.3.3


-- ESUP-Portail MONDOSSIERWEB - Copyright (c) 2016 ESUP-Portail consortium
-- Base de donnees: `mdw`
--

-- --------------------------------------------------------



-----------------------------------------------------------
-- Ajout de parametres affDatenaissanceEnseignant et affDatenaissanceGestionnaire
-----------------------------------------------------------
INSERT INTO `PREFERENCES_APPLICATION` (`PREF_ID`, `PREF_DESC`, `TYPE`,`CAT_ID`,`VALEUR`) VALUES
('masqueECTSnull', 'Masquer les ECTS null: true pour masquer, false pour afficher 0', 'BOOLEAN','2','false');

0 comments on commit f9da4f2

Please sign in to comment.