MAJ V4.4.0 ajout de la méthode evalNameLegacyStyle, amélioration de la

recherhce des nodes textuels
This commit is contained in:
pablo rodriguez 2022-12-12 19:25:53 +01:00
parent 62e1d3c835
commit 63db87da04
48 changed files with 604 additions and 21 deletions

Binary file not shown.

9
bin/.gitignore vendored
View File

@ -1,7 +1,6 @@
/MEPTL/
/calcul/
/evaluer/
/fenetres/
/list/
/MEPTL/
/evaluer/
/evaluer.png
/evaluer.svg
/evaluermini.png
/resources/

Binary file not shown.

Binary file not shown.

BIN
bin/evaluer.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 931 B

54
bin/evaluer.svg Normal file
View File

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="45"
height="45"
viewBox="0 0 11.90625 11.90625"
version="1.1"
id="svg5"
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
sodipodi:docname="evaluer.svg"
inkscape:export-filename="evaluermini.png"
inkscape:export-xdpi="51.200001"
inkscape:export-ydpi="51.200001"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="false"
inkscape:zoom="8.4222222"
inkscape:cx="22.5"
inkscape:cy="23.984169"
inkscape:window-width="1920"
inkscape:window-height="1009"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs2" />
<g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1">
<path
style="fill:#ff0000;stroke-width:0.25;stroke-linecap:round;stroke-linejoin:round;paint-order:fill markers stroke;stop-color:#000000"
d="M 9.8118042,2.7739909 2.3843506,9.4505859 A 5,5 0 0 0 5.953125,10.953337 5,5 0 0 0 10.953337,5.953125 5,5 0 0 0 9.8118042,2.7739909 Z"
id="path435" />
<path
style="fill:#00ff00;stroke-width:0.25;stroke-linecap:round;stroke-linejoin:round;paint-order:fill markers stroke;stop-color:#000000"
d="M 5.953125,0.95291341 A 5,5 0 0 0 0.95291341,5.953125 5,5 0 0 0 2.0954793,9.1307088 L 9.5239665,2.453597 A 5,5 0 0 0 5.953125,0.95291341 Z"
id="path263" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

BIN
bin/evaluermini.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 554 B

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
icons/heritagestyle.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

105
icons/heritagestyle.svg Normal file
View File

@ -0,0 +1,105 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="45"
height="45"
viewBox="0 0 11.90625 11.90625"
version="1.1"
id="svg5"
xml:space="preserve"
inkscape:export-filename="heritagestylemini.png"
inkscape:export-xdpi="51.200001"
inkscape:export-ydpi="51.200001"
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
sodipodi:docname="heritagestyle.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="false"
showguides="false"
inkscape:zoom="11.688363"
inkscape:cx="25.623777"
inkscape:cy="15.656598"
inkscape:window-width="1920"
inkscape:window-height="1009"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" /><defs
id="defs2" /><g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1"><g
id="g729"
transform="translate(0,-0.17635092)"><g
id="g554"
transform="matrix(1.0257124,0,0,1.0257124,-0.55277824,1.1385828)"
style="stroke-width:0.974932"><path
style="fill:#ff0000;stroke:none;stroke-width:0.25795px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 1.7338794,0.7572401 1.7635307,1.6761206 6.4116944,0.345867 11.014585,1.6292556 10.997372,0.7475138 6.4257241,-0.61781387 Z"
id="path385"
sodipodi:nodetypes="ccccccc" /><path
id="path483"
style="fill:#ff0000;stroke:none;stroke-width:0.25795px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 6.4259644,0.6109905 2.9471069,1.6305666 H 4.4142008 L 6.411495,1.0590252 8.4620158,1.6305666 h 1.3776937 z" /><rect
style="fill:#ff0000;stroke:none;stroke-width:0.243733;stroke-linecap:round;stroke-linejoin:round;paint-order:fill markers stroke;stop-color:#000000"
id="rect540"
width="9.3300438"
height="0.74125445"
x="1.7069396"
y="1.8345761"
ry="0" /><rect
style="fill:#ff0000;stroke:none;stroke-width:0.243733;stroke-linecap:round;stroke-linejoin:round;paint-order:fill markers stroke;stop-color:#000000"
id="rect542"
width="9.3962507"
height="0.52056414"
x="1.7861673"
y="8.1492062"
ry="0" /><rect
style="fill:#ff0000;stroke:none;stroke-width:0.243733;stroke-linecap:round;stroke-linejoin:round;paint-order:fill markers stroke;stop-color:#000000"
id="rect544"
width="10.414891"
height="0.52056414"
x="1.1183913"
y="8.8735733"
ry="0" /><rect
style="fill:#ff0000;stroke:none;stroke-width:0.243733;stroke-linecap:round;stroke-linejoin:round;paint-order:fill markers stroke;stop-color:#000000"
id="rect546"
width="11.444851"
height="0.7853924"
x="0.62038881"
y="9.5639858"
ry="0" /></g><text
xml:space="preserve"
style="font-size:7.04934px;line-height:1.2;font-family:arial;-inkscape-font-specification:arial;fill:#0000ff;stroke-width:0.264584"
x="3.4197686"
y="9.1438246"
id="text610"><tspan
sodipodi:role="line"
id="tspan608"
style="font-style:normal;font-variant:normal;font-weight:900;font-stretch:normal;font-family:arial;-inkscape-font-specification:'arial Heavy';fill:#0000ff;stroke-width:0.264584"
x="3.4197686"
y="9.1438246">S</tspan></text><rect
style="fill:#ff0000;stroke:none;stroke-width:0.25;stroke-linecap:round;stroke-linejoin:round;paint-order:fill markers stroke;stop-color:#000000"
id="rect714"
width="0.76964015"
height="5.3422079"
x="1.8788275"
y="3.9699109" /><rect
style="fill:#ff0000;stroke:none;stroke-width:0.25;stroke-linecap:round;stroke-linejoin:round;paint-order:fill markers stroke;stop-color:#000000"
id="rect716"
width="0.76964015"
height="5.3422079"
x="9.3941374"
y="3.9925473" /></g></g></svg>

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
icons/heritagestylemini.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 719 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -0,0 +1,127 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="45"
height="45"
viewBox="0 0 11.90625 11.90625"
version="1.1"
id="svg5"
xml:space="preserve"
inkscape:export-filename="heritagestyletouslesnodes.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
sodipodi:docname="heritagestyletouslesnodes.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="false"
showguides="false"
inkscape:zoom="11.688363"
inkscape:cx="14.501603"
inkscape:cy="15.656598"
inkscape:window-width="1920"
inkscape:window-height="1009"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="g729" /><defs
id="defs2" /><g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1"><g
id="g729"
transform="translate(0,-0.17635092)"><text
xml:space="preserve"
style="font-size:7.04934px;line-height:1.2;font-family:arial;-inkscape-font-specification:arial;fill:#00d4aa;stroke-width:0.264584"
x="2.3105812"
y="9.166461"
id="text305"><tspan
sodipodi:role="line"
id="tspan303"
style="font-style:normal;font-variant:normal;font-weight:900;font-stretch:normal;font-family:arial;-inkscape-font-specification:'arial Heavy';fill:#00d4aa;stroke-width:0.264584"
x="2.3105812"
y="9.166461">S</tspan></text><g
id="g554"
transform="matrix(1.0257124,0,0,1.0257124,-0.55277824,1.1385828)"
style="stroke-width:0.974932"><path
style="fill:#ff0000;stroke:none;stroke-width:0.25795px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 1.7338794,0.7572401 1.7635307,1.6761206 6.4116944,0.345867 11.014585,1.6292556 10.997372,0.7475138 6.4257241,-0.61781387 Z"
id="path385"
sodipodi:nodetypes="ccccccc" /><path
id="path483"
style="fill:#ff0000;stroke:none;stroke-width:0.25795px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 6.4259644,0.6109905 2.9471069,1.6305666 H 4.4142008 L 6.411495,1.0590252 8.4620158,1.6305666 h 1.3776937 z" /><rect
style="fill:#ff0000;stroke:none;stroke-width:0.243733;stroke-linecap:round;stroke-linejoin:round;paint-order:fill markers stroke;stop-color:#000000"
id="rect540"
width="9.3300438"
height="0.74125445"
x="1.7069396"
y="1.8345761"
ry="0" /><rect
style="fill:#ff0000;stroke:none;stroke-width:0.243733;stroke-linecap:round;stroke-linejoin:round;paint-order:fill markers stroke;stop-color:#000000"
id="rect542"
width="9.3962507"
height="0.52056414"
x="1.7861673"
y="8.1492062"
ry="0" /><rect
style="fill:#ff0000;stroke:none;stroke-width:0.243733;stroke-linecap:round;stroke-linejoin:round;paint-order:fill markers stroke;stop-color:#000000"
id="rect544"
width="10.414891"
height="0.52056414"
x="1.1183913"
y="8.8735733"
ry="0" /><rect
style="fill:#ff0000;stroke:none;stroke-width:0.243733;stroke-linecap:round;stroke-linejoin:round;paint-order:fill markers stroke;stop-color:#000000"
id="rect546"
width="11.444851"
height="0.7853924"
x="0.62038881"
y="9.5639858"
ry="0" /></g><text
xml:space="preserve"
style="font-size:7.63818px;line-height:1.2;font-family:arial;-inkscape-font-specification:arial;fill:#0000ff;stroke-width:0.264584"
x="3.4034598"
y="9.456274"
id="text610"
transform="scale(1.0050518,0.99497361)"><tspan
sodipodi:role="line"
id="tspan608"
style="font-style:normal;font-variant:normal;font-weight:900;font-stretch:normal;font-family:arial;-inkscape-font-specification:'arial Heavy';fill:#0000ff;stroke-width:0.264584"
x="3.4034598"
y="9.456274">S</tspan></text><rect
style="fill:#ff0000;stroke:none;stroke-width:0.25;stroke-linecap:round;stroke-linejoin:round;paint-order:fill markers stroke;stop-color:#000000"
id="rect714"
width="0.76964015"
height="5.3422079"
x="1.8788275"
y="3.9699109" /><rect
style="fill:#ff0000;stroke:none;stroke-width:0.25;stroke-linecap:round;stroke-linejoin:round;paint-order:fill markers stroke;stop-color:#000000"
id="rect716"
width="0.76964015"
height="5.3422079"
x="9.3941374"
y="3.9925473" /><text
xml:space="preserve"
style="font-size:9.20417px;line-height:1.2;font-family:arial;-inkscape-font-specification:arial;fill:#000080;stroke-width:0.264584"
x="4.7968283"
y="10.175141"
id="text301"
transform="scale(1.0082574,0.99181025)"><tspan
sodipodi:role="line"
id="tspan299"
style="font-style:normal;font-variant:normal;font-weight:900;font-stretch:normal;font-family:arial;-inkscape-font-specification:'arial Heavy';fill:#000080;stroke-width:0.264584"
x="4.7968283"
y="10.175141">S</tspan></text></g></g></svg>

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -308,7 +308,7 @@ public class ecritureSujet {
if(listeDesNodesSautEtTitre(no.get(k).getNomElt())) {no.get(k).getAttributs().put("saut", "false"); no.get(k).getAttributs().put("titre", "");}
if(listeDesNodesRechercheByContenu.isRechercheByContenu(no.get(k))) {no.get(k).getAttributs().put("recherche_index", "false"); no.get(k).getAttributs().put("recherche_contenu_exact", "false");no.get(k).getAttributs().put("recherche_contenu_plus_proche_voisin", "false");no.get(k).getAttributs().put("allContent", "strict0");}
if(listeDesNodesEvalPlacement.isPlacement(no.get(k)))no.get(k).getAttributs().put("evalPlacement", "0");
if(listeDesNodesAnalyseStyle.isAnalyseStyle(no.get(k))) no.get(k).getAttributs().put("analyseStyle", "false");
if(listeDesNodesAnalyseStyle.isAnalyseStyle(no.get(k))) {no.get(k).getAttributs().put("analyseStyle", "false");no.get(k).getAttributs().put("evalNameLegacyStyle", "0");}
if(listeRechercheParAnchorPageNumber.isRechercheParAnchorPageNumber(no.get(k))) no.get(k).getAttributs().put("recherche_anchor-page-number", "false");
if(!no.get(k).getNodes().isEmpty()) {

View File

@ -1177,6 +1177,7 @@ public class meptl {
fichier.getNodes().add(nodhistorique);
fichier = attributLesParentsAuxNodes(fichier);
fichier.setParent(null);
return fichier;
}
@ -1189,7 +1190,8 @@ public class meptl {
*/
public static node attributLesParentsAuxNodes(node nod){
for(int i = 0 ; i<nod.getNodes().size();i++) {
System.out.println(nod.getNodes().get(i).getNomElt());
nod.getNodes().get(i).setParent(nod);
// nod = attributLesParentsAuxNodes(nod.getNodes().get(i));
for(int j = 0 ; j<nod.getNodes().get(i).getNodes().size();j++) {
node A = nod.getNodes().get(i).getNodes().get(j);
A.setParent(nod.getNodes().get(i));

View File

@ -523,8 +523,6 @@ public class rechercherUnNodeStudent {
if(nod1Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNodeByNameAttributValue(nod1Student.getNodes(), nodSujet.getNomElt(),"index",valueAttribut);
if(nod0Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNodeByNameAttributValue(nod0Student.getNodes(), nodSujet.getNomElt(),"index",valueAttribut);
}
return nodStudent;
}
@ -543,7 +541,6 @@ public class rechercherUnNodeStudent {
private static node findDrawFrame(String nameNode, node nodSujet,node nod0Student, node nod1Student, node nod2Student, Run a) {
node nodStudent = null;
String nameDraw = evaluation.withoutCodeAndPointPourRechercheContenuExact(nodSujet.getAttributs().get("draw:name"));
System.out.println("recherche image ou cadre ="+ nameDraw);
//recherche par le nom de l'objet draw:name par défaut
if(nod2Student!=null) nodStudent = a.retourneFirstNodeByNameAttributValueNetTexte(nod2Student, nameNode, "draw:name", nameDraw);
if(nod1Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNodeByNameAttributValueNetTexte(nod1Student, nameNode, "draw:name", nameDraw);
@ -557,7 +554,6 @@ public class rechercherUnNodeStudent {
if(nod1Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNodeByNameAttributValue(nod1Student, nameNode, "text:anchor-page-number", AncragePage);
if(nod0Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNodeByNameAttributValue(nod0Student, nameNode, "text:anchor-page-number", AncragePage);
}
return nodStudent;
}

View File

@ -118,6 +118,14 @@ public class calculNombrePointEvaluation {
}
}
if(nod.getAttributs().get("evalNameLegacyStyle")!=null) {
try {
point = point + Integer.valueOf(nod.getAttributs().get("evalNameLegacyStyle"));
} catch (Exception e) {
JOptionPane.showInternalMessageDialog(null, "Erreur dans la valeur de l'attribut evalPlacement");
}
}
//***********************************************
//** Les points par la méthode analyseStyle *****
//***********************************************

View File

@ -701,6 +701,7 @@ public class analyseLesNodesPrincipaux {
//** Recherche le node Student **
//*******************************
node nodStudent = a.retourneFirstNodeParagrapheContain(a.retourneNames(nodStudentTableI, "text:index-body"), TitreTable);
if(nodStudent==null) if(nodStudentTableI!=null) if(nodStudentTableI.getNodes().size()>0) nodStudent = nodStudentTableI.getNodes().get(0);
//*********************************************
//** analyse les attributs des nodes <table> **

View File

@ -1,6 +1,8 @@
package evaluer;
import java.util.Enumeration;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import cXML.node;
import list.listeAttributsAnalyseWriter;
@ -194,6 +196,51 @@ public class evaluationAttribut {
}
}
if(k.equals("evalNameLegacyStyle") && !sujet.getAttributs().get(k).equals("0")) {
String nameLegacyStyleSujet = sujet.getAttributs().get("text:style-name");
String point = sujet.getAttributs().get(k);
Pattern p = Pattern.compile("^P[0-9]{1,}|^T[0-9]{1,}|^L[0-9]{1,}");
if(nameLegacyStyleSujet!=null) {
Matcher m = p.matcher(nameLegacyStyleSujet);
if(m.find()) {
node fichier = sujet.racineDuNode();
node styleParagraphs = fichier.retourneFirstEnfantsByName("style:paragraph").retourneFirstNodeByNameAndAttributValueExactStrict("style:style", "style:name", nameLegacyStyleSujet);
if(styleParagraphs!=null) {
if(styleParagraphs.getAttributs().get("style:parent-style-name")!=null) {
nameLegacyStyleSujet = styleParagraphs.getAttributs().get("style:parent-style-name");
}
}
}
}
String nameLegacyStyleStudent="";
if(nodeStudent!=null) {
nameLegacyStyleStudent = nodeStudent.getAttributs().get("text:style-name");
Matcher m = p.matcher(nameLegacyStyleStudent);
if(m.find()) {
if(nodeStudent.getAttributs().get("text:style-name")!=null) {
String nameStyle1 = nodeStudent.getAttributs().get("text:style-name");
node fichier = nodeStudent.racineDuNode();
node styleParagraphs = fichier.retourneFirstEnfantsByName("style:paragraph").retourneFirstNodeByNameAndAttributValueExactStrict("style:style", "style:name", nameStyle1);
if(styleParagraphs!=null) {
if(styleParagraphs.getAttributs().get("style:parent-style-name")!=null) {
nameLegacyStyleStudent = styleParagraphs.getAttributs().get("style:parent-style-name");
}
}
}
}
}
if(nodeStudent!=null) {
retour = evaluNameLegacyStyle(retour,nodeStudent, sujet.getNomElt(), point, nameElt, nameLegacyStyleStudent, nameLegacyStyleSujet) ;
}else {
retour = evaluNameLegacyStyle(retour,null, sujet.getNomElt(), point, nameElt, nameLegacyStyleStudent, nameLegacyStyleSujet) ;
}
}
if(k.equals("evalNameCreator") && sujet.getNomElt().equals("dc:creator")) {
if(nodeStudent!=null) {
retour = evaluNameCreator(retour,nodeStudent, nodeStudent.getContenu().get(0), sujet.getAttributs().get("evalNameCreator"),"Editeur");
@ -427,6 +474,33 @@ public class evaluationAttribut {
return retour;
}
/**
* Evaluation du nom du style hérité.</br>
* </br>
* @param retour : node retour pour le node d'analyse ana:xxx
* @param nodStudent : node Student
* @param nameNode : nom du node
* @param point : point mise en jeu.
* @param nameElt : nom de l'élément pour le feedback (attribut)
* @param nameStyleLegacyStudent : Contenu textuel (le nom dy style hérité de l'étudiant)
* @param nameStyleLegacySujet : Contenu textuel (le nom dy style hérité du sujet)
* @return
*/
private static node evaluNameLegacyStyle(node retour,node nodStudent, String nameNode, String point, String nameElt, String nameStyleLegacyStudent, String nameStyleLegacySujet) {
node item = null;
if(nodStudent!=null) {
item = retourneNoteAvecResultatsAnalyse(nameNode,"style hérité", nameStyleLegacyStudent, nameStyleLegacySujet + "" + point, nameElt);
}else {
evaluation.IncrementPointTotal(Integer.valueOf(point));
item = new node(nameNode, "Erreur : -"+evaluation.getPointEnJeu()+" pt", "style hérité" , "null", nameStyleLegacySujet, 2, evaluation.getPointEnJeu(),nameElt);
}
retour.getNodes().add(item);
return retour;
}
/**
* Si le node style:header-style ne possède pas d'attribut alors l'entete n'est pas activé.<br>
* Le nombre d'attribut est null.

View File

@ -61,6 +61,7 @@ public class afficheText extends JEditorPane {
String imageOU= "<img src="+afficheText.class.getResource("/resources/oumini.png").toString()+">";
String imageEvalPlacement= "<img src="+afficheText.class.getResource("/resources/ordreparagraphemini.png").toString()+">";
String imageMarqueNode= "<img src="+afficheText.class.getResource("/resources/marquenodemini.png").toString()+">";
String imageEvalNameLegacyStyle= "<img src="+afficheText.class.getResource("/resources/heritagestylemini.png").toString()+">";
StringBuilder sb = new StringBuilder();
@ -214,7 +215,9 @@ public class afficheText extends JEditorPane {
if(Lesattributsdunode.get(i).equals("evalPlacement") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) {
sb.append("<li class=\"p4\">"+imageEvalPlacement+ " <b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
}
if(Lesattributsdunode.get(i).equals("evalNameLegacyStyle") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) {
sb.append("<li class=\"p4\">"+imageEvalNameLegacyStyle+ " <b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
}
// sb.append("<li class=\"p4\"><b>" + Lesattributsdunode.get(i) + "=\"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
}
@ -375,13 +378,9 @@ public class afficheText extends JEditorPane {
* Affiche le chargement du fichier d'analyse.</br>
*/
public void afficheChargementFichierAnalyse(){
System.out.println( "Affichage information du fichier d'analyse" );
String v = commandes.analyse_version;
if(v.isEmpty()) v = commandes.version;
StringBuilder text = new StringBuilder();
text.append(baliseStyle.balise());
text.append("<hr><h1><u>INFORMATIONS</u></h1><p>Fichier d'analyse créé avec la version : " + v+ "</p><hr><br>");

View File

@ -435,6 +435,10 @@ public final class create extends JFrame {
toolBarPrincipal.addSeparator();
JButton btnTotalPoint = new JButton(new actTotalPoint());
btnTotalPoint.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
}
});
btnTotalPoint.setToolTipText("Nombre de point total dans l'exercice.");
btnTotalPoint.setText("");
btnTotalPoint.setIcon(new ImageIcon(create.class.getResource("/resources/totalpoint.png")));

View File

@ -41,6 +41,10 @@ import fenetres.create_act.actEvalTextUserDefinedNon;
import fenetres.create_act.actEvalTextUserDefinedOui;
import fenetres.create_act.actEvalueFalse;
import fenetres.create_act.actEvalueTrue;
import fenetres.create_act.actEvaluerNomDuStyleHeriteFalse;
import fenetres.create_act.actEvaluerNomDuStyleHeriteTousLesNodesFalse;
import fenetres.create_act.actEvaluerNomDuStyleHeriteTousLesNodesTrue;
import fenetres.create_act.actEvaluerNomDuStyleHeriteTrue;
import fenetres.create_act.actEvaluerStyleFalse;
import fenetres.create_act.actEvaluerStyleTrue;
import fenetres.create_act.actEvaluerTousLesStylesParagraphesFalse;
@ -316,7 +320,7 @@ if(nod!=null) {
* @return
*/
private JMenu mnAnalyseStyle() {
JMenu mnAnalyseStyle = new JMenu("Evaluer le style");
JMenu mnAnalyseStyle = new JMenu("Evaluer le style appliqué");
mnAnalyseStyle.setIcon(new ImageIcon(create.class.getResource("/resources/evaluerstylemini.png")));
mnAnalyseStyle.add(new actEvaluerStyleTrue());
mnAnalyseStyle.add( new actEvaluerStyleFalse());
@ -551,6 +555,33 @@ if(nod!=null) {
return mnMarqueNode;
}
/**
* Menu pour évaluer le nom du style hérité.</br>
* Permet d'évaluer les formatages directs sans utiliser analyseStyle.</br>
* @return
*/
private JMenu mnEvalNameLegacyStyle() {
JMenu mnevalNameLegacyStyle = new JMenu("Evaluer le nom du style hérité");
mnevalNameLegacyStyle.setIcon( new ImageIcon(create.class.getResource("/resources/heritagestylemini.png")));
mnevalNameLegacyStyle.add(new actEvaluerNomDuStyleHeriteTrue());
mnevalNameLegacyStyle.add( new actEvaluerNomDuStyleHeriteFalse());
return mnevalNameLegacyStyle;
}
/**
* Menu pour évaluer le nom du style hérité de tous les nodes text:p, text:h, text:span (voir plus tard text:list).</br>
* Permet d'évaluer les formatages directs sans utiliser analyseStyle.</br>
* @return
*/
private JMenu mnEvalNameLegacyStyleTousLesNodes() {
JMenu mnevalNameLegacyStyle = new JMenu("Evaluer les noms de tous des styles hérités, de tous les nodes");
mnevalNameLegacyStyle.setIcon( new ImageIcon(create.class.getResource("/resources/heritagestyletouslesnodesmini.png")));
mnevalNameLegacyStyle.add(new actEvaluerNomDuStyleHeriteTousLesNodesTrue());
mnevalNameLegacyStyle.add( new actEvaluerNomDuStyleHeriteTousLesNodesFalse());
return mnevalNameLegacyStyle;
}
/**
* Menu regroupant les menus permettant de recherche un node par son contenu textuel.</br>
@ -605,6 +636,8 @@ if(nod!=null) {
if(listeDesNodesAnalyseStyle.isAnalyseStyle(nod)) {
mnGroupeMethodeEvaluer.addSeparator();
mnGroupeMethodeEvaluer.add(mnAnalyseStyle());
mnGroupeMethodeEvaluer.addSeparator();
mnGroupeMethodeEvaluer.add(mnEvalNameLegacyStyle());
}
if(listeDesNodesEvalPlacement.isPlacement(nod)) {
@ -621,6 +654,8 @@ if(nod!=null) {
mnGroupeMethodeEvaluer.add(mnEvalNumeroAbsoluePage());
mnGroupeMethodeEvaluer.addSeparator();
mnGroupeMethodeEvaluer.add(mnEvaluerStylesParagraphes());
mnGroupeMethodeEvaluer.addSeparator();
mnGroupeMethodeEvaluer.add(mnEvalNameLegacyStyleTousLesNodes());
}
if(listeDesNodesPourEvaluationEntetePage.isEntete(nod)) {

View File

@ -17,7 +17,7 @@ public class actEvalNameNodeNon extends AbstractAction{
private static final long serialVersionUID = 1L;
{
putValue( Action.NAME, "Supprime l'évaluation de la présence du node" );
putValue( Action.SHORT_DESCRIPTION, "Supprime l'évaluation de la présence du node" );
putValue( Action.SHORT_DESCRIPTION, "Supprime l'évaluation de la présence du node." );
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/falsemini.png")) );
}
@Override

View File

@ -19,7 +19,7 @@ public class actEvalNameNodeOui extends AbstractAction{
private static final long serialVersionUID = 1L;
{
putValue( Action.NAME, "Oui, combien de point?" );
putValue( Action.SHORT_DESCRIPTION, "Evaluer la présence de ce node" );
putValue( Action.SHORT_DESCRIPTION, "Evaluer la présence de ce node." );
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/truemini.png")) );
}
@Override

View File

@ -0,0 +1,30 @@
package fenetres.create_act;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.ImageIcon;
import cXML.node;
import fenetres.create;
public class actEvaluerNomDuStyleHeriteFalse extends AbstractAction{
{
putValue( Action.NAME, "Supprime l'évaluation du nom du style hérité." );
putValue( Action.SHORT_DESCRIPTION, "Supprime l'évaluation du nom du style hérité." );
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/falsemini.png")) );
}
/**
*
*/
private static final long serialVersionUID = 1L;
@Override
public void actionPerformed(ActionEvent e) {
node nod = (node) fenetres.create.getSelectNode().getUserObject();
nod.supprimeAttribut("evalNameLegacyStyle");
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
}
}

View File

@ -0,0 +1,35 @@
package fenetres.create_act;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.ImageIcon;
import cXML.node;
import fenetres.create;
import list.listeDesNodesAnalyseStyle;
public class actEvaluerNomDuStyleHeriteTousLesNodesFalse extends AbstractAction{
{
putValue( Action.NAME, "Supprime l'évaluation de tous les noms des styles hérités dans tous les nodes." );
putValue( Action.SHORT_DESCRIPTION, "Supprime l'évaluation des noms des styles hérités." );
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/falsemini.png")) );
}
/**
*
*/
private static final long serialVersionUID = 1L;
@Override
public void actionPerformed(ActionEvent e) {
node nod = (node) fenetres.create.getSelectNode().getUserObject();
for(int i = 0 ; i < nod.getNodes().size();i++) {
if(listeDesNodesAnalyseStyle.isAnalyseStyle(nod.getNodes().get(i))) {
nod.getNodes().get(i).supprimeAttribut("evalNameLegacyStyle");
}
}
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
}
}

View File

@ -0,0 +1,60 @@
package fenetres.create_act;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.ImageIcon;
import javax.swing.JOptionPane;
import cXML.node;
import fenetres.baliseStyle;
import fenetres.create;
import list.listeDesNodesAnalyseStyle;
public class actEvaluerNomDuStyleHeriteTousLesNodesTrue extends AbstractAction{
{
putValue( Action.NAME, "Oui, combien de point?" );
putValue( Action.SHORT_DESCRIPTION, "Evaluer le nom du style hérité. Si pas d'héritage alors évalue celui du nom de ce style.\n"
+ "Interreant pour les formatages directs.");
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/truemini.png")));
}
/**
*
*/
private static final long serialVersionUID = 1L;
@Override
public void actionPerformed(ActionEvent e) {
node nod = (node) fenetres.create.getSelectNode().getUserObject();
int point = 0;
String a = JOptionPane.showInputDialog(null,"Quel est le nombre de point?",point);
if(!a.isEmpty()) {
try {
point = Integer.valueOf(a);
if(point<=0) {
nod.getAttributs().put("evalNameNode", String.valueOf(0));
fenetres.create.getTextNodeSelect().setText(baliseStyle.balise());
fenetres.create.getTextNodeSelect().setText("<h2>Erreur la valeur doit être un nombre entier POSITIF supérieur à zéro.<br>Cependant,la valeur a été modifiée.<br>evalNameLegacyStyle=0.</h2>");
}else {
for(int i = 0 ; i < nod.getNodes().size(); i++) {
if(listeDesNodesAnalyseStyle.isAnalyseStyle(nod.getNodes().get(i))) {
nod.getNodes().get(i).getAttributs().put("evalNameLegacyStyle", String.valueOf(point));
}
}
}
} catch (Exception e2) {
fenetres.create.getTextNodeSelect().setText(baliseStyle.balise());
fenetres.create.getTextNodeSelect().setText("<h2>Erreur la valeur doit être un nombre entier.<br>L'attribut n'a pas été modifiée.</h2>");
}
}
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
}
}

View File

@ -0,0 +1,54 @@
package fenetres.create_act;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.ImageIcon;
import javax.swing.JOptionPane;
import cXML.node;
import fenetres.baliseStyle;
import fenetres.create;
public class actEvaluerNomDuStyleHeriteTrue extends AbstractAction{
{
putValue( Action.NAME, "Oui, combien de point?" );
putValue( Action.SHORT_DESCRIPTION, "Evaluer le nom du style hérité. Si pas d'héritage alors évalue celui du nom de ce style.\n"
+ "Interreant pour les formatages directs.");
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/truemini.png")));
}
/**
*
*/
private static final long serialVersionUID = 1L;
@Override
public void actionPerformed(ActionEvent e) {
node nod = (node) fenetres.create.getSelectNode().getUserObject();
int point = 0;
if(nod.getAttributs().get("evalNameLegacyStyle")!=null) {
point = Integer.valueOf(nod.getAttributs().get("evalNameLegacyStyle"));
}
String a = JOptionPane.showInputDialog(null,"Quel est le nombre de point?",point);
if(!a.isEmpty()) {
try {
point = Integer.valueOf(a);
if(point<=0) {
nod.getAttributs().put("evalNameNode", String.valueOf(0));
fenetres.create.getTextNodeSelect().setText(baliseStyle.balise());
fenetres.create.getTextNodeSelect().setText("<h2>Erreur la valeur doit être un nombre entier POSITIF supérieur à zéro.<br>Cependant,la valeur a été modifiée.<br>evalNameLegacyStyle=0.</h2>");
}else {
nod.getAttributs().put("evalNameLegacyStyle", String.valueOf(point));
}
} catch (Exception e2) {
fenetres.create.getTextNodeSelect().setText(baliseStyle.balise());
fenetres.create.getTextNodeSelect().setText("<h2>Erreur la valeur doit être un nombre entier.<br>L'attribut n'a pas été modifiée.</h2>");
}
}
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
}
}

View File

@ -195,7 +195,6 @@ public class evaluerLesFichiersEtudiants implements Runnable{
if(!commandes.sansFeeback&&!commandes.ecritNodeAnalyse) {
if(!commandes.zipfeedback) {
//feedback(ana, verif); //classique directement dans le répertoire
System.out.println("feedback non zippé.");
try {
feedbacks.feedback(ana,verif, false,false);
} catch (IOException e) {

View File

@ -23,6 +23,7 @@ public class listeAttributsAnalyseWriter {
if(attribut.equals("marquenode")) return true;
if(attribut.equals("poids")) return true;
if(attribut.equals("analyseStyle")) return true;
if(attribut.equals("evalNameLegacyStyle")) return true;
if(attribut.equals("allContent")) return true;
if(attribut.equals("index")) return true;
if(attribut.equals("recherche_index")) return true;

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 719 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB