ajout des attribut xanalyseWriter evalEntetePasActive et

evalPiedPagePasActive
This commit is contained in:
pablo rodriguez 2022-06-15 20:47:04 +02:00
parent 82356e09a3
commit 4c2324225d
82 changed files with 799 additions and 11 deletions

Binary file not shown.

Binary file not shown.

7
bin/.gitignore vendored
View File

@ -1,3 +1,10 @@
/MEPTL/
/app/
/calcul/
/resources/
/entetenon.png
/entetenon.svg
/entetenonmini.png
/piedpagenon.png
/piedpagenon.svg
/piedpagenonmini.png

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

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/entetenon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

271
icons/entetenon.svg Normal file
View File

@ -0,0 +1,271 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Users\pabr6\git\analyseWriter\MEPTL\icons\entetenon.png"
sodipodi:docname="entetenon.svg"
inkscape:version="1.1.2 (b8e25be833, 2022-02-05)"
id="svg8"
version="1.1"
viewBox="0 0 12.7 12.7"
height="48"
width="48"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<defs
id="defs2">
<linearGradient
id="k"
gradientTransform="matrix(7.99974,0,0,7.9977797,-863.30581,-7811.3988)"
gradientUnits="userSpaceOnUse"
x1="122.75008"
x2="111.74973"
xlink:href="#b"
y1="991.62115"
y2="977.11713" />
<linearGradient
id="b">
<stop
offset="0"
stop-color="#0369a3"
id="stop7" />
<stop
offset="1"
stop-color="#1c99e0"
id="stop9" />
</linearGradient>
<linearGradient
id="j"
gradientUnits="userSpaceOnUse"
x1="108.00134"
x2="20.001341"
y1="122"
y2="6"
gradientTransform="translate(10.661607,-2.6314354)">
<stop
offset="0"
stop-color="#e6e6e6"
id="stop35" />
<stop
offset="1"
stop-color="#fff"
id="stop37" />
</linearGradient>
<linearGradient
id="i"
gradientUnits="userSpaceOnUse"
x1="108.00134"
x2="20.001341"
xlink:href="#b"
y1="130"
y2="14"
gradientTransform="translate(12)" />
<linearGradient
id="h"
gradientTransform="matrix(4.4999,0,0,3.66665,-930.97741,2199.6564)"
gradientUnits="userSpaceOnUse"
x2="0"
y1="-581.63782"
y2="-578.63782">
<stop
offset="0"
stop-color="#63bbee"
id="stop29" />
<stop
offset="1"
stop-color="#aadcf7"
id="stop31" />
</linearGradient>
<linearGradient
id="g"
gradientTransform="matrix(-4.19983,0,0,3.9111,1552.9405,-4523.1636)"
gradientUnits="userSpaceOnUse"
x2="0"
xlink:href="#a"
y1="1173"
y2="1178" />
<linearGradient
id="a">
<stop
offset="0"
stop-color="#666"
id="stop2" />
<stop
offset="1"
stop-color="#333"
id="stop4" />
</linearGradient>
<linearGradient
id="f"
gradientTransform="matrix(4.19983,0,0,3.9111,-1380.9394,-4521.9436)"
gradientUnits="userSpaceOnUse"
x2="0"
xlink:href="#a"
y1="1173"
y2="1178" />
<linearGradient
id="e"
gradientTransform="matrix(1.19997,0,0,1.22222,-269.19161,858.5534)"
gradientUnits="userSpaceOnUse"
x2="0"
y1="-629.66907"
y2="-635.54944">
<stop
offset="0"
stop-color="#18a303"
id="stop22" />
<stop
offset="1"
stop-color="#106802"
id="stop24" />
</linearGradient>
<linearGradient
id="d"
gradientTransform="matrix(4.19983,0,0,3.9111,-1380.9394,-4517.0536)"
gradientUnits="userSpaceOnUse"
x2="0"
y1="1173"
y2="1178">
<stop
offset="0"
stop-color="#0369a3"
id="stop17" />
<stop
offset="1"
stop-color="#023f62"
id="stop19" />
</linearGradient>
<linearGradient
id="c"
gradientTransform="matrix(0,0.791084,-1.28,0,1511.6005,-282.0136)"
gradientUnits="userSpaceOnUse"
x1="445.69522"
x2="441.38797"
y1="1103.5776"
y2="1099.8198">
<stop
offset="0"
stop-color="#e9b913"
id="stop12" />
<stop
offset="1"
stop-color="#ff0"
id="stop14" />
</linearGradient>
<linearGradient
id="k-5"
gradientTransform="matrix(7.3290847,0,0,7.3272888,-782.49722,-7149.5485)"
gradientUnits="userSpaceOnUse"
x1="122.75008"
x2="111.74973"
xlink:href="#b"
y1="991.62115"
y2="977.11713" />
</defs>
<sodipodi:namedview
inkscape:window-maximized="1"
inkscape:window-y="-8"
inkscape:window-x="-8"
inkscape:window-height="1009"
inkscape:window-width="1920"
inkscape:guide-bbox="true"
showguides="true"
units="px"
showgrid="false"
inkscape:document-rotation="0"
inkscape:current-layer="g14476"
inkscape:document-units="mm"
inkscape:cy="21.925796"
inkscape:cx="24.500416"
inkscape:zoom="12.040612"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#ffffff"
id="base"
inkscape:pagecheckerboard="0"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:snap-bbox="true"
inkscape:bbox-paths="true"
inkscape:bbox-nodes="true"
inkscape:snap-midpoints="true"
inkscape:object-paths="true"
inkscape:snap-global="false" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:groupmode="layer"
inkscape:label="Calque 1"
transform="translate(-1.1301771,-2.0290664)">
<g
id="g941"
transform="translate(10.112644,5.4757388)">
<g
id="g14476"
transform="matrix(0.09394189,0,0,0.09394189,8.4128076,3.1183643)">
<rect
style="fill:#808080;fill-opacity:0.716586;stroke:none;stroke-width:8.81024;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;paint-order:fill markers stroke;stop-color:#000000"
id="rect1086"
width="91.092278"
height="118.22622"
x="-163.46671"
y="-59.641872"
ry="10.019171" />
<rect
style="fill:#ff0000;fill-opacity:0.716586;stroke:none;stroke-width:9.37813;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;paint-order:fill markers stroke;stop-color:#000000"
id="rect1311"
width="73.91655"
height="11.227831"
x="-155.22971"
y="-54.211838"
ry="0" />
<rect
style="fill:#ffffff;fill-opacity:0.716586;stroke:none;stroke-width:9.37813;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;paint-order:fill markers stroke;stop-color:#000000"
id="rect1656"
width="74.618294"
height="83.974815"
x="-156.16534"
y="-41.346615" />
<rect
style="fill:#ffffff;fill-opacity:0.716586;stroke:none;stroke-width:9.37813;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;paint-order:fill markers stroke;stop-color:#000000"
id="rect1702"
width="74.618294"
height="9.5904388"
x="-155.93144"
y="44.967339" />
<g
id="g2154"
transform="matrix(0.74753563,0,0,0.74753563,-30.969831,-14.97609)">
<path
style="fill:#000000;stroke:#000000;stroke-width:8.14333;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m -96.283584,-65.439669 -43.507846,43.741758"
id="path1853" />
<path
style="fill:#000000;stroke:#000000;stroke-width:8.14333;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m -139.79143,-65.439669 43.507846,43.741758"
id="path2150" />
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.1 KiB

BIN
icons/entetenonmini.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 672 B

BIN
icons/piedpagenon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 997 B

271
icons/piedpagenon.svg Normal file
View File

@ -0,0 +1,271 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
inkscape:export-ydpi="48"
inkscape:export-xdpi="48"
inkscape:export-filename="C:\Users\pabr6\git\analyseWriter\MEPTL\icons\piedpagenonmini.png"
sodipodi:docname="piedpagenon.svg"
inkscape:version="1.1.2 (b8e25be833, 2022-02-05)"
id="svg8"
version="1.1"
viewBox="0 0 12.7 12.7"
height="48"
width="48"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<defs
id="defs2">
<linearGradient
id="k"
gradientTransform="matrix(7.99974,0,0,7.9977797,-863.30581,-7811.3988)"
gradientUnits="userSpaceOnUse"
x1="122.75008"
x2="111.74973"
xlink:href="#b"
y1="991.62115"
y2="977.11713" />
<linearGradient
id="b">
<stop
offset="0"
stop-color="#0369a3"
id="stop7" />
<stop
offset="1"
stop-color="#1c99e0"
id="stop9" />
</linearGradient>
<linearGradient
id="j"
gradientUnits="userSpaceOnUse"
x1="108.00134"
x2="20.001341"
y1="122"
y2="6"
gradientTransform="translate(10.661607,-2.6314354)">
<stop
offset="0"
stop-color="#e6e6e6"
id="stop35" />
<stop
offset="1"
stop-color="#fff"
id="stop37" />
</linearGradient>
<linearGradient
id="i"
gradientUnits="userSpaceOnUse"
x1="108.00134"
x2="20.001341"
xlink:href="#b"
y1="130"
y2="14"
gradientTransform="translate(12)" />
<linearGradient
id="h"
gradientTransform="matrix(4.4999,0,0,3.66665,-930.97741,2199.6564)"
gradientUnits="userSpaceOnUse"
x2="0"
y1="-581.63782"
y2="-578.63782">
<stop
offset="0"
stop-color="#63bbee"
id="stop29" />
<stop
offset="1"
stop-color="#aadcf7"
id="stop31" />
</linearGradient>
<linearGradient
id="g"
gradientTransform="matrix(-4.19983,0,0,3.9111,1552.9405,-4523.1636)"
gradientUnits="userSpaceOnUse"
x2="0"
xlink:href="#a"
y1="1173"
y2="1178" />
<linearGradient
id="a">
<stop
offset="0"
stop-color="#666"
id="stop2" />
<stop
offset="1"
stop-color="#333"
id="stop4" />
</linearGradient>
<linearGradient
id="f"
gradientTransform="matrix(4.19983,0,0,3.9111,-1380.9394,-4521.9436)"
gradientUnits="userSpaceOnUse"
x2="0"
xlink:href="#a"
y1="1173"
y2="1178" />
<linearGradient
id="e"
gradientTransform="matrix(1.19997,0,0,1.22222,-269.19161,858.5534)"
gradientUnits="userSpaceOnUse"
x2="0"
y1="-629.66907"
y2="-635.54944">
<stop
offset="0"
stop-color="#18a303"
id="stop22" />
<stop
offset="1"
stop-color="#106802"
id="stop24" />
</linearGradient>
<linearGradient
id="d"
gradientTransform="matrix(4.19983,0,0,3.9111,-1380.9394,-4517.0536)"
gradientUnits="userSpaceOnUse"
x2="0"
y1="1173"
y2="1178">
<stop
offset="0"
stop-color="#0369a3"
id="stop17" />
<stop
offset="1"
stop-color="#023f62"
id="stop19" />
</linearGradient>
<linearGradient
id="c"
gradientTransform="matrix(0,0.791084,-1.28,0,1511.6005,-282.0136)"
gradientUnits="userSpaceOnUse"
x1="445.69522"
x2="441.38797"
y1="1103.5776"
y2="1099.8198">
<stop
offset="0"
stop-color="#e9b913"
id="stop12" />
<stop
offset="1"
stop-color="#ff0"
id="stop14" />
</linearGradient>
<linearGradient
id="k-5"
gradientTransform="matrix(7.3290847,0,0,7.3272888,-782.49722,-7149.5485)"
gradientUnits="userSpaceOnUse"
x1="122.75008"
x2="111.74973"
xlink:href="#b"
y1="991.62115"
y2="977.11713" />
</defs>
<sodipodi:namedview
inkscape:window-maximized="1"
inkscape:window-y="-8"
inkscape:window-x="-8"
inkscape:window-height="1009"
inkscape:window-width="1920"
inkscape:guide-bbox="true"
showguides="true"
units="px"
showgrid="false"
inkscape:document-rotation="0"
inkscape:current-layer="g14476"
inkscape:document-units="mm"
inkscape:cy="21.925796"
inkscape:cx="19.185071"
inkscape:zoom="12.040612"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#ffffff"
id="base"
inkscape:pagecheckerboard="0"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:snap-bbox="true"
inkscape:bbox-paths="true"
inkscape:bbox-nodes="true"
inkscape:snap-midpoints="true"
inkscape:object-paths="true"
inkscape:snap-global="false" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:groupmode="layer"
inkscape:label="Calque 1"
transform="translate(-1.1301771,-2.0290664)">
<g
id="g941"
transform="translate(10.112644,5.4757388)">
<g
id="g14476"
transform="matrix(0.09394189,0,0,0.09394189,8.4128076,3.1183643)">
<rect
style="fill:#808080;fill-opacity:0.716586;stroke:none;stroke-width:8.81024;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;paint-order:fill markers stroke;stop-color:#000000"
id="rect1086"
width="91.092278"
height="118.22622"
x="-163.46671"
y="-59.641872"
ry="10.019171" />
<rect
style="fill:#e3e3e3;fill-opacity:0.921569;stroke:none;stroke-width:9.37813;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;paint-order:fill markers stroke;stop-color:#000000"
id="rect1311"
width="73.91655"
height="11.227831"
x="-156.16536"
y="-54.679665"
ry="0" />
<rect
style="fill:#ffffff;fill-opacity:0.716586;stroke:none;stroke-width:9.37813;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;paint-order:fill markers stroke;stop-color:#000000"
id="rect1656"
width="74.618294"
height="83.974815"
x="-156.16534"
y="-41.346615" />
<rect
style="fill:#e31c1c;fill-opacity:0.92156863;stroke:none;stroke-width:9.37813;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;paint-order:fill markers stroke;stop-color:#000000"
id="rect1702"
width="74.618294"
height="9.5904388"
x="-155.93144"
y="44.967339" />
<g
id="g2154"
transform="matrix(0.74753563,0,0,0.74753563,-31.437657,78.121342)">
<path
style="fill:#000000;stroke:#000000;stroke-width:8.14333;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m -96.283584,-65.439669 -43.507846,43.741758"
id="path1853" />
<path
style="fill:#000000;stroke:#000000;stroke-width:8.14333;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m -139.79143,-65.439669 43.507846,43.741758"
id="path2150" />
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.1 KiB

BIN
icons/piedpagenonmini.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 596 B

View File

@ -72,7 +72,6 @@ public class ecritureSujet {
no.get(j).getAttributs().put("saut", "false");
no.get(j).getAttributs().put("evaluer", "false");
no.get(j).getAttributs().put("titre", "");
no.get(j).getAttributs().put("styletitre", "nostyle");
no.get(j).getAttributs().put("evalNameNode", "0");
if(no.get(j).getNomElt().equals("dc:creator")) no.get(j).getAttributs().put("evalNameCreator", "0");
if(no.get(j).getNomElt().equals("meta:initial-creator")) no.get(j).getAttributs().put("evalNameInitialCreator", "0");
@ -207,7 +206,6 @@ public class ecritureSujet {
nodbiblio.getAttributs().put("addmenu", "false");
nodbiblio.getAttributs().put("poids", "1");
nodbiblio.getAttributs().put("titre", "La bibliographie");
//nodbiblio.getAttributs().put("styletitre", "H1");
nodbiblio = addAttributsAnalyseWriter(nodbiblio, "text:bibliography");
nod.getNodes().add(nodbiblio);
@ -284,7 +282,6 @@ public class ecritureSujet {
no.get(j).getAttributs().put("saut", "false");
no.get(j).getAttributs().put("evaluer", "false");
no.get(j).getAttributs().put("titre", "");
no.get(j).getAttributs().put("styletitre", "nostyle");
if(!no.get(j).getNodes().isEmpty()) {
nextNodesEnfants(no.get(j).getNodes());
}

View File

@ -30,6 +30,7 @@ import javax.xml.parsers.ParserConfigurationException;
import org.xml.sax.SAXException;
import cXML.node;
import calcul.listeAttributsAnalyseWriter;
import cXML.Run;
import cXML.Run.UserStatus;
import net.lingala.zip4j.exception.ZipException;
@ -1916,6 +1917,7 @@ public class meptl {
}
}
// evaluer avec evalNameNode, evalNameCreator, evalNameInitialCreator, evalEntetePasActive, evalPiedPagePasActive
if(!sujet.getAttributs().get(k).equals("0")) {
if(k.equals("evalNameNode") && !sujet.getAttributs().get(k).equals("0")) {
if(nodeStudent!=null) {
@ -1929,7 +1931,7 @@ public class meptl {
if(nodeStudent!=null) {
retour = evaluNameCreator(retour,nodeStudent, nodeStudent.getContenu().get(0), sujet.getAttributs().get("evalNameCreator"),"Editeur");
}else {
retour = evaluNameCreator(retour,null, "Pas trouvé le champ auteur", sujet.getAttributs().get("evalNameCreator"),"Editeur");
retour = evaluNameCreator(retour,null, "Pas trouvé l'auteur", sujet.getAttributs().get("evalNameCreator"),"Editeur");
}
}
@ -1937,14 +1939,65 @@ public class meptl {
if(nodeStudent!=null) {
retour = evalNameInitialCreator(retour,nodeStudent, nodeStudent.getContenu().get(0), sujet.getAttributs().get("evalNameInitialCreator"),"Créateur");
}else {
retour = evalNameInitialCreator(retour,null, "Créateur inconnu", sujet.getAttributs().get("evalNameInitialCreator"),"Créateur");
retour = evalNameInitialCreator(retour,null, "Pas trouvé le créateur", sujet.getAttributs().get("evalNameInitialCreator"),"Créateur");
}
}
if(k.equals("evalEntetePasActive") && sujet.getNomElt().equals("style:header-style")) {
if(nodeStudent!=null) {
int nbA=0;
int nbAs=0;
String reponseSujet = "oui";
String reponseStudent = "oui";
Enumeration<String> key1 = sujet.getAttributs().keys();
while(key1.hasMoreElements()) {
String k1 = key1.nextElement();
if(listeAttributsAnalyseWriter.isAttributAnalyseWriter(k1)) nbA++;
}
if(nbA==0) reponseSujet = "non";
key1 = nodeStudent.getAttributs().keys();
while(key1.hasMoreElements()) {
String k1 = key1.nextElement();
if(listeAttributsAnalyseWriter.isAttributAnalyseWriter(k1)) nbAs++;
}
if(nbAs==0)reponseStudent = "non";
retour = evaluEntetePasActive(retour,reponseStudent,reponseSujet,sujet.getAttributs().get("evalEntetePasActive"),"Entete");
}else {
retour = evaluEntetePasActive(retour,null, "Pas trouvé le node de l'étudiant", sujet.getAttributs().get("evalEntetePasActive"),"Entete");
}
}
if(k.equals("evalPiedPagePasActive") && sujet.getNomElt().equals("style:footer-style")) {
if(nodeStudent!=null) {
int nbA=0;
int nbAs=0;
String reponseSujet = "oui";
String reponseStudent = "oui";
Enumeration<String> key1 = sujet.getAttributs().keys();
while(key1.hasMoreElements()) {
String k1 = key1.nextElement();
if(listeAttributsAnalyseWriter.isAttributAnalyseWriter(k1)) nbA++;
}
if(nbA==0) reponseSujet = "non";
key1 = nodeStudent.getAttributs().keys();
while(key1.hasMoreElements()) {
String k1 = key1.nextElement();
if(listeAttributsAnalyseWriter.isAttributAnalyseWriter(k1)) nbAs++;
}
if(nbAs==0)reponseStudent = "non";
retour = evaluPiedPagePasActive(retour,reponseStudent,reponseSujet , sujet.getAttributs().get("evalEntetePasActive"),"Pied page");
}else {
retour = evaluPiedPagePasActive(retour,null, "Pas trouvé le node de l'étudiant", sujet.getAttributs().get("evalEntetePasActive"),"Pied page");
}
}
}
}
//avec l'attribut allContent="strict1", allContent="strictSansEspace1" et allContent="environ1" alors analyse tout le contenu du node
//avec l'attribut allContent="strict1", allContent="strictSansEspace1" et allContent="environ1"
// il faut ajouter une méthode pour ignorer la casse
if(sujet.getAttributs().get("allContent")!=null) if(!sujet.getAttributs().get("allContent").isEmpty()){
String points ="‽0";
if(sujet.getAttributs().get("allContent").contains("strict")) points = sujet.getAttributs().get("allContent").replace("strict", "");
@ -3188,6 +3241,42 @@ public class meptl {
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.
* @param retour
* @param nodStudent
* @param nameNode
* @param point
* @param nameElt
* @return
*/
private static node evaluEntetePasActive(node retour, String nbAttributStudent, String nbAttribut, String point, String nameElt) {
node item = null;
if(nbAttributStudent!=null) {
item = retourneNoteAvecResultatsAnalyse(nbAttribut,"active", nbAttributStudent,nbAttribut + "" +point, nameElt );
}else {
outils.IncrementPointTotal(Integer.valueOf(point));
item = new node(nbAttribut, "Erreur", "active" , "null", nbAttribut, 2, outils.getPointEnJeu(),nameElt);
}
retour.getNodes().add(item);
return retour;
}
private static node evaluPiedPagePasActive(node retour, String nbAttributStudent, String nbAttribut, String point, String nameElt) {
node item = null;
if(nbAttributStudent!=null) {
item = retourneNoteAvecResultatsAnalyse(nbAttribut,"active", nbAttributStudent,nbAttribut + "" +point, nameElt );
}else {
outils.IncrementPointTotal(Integer.valueOf(point));
item = new node(nbAttribut, "Erreur", "active" , "null", nbAttribut, 2, outils.getPointEnJeu(),nameElt);
}
retour.getNodes().add(item);
return retour;
}
/**
* Evalue le champ auteur (éditeur).
* @param retour

View File

@ -49,6 +49,8 @@ public class afficheText extends JEditorPane {
String imagerePremierAuteur= "<img src="+afficheText.class.getResource("/resources/auteurcreateurmini.png").toString()+">";
String imagereDernierEditeur= "<img src="+afficheText.class.getResource("/resources/auteurediteurmini.png").toString()+">";
String imageAtraversAnalyseStyle= "<img src="+afficheText.class.getResource("/resources/atraversanalysestylemini.png").toString()+">";
String imageEntetePasActive= "<img src="+afficheText.class.getResource("/resources/entetenonmini.png").toString()+">";
String imagePiedPagePasActive= "<img src="+afficheText.class.getResource("/resources/piedpagenonmini.png").toString()+">";
StringBuilder sb = new StringBuilder();
@ -158,6 +160,12 @@ public class afficheText extends JEditorPane {
if(Lesattributsdunode.get(i).equals("EvaluerATraversAnalyseStyle") && nod.getAttributs().get(Lesattributsdunode.get(i)).equals("true")) {
sb.append("<li class=\"p4\">"+imageAtraversAnalyseStyle + " <b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
}
if(Lesattributsdunode.get(i).equals("evalEntetePasActive") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) {
sb.append("<li class=\"p4\">"+imageEntetePasActive + " <b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
}
if(Lesattributsdunode.get(i).equals("evalPiedPagePasActive") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) {
sb.append("<li class=\"p4\">"+imagePiedPagePasActive + " <b>" + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"</b></li>");
}

View File

@ -186,7 +186,6 @@ public class create extends JFrame {
boolean nodeSetting = false;
boolean nodeFormatageDirectePasDeTitrePasAddMenu = false;
if(nod.chemin().contains("setting")) nodeSetting=true;
node nodStyleParent = nod.retourneParentAyantLAttribut("style:name");
if(nodStyleParent!=null) {
@ -292,6 +291,18 @@ public class create extends JFrame {
mnAnalyseStyle.addSeparator();
mnAnalyseStyle.add(actEvaluerStyleFalse);
//Menu evalEntetePasActive (pour les style:header-style)
JMenu mnevalEntetePasActive = new JMenu("Entête pas activé");
mnevalEntetePasActive.setIcon(new ImageIcon(create.class.getResource("/resources/entetenonmini.png")));
mnevalEntetePasActive.add(actEvalEntetePasActive);
mnevalEntetePasActive.add(actEvalEnteteActive);
//Menu evalPiedPagePasActive (pour les style:footer-style)
JMenu mnevalPiedPagePasActive = new JMenu("Pied page pas activé");
mnevalPiedPagePasActive.setIcon(new ImageIcon(create.class.getResource("/resources/piedpagenonmini.png")));
mnevalPiedPagePasActive.add(actEvalPiedPagePasActive);
mnevalPiedPagePasActive.add(actEvalPiedPageActive);
//Menu Evaluer présence d'un node pour les nodes de niveau > 1
JMenu mnEvalNameNode = new JMenu("Evaluer la présence du node");
mnEvalNameNode.setIcon(new ImageIcon(create.class.getResource("/resources/evalnodemini.png")));
@ -360,6 +371,14 @@ public class create extends JFrame {
mnNiveauSup1.addSeparator();
mnNiveauSup1.add(mnRechercheParNumeroPageAncrer);
}
if(nod.getNomElt().equals("style:header-style")) {
mnNiveauSup1.addSeparator();
mnNiveauSup1.add(mnevalEntetePasActive);
}
if(nod.getNomElt().equals("style:footer-style")) {
mnNiveauSup1.addSeparator();
mnNiveauSup1.add(mnevalPiedPagePasActive);
}
//**Menu setting
@ -1075,8 +1094,135 @@ public class create extends JFrame {
}
};
/**
* Evalue l'absence de l'entête avec l'attribut evalEntetePasActive.
*/
private AbstractAction actEvalEntetePasActive = new AbstractAction() {
private static final long serialVersionUID = 1L;
{
putValue( Action.NAME, "Oui, combien de point?" );
putValue( Action.SHORT_DESCRIPTION, "Evaluer l'absence d'attribut du node" );
}
@Override public void actionPerformed( ActionEvent e ) {
DefaultMutableTreeNode selectNode = (DefaultMutableTreeNode) tree.getSelectionPath().getLastPathComponent();
node nod = (node) selectNode.getUserObject();
int point = 0;
if(nod.getAttributs().get("evalEntetePasActive")!=null) {
point = Integer.valueOf(nod.getAttributs().get("evalEntetePasActive"));
}
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("evalEntetePasActive", String.valueOf(0));
textNodeSelect.setText(balisestyles());
textNodeSelect.setText("<h2>Erreur la valeur doit être un nombre entier POSITIF supérieur à zéro.<br>Cependant,la valeur a été modifiée.<br>evalEntetePasActive=0.</h2>");
}else {
nod.getAttributs().put("evalEntetePasActive", String.valueOf(point));
}
} catch (Exception e2) {
textNodeSelect.setText(balisestyles());
textNodeSelect.setText("<h2>Erreur la valeur doit être un nombre entier.<br>L'attribut n'a pas été modifiée.</h2>");
}
}
textNodeSelect.refreshAffichage(nod);
}
};
/**
* Evalue l'absence du pied de page avec l'attribut evalPiedPagePasActive.
*/
private AbstractAction actEvalPiedPagePasActive = new AbstractAction() {
private static final long serialVersionUID = 1L;
{
putValue( Action.NAME, "Oui, combien de point?" );
putValue( Action.SHORT_DESCRIPTION, "Evaluer l'absence d'attribut du node" );
}
@Override public void actionPerformed( ActionEvent e ) {
DefaultMutableTreeNode selectNode = (DefaultMutableTreeNode) tree.getSelectionPath().getLastPathComponent();
node nod = (node) selectNode.getUserObject();
int point = 0;
if(nod.getAttributs().get("evalPiedPagePasActive")!=null) {
point = Integer.valueOf(nod.getAttributs().get("evalPiedPagePasActive"));
}
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("evalPiedPagePasActive", String.valueOf(0));
textNodeSelect.setText(balisestyles());
textNodeSelect.setText("<h2>Erreur la valeur doit être un nombre entier POSITIF supérieur à zéro.<br>Cependant,la valeur a été modifiée.<br>evalPiedPagePasActive=0.</h2>");
}else {
nod.getAttributs().put("evalPiedPagePasActive", String.valueOf(point));
}
} catch (Exception e2) {
textNodeSelect.setText(balisestyles());
textNodeSelect.setText("<h2>Erreur la valeur doit être un nombre entier.<br>L'attribut n'a pas été modifiée.</h2>");
}
}
textNodeSelect.refreshAffichage(nod);
}
};
/**
* Supprime l'attribut evalEntetePasActive
*/
private AbstractAction actEvalEnteteActive = new AbstractAction() {
private static final long serialVersionUID = 1L;
{
putValue( Action.NAME, "Supprime entête pas active" );
putValue( Action.SHORT_DESCRIPTION, "Supprime l'évaluation de l'absence d'attribut du node." );
}
@Override public void actionPerformed( ActionEvent e ) {
DefaultMutableTreeNode selectNode = (DefaultMutableTreeNode) tree.getSelectionPath().getLastPathComponent();
node nod = (node) selectNode.getUserObject();
nod.supprimeAttribut("evalEntetePasActive");
textNodeSelect.refreshAffichage(nod);
// refeshNodeSelected();
}
};
/**
* Supprime l'attribut evalPiedPagePasActive
*/
private AbstractAction actEvalPiedPageActive = new AbstractAction() {
private static final long serialVersionUID = 1L;
{
putValue( Action.NAME, "Supprime pied page pas active" );
putValue( Action.SHORT_DESCRIPTION, "Supprime l'évaluation de l'absence d'attribut du node." );
}
@Override public void actionPerformed( ActionEvent e ) {
DefaultMutableTreeNode selectNode = (DefaultMutableTreeNode) tree.getSelectionPath().getLastPathComponent();
node nod = (node) selectNode.getUserObject();
nod.supprimeAttribut("evalPiedPagePasActive");
textNodeSelect.refreshAffichage(nod);
}
};
/**
* Evalue la présence de ce node
*/
@ -1204,8 +1350,7 @@ public class create extends JFrame {
textNodeSelect.refreshAffichage(nod);
}
};
/**
* Evalue la présence de ce node
*/
@ -1228,8 +1373,6 @@ public class create extends JFrame {
}
};
/**
* Evalue la présence de ce node
*/

View File

@ -30,6 +30,8 @@ public class listeAttributsAnalyseWriter {
if(attribut.equals("numero")) return true;
if(attribut.equals("numeroabsolue")) return true;
if(attribut.equals("EvaluerATraversAnalyseStyle")) return true;
if(attribut.equals("evalEntetePasActive")) return true;
if(attribut.equals("evalPiedPagePasActive")) return true;
if(attribut.equals("analysis_filename")) return true;

BIN
src/resources/entetenon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 672 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 997 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 596 B