MAJ 4.4.0 Faille dans la simulation du calcul des points

This commit is contained in:
pablo rodriguez 2022-12-14 13:37:48 +01:00
parent f34d804cf1
commit 4543dcb243
32 changed files with 265 additions and 58 deletions

Binary file not shown.

Binary file not shown.

11
bin/.gitignore vendored
View File

@ -3,3 +3,14 @@
/evaluer/
/MEPTL/
/resources/
/dernierenfant.png
/dernierenfant.svg
/dernierenfantmini.png
/information.png
/information.svg
/informationmaxi.png
/informationmini.png
/premierenfant.png
/premierenfant.svg
/premierenfantmini.png
/calcul/

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

82
icons/dernierenfant.svg Normal file
View File

@ -0,0 +1,82 @@
<?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="dernierenfant.svg"
inkscape:export-filename="dernierenfantmini.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="16.511111"
inkscape:cx="22.5"
inkscape:cy="22.802826"
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="g589"
transform="translate(-0.48073688,-0.46471231)">
<rect
style="fill:#000000;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;paint-order:fill markers stroke;stop-color:#000000"
id="rect263"
width="1.5543826"
height="9.9512548"
x="1.8428249"
y="1.0095441" />
<rect
style="fill:#000000;stroke:#000000;stroke-width:0.999997;stroke-linecap:round;stroke-linejoin:round;paint-order:fill markers stroke;stop-color:#000000"
id="rect373"
width="1.5543826"
height="4.3907304"
x="9.4064178"
y="-6.2335539"
transform="rotate(90)"
ry="0"
rx="0" />
<rect
style="fill:#000000;stroke:#000000;stroke-width:0.999997;stroke-linecap:round;stroke-linejoin:round;paint-order:fill markers stroke;stop-color:#000000"
id="rect375"
width="1.5543826"
height="4.3907304"
x="3.8458955"
y="-6.2976522"
transform="rotate(90)" />
</g>
<ellipse
style="fill:#00ff00;stroke:#00ff00;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;paint-order:fill markers stroke;stop-color:#000000"
id="path483"
cx="7.5155201"
cy="9.2862339"
rx="2.0671687"
ry="2.0751808" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
icons/dernierenfantmini.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 443 B

BIN
icons/premierenfant.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 711 B

82
icons/premierenfant.svg Normal file
View File

@ -0,0 +1,82 @@
<?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="premierenfant.svg"
inkscape:export-filename="premierenfant.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
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="16.511111"
inkscape:cx="14.565949"
inkscape:cy="22.802827"
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="g589"
transform="translate(-0.48073688,-0.46471231)">
<rect
style="fill:#000000;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;paint-order:fill markers stroke;stop-color:#000000"
id="rect263"
width="1.5543826"
height="9.9512548"
x="1.8428249"
y="1.0095441" />
<rect
style="fill:#000000;stroke:#000000;stroke-width:0.999997;stroke-linecap:round;stroke-linejoin:round;paint-order:fill markers stroke;stop-color:#000000"
id="rect373"
width="1.5543826"
height="4.3907304"
x="9.4064178"
y="-6.2335539"
transform="rotate(90)"
ry="0"
rx="0" />
<rect
style="fill:#000000;stroke:#000000;stroke-width:0.999997;stroke-linecap:round;stroke-linejoin:round;paint-order:fill markers stroke;stop-color:#000000"
id="rect375"
width="1.5543826"
height="4.3907304"
x="3.8458955"
y="-6.2976522"
transform="rotate(90)" />
</g>
<ellipse
style="fill:#00ff00;stroke:#00ff00;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;paint-order:fill markers stroke;stop-color:#000000"
id="path483"
cx="7.7078147"
cy="4.0301771"
rx="2.0671687"
ry="2.0751808" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
icons/premierenfantmini.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 452 B

View File

@ -126,6 +126,22 @@ public class calculNombrePointEvaluation {
}
}
if(nod.getAttributs().get("evalFirstChild")!=null) {
try {
point = point + Integer.valueOf(nod.getAttributs().get("evalFirstChild"));
} catch (Exception e) {
JOptionPane.showInternalMessageDialog(null, "Erreur dans la valeur de l'attribut evalFirstChild");
}
}
if(nod.getAttributs().get("evalLastChild")!=null) {
try {
point = point + Integer.valueOf(nod.getAttributs().get("evalLastChild"));
} catch (Exception e) {
JOptionPane.showInternalMessageDialog(null, "Erreur dans la valeur de l'attribut evalLastChild");
}
}
//***********************************************
//** Les points par la méthode analyseStyle *****
//***********************************************
@ -177,13 +193,48 @@ public class calculNombrePointEvaluation {
* @return
*/
private static int calculNombreDepointDeAnalyseStyle(node nod, int point) {
if(nod!=null) {
if(nod.getAttributs().get("evaluer")!=null) if(nod.getAttributs().get("evaluer").equals("true")){
Enumeration<String> key = nod.getAttributs().keys();
while(key.hasMoreElements()) {
String k = key.nextElement();
if(nod.getAttributs().get(k).contains("")) {
Pattern pt = Pattern.compile("[0-9]{1,}$");
Matcher match= pt.matcher(nod.getAttributs().get(k));
if(match.find()) {
String s= match.group();
try {
point = point + Integer.valueOf(s);
} catch (Exception e) {
JOptionPane.showInternalMessageDialog(null, "Erreur dans la valeur de l'attribut "+ k);
}
}
}
}
if(nod.getNodes().size()>0) {
for(int i = 0 ; i < nod.getNodes().size();i++) {
point = calculNombreDepointDeAnalyseStyle(nod.getNodes().get(i), point);
}
}
}
}
return point;
}
if(nod.getAttributs().get("evaluer")!=null) if(nod.getAttributs().get("evaluer").equals("true")){
/**
* Calcul les points d'un style évalué par la méthode analyseStyle et qui hérite du node nod.<br>
* @param nod
* @param point
* @return
*/
@SuppressWarnings("unused")
private static int calculNombreDepointDepuisUnStyleDeAnalyseStyle(node nod, int point) {
Enumeration<String> key = nod.getAttributs().keys();
while(key.hasMoreElements()) {
String k = key.nextElement();
if(nod.getAttributs().get(k).contains("")) {
if(nod.getAttributs().get(k).contains("")||nod.getAttributs().get(k).contains("")) {
Pattern pt = Pattern.compile("[0-9]{1,}$");
Matcher match= pt.matcher(nod.getAttributs().get(k));
if(match.find()) {
@ -199,61 +250,12 @@ public class calculNombrePointEvaluation {
if(nod.getNodes().size()>0) {
for(int i = 0 ; i < nod.getNodes().size();i++) {
point = calculNombreDepointDeAnalyseStyle(nod.getNodes().get(i), point);
point = calculNombreDepointDepuisUnStyleDeAnalyseStyle(nod.getNodes().get(i), point);
}
}
// //****************************
// //*** Héritage d'un style ****
// //****************************
// if(nod.getAttributs().get("style:parent-style-name")!=null) {
// String nomDuStyleParent = nod.getAttributs().get("style:parent-style-name");
// Pattern p = Pattern.compile("^P[0-9]{1,}|^T[0-9]{1,}");
// Matcher m = p.matcher(nod.getAttributs().get("style:name"));
// if(m.find()) {
// point = calculNombreDepointDepuisUnStyleDeAnalyseStyle(commandes.sujet.retourneFirstNodeByNameAndAttributValueExactStrict("style:style", "style:name", nomDuStyleParent), point);
// }
// }
}
return point;
}
/**
* Calcul les points d'un style évalué par la méthode analyseStyle et qui hérite du node nod.<br>
* @param nod
* @param point
* @return
*/
@SuppressWarnings("unused")
private static int calculNombreDepointDepuisUnStyleDeAnalyseStyle(node nod, int point) {
return point;
Enumeration<String> key = nod.getAttributs().keys();
while(key.hasMoreElements()) {
String k = key.nextElement();
if(nod.getAttributs().get(k).contains("")||nod.getAttributs().get(k).contains("")) {
Pattern pt = Pattern.compile("[0-9]{1,}$");
Matcher match= pt.matcher(nod.getAttributs().get(k));
if(match.find()) {
String s= match.group();
try {
point = point + Integer.valueOf(s);
} catch (Exception e) {
JOptionPane.showInternalMessageDialog(null, "Erreur dans la valeur de l'attribut "+ k);
}
}
}
}
if(nod.getNodes().size()>0) {
for(int i = 0 ; i < nod.getNodes().size();i++) {
point = calculNombreDepointDepuisUnStyleDeAnalyseStyle(nod.getNodes().get(i), point);
}
}
return point;
}
}

View File

@ -434,6 +434,15 @@ public class afficheText extends JEditorPane {
setContentType("text/html");
setText(text.toString());
}
/**
*
* @param TextErreur
*/
public void afficheErreur(String TextErreur) {
setText(TextErreur);
}
}

View File

@ -579,6 +579,23 @@ public class evaluate extends JFrame {
}
/**
* Getter du texteField txtmessages.</br>
* @return
*/
public static afficheText getTxtpnmessages() {
return txtpnmessages;
}
/**
* Setter du texteField txtmessages.</br>
* @param txtpnmessages
*/
public static void setTxtpnmessages(afficheText txtpnmessages) {
evaluate.txtpnmessages = txtpnmessages;
}
/**
*
* Evaluer l'ensemble des fichiers des étudiants.</br>

View File

@ -11,10 +11,14 @@ public class listeDesNodesAnalyseStyle {
*/
public static Boolean isAnalyseStyle(node nod) {
if(nod.getAttributs().get("text:style-name")!=null) return true;
if(nod.getNomElt().contains("text:database-display")) return false;
if(nod.getNomElt().contains("text:bookmark")) return false;
if(nod.getNomElt().contains("text:")) return true;
// if(nod.getAttributs().get("text:style-name")!=null) return true;
// if(nod.getNomElt().contains("text:database-display")) return false;
// if(nod.getNomElt().contains("text:bookmark")) return false;
//
// if(nod.getNomElt().contains("text:p")) return true;
// if(nod.getNomElt().contains("text:list")) return true;
// if(nod.getNomElt().contains("text:span")) return true;
return false;