MAJ V4.3.1 Correction importante sur les nodes évalués dans les

paragraphes, table des matières et table des illustration.
This commit is contained in:
pablo rodriguez 2022-12-03 09:29:47 +01:00
parent 47a282b22c
commit a7383c004c
11 changed files with 115 additions and 40 deletions

Binary file not shown.

Binary file not shown.

3
bin/.gitignore vendored
View File

@ -1,4 +1 @@
/calcul/
/MEPTL/
/evaluer/
/fenetres/

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -153,6 +153,38 @@ public class HTML {
"</table>";
}
public static String TablePointsSyntheseStyle2(String titre,double prop, String pointstotal, String pointsgagnes) {
String propRed = Integer.toHexString(255 - (int) Math.round(Math.pow(prop,3)*255));
String propGreen = Integer.toHexString((int) Math.round(Math.pow(prop,3)*255));
if(propRed.length()==1) propRed= "0"+propRed;
if(propGreen.length()==1) propGreen= "0"+propGreen;
String color="#" + propRed + propGreen + "40";
DecimalFormat df = new DecimalFormat("###.##");
if(prop>=0) return "<table width=\"80%\" align=\"center\" cellpadding=\"4\" cellspacing=\"0\" style=\"page-break-after: avoid\">\r\n" +
"<col width=\"30%\"/><col width=\"20%\"/><col width=\"20%\"/><col width=\"20%\"/><col width=\"10%\"/>"
+ "<tr valign=\"top\">"
+ "<td width=\"20%\" style=\"border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; padding-top: 0.1cm; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm\"><p>" +
"<font size=\"4\">"+ titre +"</font></p></td>"
+ "<td width=\"20%\" align=\"center\" style=\"border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; padding-top: 0.1cm; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm\"><p>" +
"<b><span size\"6\" style=\"color: "+ color +"\">█► </span>" + df.format(prop*100) +"%</b></p></td>"
+ "<td width=\"20%\" align=\"center\" style=\"border: 1px solid #000000; padding: 0.1cm\"><p>"+
pointstotal +"</p></td>"
+ "<td width=\"20%\" align=\"center\" style=\"border: 1px solid #000000; padding: 0.1cm\"><p>"+
pointsgagnes + "</p></td>"
+ "</tr>\r\n" +
"</table>";
return "";
}
/**
* Table pour la synthèse au début du FeedBack : Style de paragraphe, Style de page
* @param titre
@ -180,7 +212,7 @@ public class HTML {
+ "<td width=\"20%\" style=\"border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; padding-top: 0.1cm; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm\"><p>" +
"<a href=\"" + id + "\"><font size=\"4\">" + titre +"</font></p></td>"
+ "<td width=\"20%\" align=\"center\" style=\"border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: none; padding-top: 0.1cm; padding-bottom: 0.1cm; padding-left: 0.1cm; padding-right: 0cm\"><p>" +
"<b><span size\"6\" style=\"color: "+ color +"\">█ </span>" + df.format(prop*100) +"%</b></p></td>"
"<b><span size\"6\" style=\"color: "+ color +"\">█ </span>" + df.format(prop*100) +"%</b></p></td>"
+ "<td width=\"20%\" align=\"center\" style=\"border: 1px solid #000000; padding: 0.1cm\"><p>"+
pointstotal + "</p></td>"
+ "<td width=\"20%\" align=\"center\" style=\"border: 1px solid #000000; padding: 0.1cm\"><p>"+

View File

@ -520,27 +520,7 @@ public class feedbacks {
// System.out.print("\t** Erreur menu, node : " + N.getNomElt());
}
}else {
if(N.getParent()!=null) {
N.getAttributs().put("pointgagner",N.getParent().getAttributs().get("point"));
N.getAttributs().put("pointtotal",N.getParent().getAttributs().get("pointTotal"));
N.getAttributs().put("proportioncorrect",N.getParent().getAttributs().get("proportioncorrect"));
if(N.getAttributs().get("proportioncorrect")!=null) {
if(!N.getAttributs().get("proportioncorrect").equals("NaN")) {
if(N.getAttributs().get("titre")!=null) {
fichier.append(HTML.TablePointsSyntheseStyle(""+ N.getAttributs().get("titre"),Double.valueOf(N.getAttributs().get("proportioncorrect")),N.getAttributs().get("pointtotal") + " pt",N.getAttributs().get("pointgagner") + " pt", "",N.getAttributs().get("id")));
}
if(N.getAttributs().get("titre1")!=null) {
fichier.append(HTML.TablePointsSyntheseStyle(""+ N.getAttributs().get("titre1"),Double.valueOf(N.getAttributs().get("proportioncorrect")),N.getAttributs().get("pointtotal") + " pt",N.getAttributs().get("pointgagner") + " pt", "",N.getAttributs().get("id")));
}
if(N.getAttributs().get("titre2")!=null) {
fichier.append(HTML.TablePointsSyntheseStyle(""+ N.getAttributs().get("titre2"),Double.valueOf(N.getAttributs().get("proportioncorrect")),N.getAttributs().get("pointtotal") + " pt",N.getAttributs().get("pointgagner") + " pt", "",N.getAttributs().get("id")));
}
if(N.getAttributs().get("titre3")!=null) {
fichier.append(HTML.TablePointsSyntheseStyle(""+ N.getAttributs().get("titre3"),Double.valueOf(N.getAttributs().get("proportioncorrect")),N.getAttributs().get("pointtotal") + " pt",N.getAttributs().get("pointgagner") + " pt", "",N.getAttributs().get("id")));
}
}
}
}else {
if(N.getAttributs().get("titre")!=null) {
fichier.append(HTML.TablePointsSyntheseStyle(N.getAttributs().get("titre"),-1.0,"","", "",N.getAttributs().get("id")));
}
@ -554,20 +534,33 @@ public class feedbacks {
fichier.append(HTML.TablePointsSyntheseStyle(N.getAttributs().get("titre3"),-1.0,"","", "",N.getAttributs().get("id")));
}
}
}
}
}
for(int l=0; l < nodana.getNodes().get(k).getNodes().size();l++) {
fichier = SyntheseTable(nodana.getNodes().get(k).getNodes().get(l),fichier);
}
}
ArrayList<node> LesPages = nodana.retourneFirstEnfantsByName("structurepage").retourneEnfantsByName("page", new ArrayList<node>());
if(LesPages.size()>0) {
fichier.append(HTML.SautLigne());
fichier.append(HTML.H2("Les points dans les pages"));
fichier.append(HTML.SautLigne());
for(int k = 0 ; k < LesPages.size();k++) {
if(LesPages.get(k).getNomElt().equals("page")) {
if(LesPages.get(k).getAttributs().get("proportioncorrect")!=null) {
if(!LesPages.get(k).getAttributs().get("proportioncorrect").equals("NaN")) {
fichier.append(HTML.TablePointsSyntheseStyle2(" Page "+ LesPages.get(k).getAttributs().get("numeroabsolue"),Double.valueOf(LesPages.get(k).getAttributs().get("proportioncorrect")),LesPages.get(k).getAttributs().get("pointTotal") + " pt",LesPages.get(k).getAttributs().get("point") + " pt"));
}
}
}
}
}
return fichier;
}

View File

@ -706,6 +706,9 @@ public class analyseLesNodesPrincipaux {
for(int i = 0 ; i < nodSujetTableI.getNodes().size(); i++) {
//text:illustration-index-sourceIllustrations
if(nodSujetTableI.getNodes().get(i).getNomElt().equals("text:illustration-index")) {
int pointDebut = evaluation.getPointsClass();
int pointTotalDebut = evaluation.getPointTotal();
@ -758,6 +761,45 @@ public class analyseLesNodesPrincipaux {
}
}
}
//*******************************
//** Recherche le node Student **
//*******************************
nodSujet = nodSujet.getParent().retourneFirstEnfantsByName("text:illustration-index-sourceIllustrations");
if(nodStudent!=null) {
nodStudent = nodStudent.getParent().retourneFirstEnfantsByName("text:illustration-index-sourceIllustrations");
//*********************************************
//** analyse les attributs des nodes <table> **
//*********************************************
table = evaluationAttribut.evalLesAttributEtContenuDuNode(nodStudent, nodSujet, table, "ana:tableillustration", nodSujet.getNomElt());
//**************************************************************************************
//** Parcours les nodes enfants du node <text:illustration-index-sourceIllustrations> **
//**************************************************************************************
for(int j =0 ; j < nodSujet.getNodes().size();j++) {
if(nodStudent!=null) {
if(j<nodStudent.getNodes().size()) {
table = evaluationAttribut.evalLesAttributEtContenuDuNode(nodStudent.getNodes().get(j), nodSujet.getNodes().get(j), table, "ana:tableillustration", nodSujet.getNodes().get(j).getNomElt());
for(int k=0; k<nodSujet.getNodes().get(j).getNodes().size();k++) {
if(k<nodStudent.getNodes().get(j).getNodes().size()) {
table = evaluationAttribut.evalLesAttributEtContenuDuNode(nodStudent.getNodes().get(j).getNodes().get(k), nodSujet.getNodes().get(j).getNodes().get(k), table, "ana:tableillustration", nodSujet.getNodes().get(j).getNodes().get(k).getNomElt());
}else {
table = evaluationAttribut.evalLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j).getNodes().get(k), table, "ana:tableillustration", nodSujet.getNodes().get(j).getNodes().get(k).getNomElt());
}
}
}else {
table = evaluationAttribut.evalLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j), table, "ana:tableillustration", nodSujet.getNodes().get(j).getNomElt());
}
}else {
table = evaluationAttribut.evalLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j), table, "ana:tableillustration", nodSujet.getNodes().get(j).getNomElt());
for(int k=0; k<nodSujet.getNodes().get(j).getNodes().size();k++) {
table = evaluationAttribut.evalLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j).getNodes().get(k), table, "ana:tableillustration", nodSujet.getNodes().get(j).getNodes().get(k).getNomElt());
}
}
}
}
//****************************************************************
//** Insère les attributs des points dans les node de l'analyse **
//****************************************************************
@ -813,7 +855,8 @@ public class analyseLesNodesPrincipaux {
String TitreTable = evaluation.withoutCodeAndPoint(nodSujetTableM.getNodes().get(i).retourneFirstEnfantsByName("text:index-title").retourneLesContenusEnfants(""));
node nodSujet = a.retourneFirstNodeParagrapheContain(a.retourneNames(nodSujetTableM, "text:index-body"), TitreTable);
nodSujet = nodSujet.getParent();
//*****************************
//** Ajoute un saut de ligne **
//*****************************
@ -828,6 +871,8 @@ public class analyseLesNodesPrincipaux {
//** Recherche le node Student **
//*******************************
node nodStudent = a.retourneFirstNodeParagrapheContain(a.retourneNames(nodStudentTableM, "text:index-body"), TitreTable);
if(nodStudent!=null) nodStudent = nodStudent.getParent();
//*********************************************
//** analyse les attributs des nodes <table> **
@ -857,20 +902,28 @@ public class analyseLesNodesPrincipaux {
table = evaluationAttribut.evalLesAttributEtContenuDuNode(null, nodSujet.getNodes().get(j).getNodes().get(k), table, "ana:tablematiere", nodSujet.getNodes().get(j).getNodes().get(k).getNomElt());
}
}
}
//****************************************************************
//** Insère les attributs des points dans les node de l'analyse **
//****************************************************************
//*****************************************************************
//** Insère les attributs des points dans les nodes de l'analyse **
//*****************************************************************
table.getAttributs().put("point", String.valueOf(evaluation.getPointsClass()-pointDebut));
table.getAttributs().put("pointTotal", String.valueOf(evaluation.getPointTotal()-pointTotalDebut));
nodTablesMs.getNodes().add(table);
}
}
//****************************************************************
//** Insère les attributs des points dans les node de l'analyse **
//****************************************************************
//*****************************************************************
//** Insère les attributs des points dans les nodes de l'analyse **
//*****************************************************************
nodTablesMs.getAttributs().put("pointgagner",String.valueOf(evaluation.getPointsClass()));
nodTablesMs.getAttributs().put("pointtotal",String.valueOf(evaluation.getPointTotal()));
nodTablesMs.getAttributs().put("proportioncorrect",String.valueOf(evaluation.getProportionCorrect()));

View File

@ -72,7 +72,7 @@ public class descriptionNode {
if(nameNode.equals("tableillustrations")) descriptionNode = descriptionNode + "<p>Ce node contient les index de type \"index des figures\" depuis la version 6.0.x de LibreOffice Writer."
+ "<br>AnalyseWriter recherche les tables des matières par le titre des tables des matières."
+ "<br>Il est important de préciser dans les consignes <b><u>le titre de la table des matières</u></b>."
+ "<br>Cette information est dans le <b><u>contenu</u></b> du node \"text:index-title\"."
+ "<br>Cette information est dans le <b><u>contenu</u></b> du node <b>\"text:index-title\"</b>."
+ "<br>"
+ "<br>Si le node \"tableillustrations\" est évalué, alors par défaut, il apparaîtra dans les feedbacks des étudiants comme une partie principale avec un lien de menu.</p>";