MAJ (V4.3.1 bug corrigé sur les enchaînements de style:style non évalués

et évalués)
This commit is contained in:
pablo rodriguez 2022-11-26 21:45:46 +01:00
parent 9928813fb3
commit 3b2537054a
5 changed files with 63 additions and 53 deletions

Binary file not shown.

Binary file not shown.

View File

@ -990,53 +990,58 @@ public class analyseLesNodesPrincipaux {
//** Parcours les nodes enfants du node <style:style> **
//******************************************************
for(int i = 0 ; i < nodSujetParagraph.getNodes().size(); i++) {
if(nodSujetParagraph.getNodes().get(i).getNomElt().equals("style:style")) {
int pointDebut = evaluation.getPointsClass();
int pointTotalDebut = evaluation.getPointTotal();
node paragraphSujet = nodSujetParagraph.getNodes().get(i);
String nomDuParagraph = evaluation.withoutCodeAndPoint(paragraphSujet.getAttributs().get("style:name"));
node paragraph = new node();
paragraph.setNomElt("paragraph");
paragraph.getAttributs().put("name", nomDuParagraph);
//********************************************************************************************
//** Ajoute l'information si le style est evaluer à travers evalStyle dans la structurepage **
//********************************************************************************************
if(paragraphSujet.getAttributs().get("EvaluerATraversAnalyseStyle")!=null)if(paragraphSujet.getAttributs().get("EvaluerATraversAnalyseStyle").equals("true")) {
paragraph.getAttributs().put("EvaluerATraversAnalyseStyle", "true");
if(nodSujetParagraph.getNodes().get(i).getAttributs().get("evaluer")!=null) {
if(nodSujetParagraph.getNodes().get(i).getAttributs().get("evaluer").equals("true")) {
if(nodSujetParagraph.getNodes().get(i).getNomElt().equals("style:style")) {
int pointDebut = evaluation.getPointsClass();
int pointTotalDebut = evaluation.getPointTotal();
node paragraphSujet = nodSujetParagraph.getNodes().get(i);
String nomDuParagraph = evaluation.withoutCodeAndPoint(paragraphSujet.getAttributs().get("style:name"));
node paragraph = new node();
paragraph.setNomElt("paragraph");
paragraph.getAttributs().put("name", nomDuParagraph);
//********************************************************************************************
//** Ajoute l'information si le style est evaluer à travers evalStyle dans la structurepage **
//********************************************************************************************
if(paragraphSujet.getAttributs().get("EvaluerATraversAnalyseStyle")!=null)if(paragraphSujet.getAttributs().get("EvaluerATraversAnalyseStyle").equals("true")) {
paragraph.getAttributs().put("EvaluerATraversAnalyseStyle", "true");
}
//*****************************
//** Ajoute un saut de ligne **
//*****************************
paragraph = meptl.addSaut(paragraphSujet,paragraph);
//*********************
//** Ajoute un titre **
//*********************
paragraph = meptl.addNodeSautTitre(paragraphSujet,paragraph,nodmenu,a);
//*******************************
//** Recherche le node Student **
//*******************************
node paragraphStudent = a.retourneFirstNodeByNameAttributValue(nodStudentParagraph, "style:style", "style:name", nomDuParagraph);
//*************************************************
//** analyse les attributs des nodes <paragraph> **
//*************************************************
paragraph = evaluationAttribut.evalLesAttributEtContenuDuNode(paragraphStudent, paragraphSujet, paragraph, "ana:paragraph",paragraphSujet.getNomElt());
//************************************
//** analyse tous les nodes enfants **
//************************************
paragraph = analyseLesNodesEnfants.nodeNext(paragraph, "ana:paragraph", paragraphStudent, null, null, paragraphSujet, null, null, nodmenu,a);
//****************************************************************
//** Insère les attributs des points dans les node de l'analyse **
//****************************************************************
paragraph.getAttributs().put("point", String.valueOf(evaluation.getPointsClass()-pointDebut));
paragraph.getAttributs().put("pointTotal", String.valueOf(evaluation.getPointTotal()-pointTotalDebut));
nodparagraphs.getNodes().add(paragraph);
}
}
//*****************************
//** Ajoute un saut de ligne **
//*****************************
paragraph = meptl.addSaut(paragraphSujet,paragraph);
//*********************
//** Ajoute un titre **
//*********************
paragraph = meptl.addNodeSautTitre(paragraphSujet,paragraph,nodmenu,a);
//*******************************
//** Recherche le node Student **
//*******************************
node paragraphStudent = a.retourneFirstNodeByNameAttributValue(nodStudentParagraph, "style:style", "style:name", nomDuParagraph);
//*************************************************
//** analyse les attributs des nodes <paragraph> **
//*************************************************
paragraph = evaluationAttribut.evalLesAttributEtContenuDuNode(paragraphStudent, paragraphSujet, paragraph, "ana:paragraph",paragraphSujet.getNomElt());
//************************************
//** analyse tous les nodes enfants **
//************************************
paragraph = analyseLesNodesEnfants.nodeNext(paragraph, "ana:paragraph", paragraphStudent, null, null, paragraphSujet, null, null, nodmenu,a);
//****************************************************************
//** Insère les attributs des points dans les node de l'analyse **
//****************************************************************
paragraph.getAttributs().put("point", String.valueOf(evaluation.getPointsClass()-pointDebut));
paragraph.getAttributs().put("pointTotal", String.valueOf(evaluation.getPointTotal()-pointTotalDebut));
nodparagraphs.getNodes().add(paragraph);
}
}
//****************************************************************

View File

@ -362,6 +362,11 @@ public class evaluation {
}
/**
* Retourne la valeur minimale d'un intervale.
* @param Intervale
* @return
*/
public static double TraitementIntervaleRetourneValeurMinimale(String Intervale) {
String Text[] = Intervale.split("");
@ -370,15 +375,17 @@ public class evaluation {
// remplacement de toutes les occurrences par ""
Text[0]= p.matcher(Text[0]).replaceAll("");
Text[1] = p.matcher(Text[1]).replaceAll("");
double b0 = Double.valueOf(Text[0]);
// double b1 = Double.valueOf(Text[1]);
return b0;
}
/**
* Retourne la valeur maximale d'un intervalle.
* @param Intervale
* @return
*/
public static double TraitementIntervaleRetourneValeurMaximale(String Intervale) {
String Text[] = Intervale.split("");
@ -388,9 +395,7 @@ public class evaluation {
// remplacement de toutes les occurrences par ""
Text[0]= p.matcher(Text[0]).replaceAll("");
Text[1] = p.matcher(Text[1]).replaceAll("");
// double b0 = Double.valueOf(Text[0]);
double b1 = Double.valueOf(Text[1]);
return b1;