diff --git a/Readme.md b/Readme.md index 9e498a2..6e6bd8f 100644 --- a/Readme.md +++ b/Readme.md @@ -1,4 +1,4 @@ -# analyseWriter +https://www.youtube.com/watch?v=vmE38I6iVCs# analyseWriter L'application analyse et note les fichiers de traitement de texte au format ODF des étudiants. Le format natif des suites de bureautique, LibreOffice, OpenOffice, Trio Office). Cette application permet d’évaluer un très grand nombre de fichiers réalisés par des étudiants en suivant les consignes du fichier d’analyse. Elle permet de facilité l'importation des notes et des feedbacks des étudiants sur Moodle. diff --git a/analyseWriter.exe b/analyseWriter.exe index cb20994..7923035 100644 Binary files a/analyseWriter.exe and b/analyseWriter.exe differ diff --git a/bin/.gitignore b/bin/.gitignore index 4c2dcb6..6aabc54 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -1,2 +1,3 @@ /app/ /MEPTL/ +/calcul/ diff --git a/bin/app/create$1.class b/bin/app/create$1.class index d9857d2..08b0d9c 100644 Binary files a/bin/app/create$1.class and b/bin/app/create$1.class differ diff --git a/bin/app/create$10.class b/bin/app/create$10.class index d0ba36f..85ba561 100644 Binary files a/bin/app/create$10.class and b/bin/app/create$10.class differ diff --git a/bin/app/create$11.class b/bin/app/create$11.class index 969a8e2..a46a446 100644 Binary files a/bin/app/create$11.class and b/bin/app/create$11.class differ diff --git a/bin/app/create$12.class b/bin/app/create$12.class index 4b0040e..5cc8656 100644 Binary files a/bin/app/create$12.class and b/bin/app/create$12.class differ diff --git a/bin/app/create$13.class b/bin/app/create$13.class index 39f4a28..f33c9be 100644 Binary files a/bin/app/create$13.class and b/bin/app/create$13.class differ diff --git a/bin/app/create$14.class b/bin/app/create$14.class index db70e80..924e2d2 100644 Binary files a/bin/app/create$14.class and b/bin/app/create$14.class differ diff --git a/bin/app/create$15.class b/bin/app/create$15.class index 5b60198..7c24931 100644 Binary files a/bin/app/create$15.class and b/bin/app/create$15.class differ diff --git a/bin/app/create$16.class b/bin/app/create$16.class index cdb0986..a2fcefd 100644 Binary files a/bin/app/create$16.class and b/bin/app/create$16.class differ diff --git a/bin/app/create$17.class b/bin/app/create$17.class index 1a12f80..1cb7450 100644 Binary files a/bin/app/create$17.class and b/bin/app/create$17.class differ diff --git a/bin/app/create$18.class b/bin/app/create$18.class index df85f51..0d021ae 100644 Binary files a/bin/app/create$18.class and b/bin/app/create$18.class differ diff --git a/bin/app/create$19.class b/bin/app/create$19.class index de90339..d37de15 100644 Binary files a/bin/app/create$19.class and b/bin/app/create$19.class differ diff --git a/bin/app/create$2.class b/bin/app/create$2.class index c9fe9f5..5266315 100644 Binary files a/bin/app/create$2.class and b/bin/app/create$2.class differ diff --git a/bin/app/create$20.class b/bin/app/create$20.class index 92133cd..e89d6aa 100644 Binary files a/bin/app/create$20.class and b/bin/app/create$20.class differ diff --git a/bin/app/create$21.class b/bin/app/create$21.class index 75b9f8b..b3cee8e 100644 Binary files a/bin/app/create$21.class and b/bin/app/create$21.class differ diff --git a/bin/app/create$22.class b/bin/app/create$22.class index 08bd973..717fb61 100644 Binary files a/bin/app/create$22.class and b/bin/app/create$22.class differ diff --git a/bin/app/create$23.class b/bin/app/create$23.class index af27827..dd2504f 100644 Binary files a/bin/app/create$23.class and b/bin/app/create$23.class differ diff --git a/bin/app/create$24.class b/bin/app/create$24.class index 4a11a93..f7712cb 100644 Binary files a/bin/app/create$24.class and b/bin/app/create$24.class differ diff --git a/bin/app/create$25.class b/bin/app/create$25.class index 65c5304..1e38454 100644 Binary files a/bin/app/create$25.class and b/bin/app/create$25.class differ diff --git a/bin/app/create$26.class b/bin/app/create$26.class index b24d4d0..f122c74 100644 Binary files a/bin/app/create$26.class and b/bin/app/create$26.class differ diff --git a/bin/app/create$27.class b/bin/app/create$27.class index 977226c..2faab9e 100644 Binary files a/bin/app/create$27.class and b/bin/app/create$27.class differ diff --git a/bin/app/create$28.class b/bin/app/create$28.class index f514a24..02fe77f 100644 Binary files a/bin/app/create$28.class and b/bin/app/create$28.class differ diff --git a/bin/app/create$29.class b/bin/app/create$29.class index 1790074..b59c329 100644 Binary files a/bin/app/create$29.class and b/bin/app/create$29.class differ diff --git a/bin/app/create$3.class b/bin/app/create$3.class index 365013d..b6ef263 100644 Binary files a/bin/app/create$3.class and b/bin/app/create$3.class differ diff --git a/bin/app/create$30.class b/bin/app/create$30.class index e10ffea..e1ac06b 100644 Binary files a/bin/app/create$30.class and b/bin/app/create$30.class differ diff --git a/bin/app/create$31.class b/bin/app/create$31.class index 28aea8b..226e70c 100644 Binary files a/bin/app/create$31.class and b/bin/app/create$31.class differ diff --git a/bin/app/create$32.class b/bin/app/create$32.class index 5e24367..e602c99 100644 Binary files a/bin/app/create$32.class and b/bin/app/create$32.class differ diff --git a/bin/app/create$33.class b/bin/app/create$33.class index d38d55a..d1b5dd7 100644 Binary files a/bin/app/create$33.class and b/bin/app/create$33.class differ diff --git a/bin/app/create$34.class b/bin/app/create$34.class index b444c46..046cd43 100644 Binary files a/bin/app/create$34.class and b/bin/app/create$34.class differ diff --git a/bin/app/create$35.class b/bin/app/create$35.class index 3b2237a..5d49352 100644 Binary files a/bin/app/create$35.class and b/bin/app/create$35.class differ diff --git a/bin/app/create$36.class b/bin/app/create$36.class index 5615000..29f86d4 100644 Binary files a/bin/app/create$36.class and b/bin/app/create$36.class differ diff --git a/bin/app/create$37.class b/bin/app/create$37.class index 9f63b81..3732075 100644 Binary files a/bin/app/create$37.class and b/bin/app/create$37.class differ diff --git a/bin/app/create$38.class b/bin/app/create$38.class index c52f22a..effd57c 100644 Binary files a/bin/app/create$38.class and b/bin/app/create$38.class differ diff --git a/bin/app/create$39.class b/bin/app/create$39.class index 40eeb0e..51dc319 100644 Binary files a/bin/app/create$39.class and b/bin/app/create$39.class differ diff --git a/bin/app/create$4.class b/bin/app/create$4.class index d30bc73..a343bc2 100644 Binary files a/bin/app/create$4.class and b/bin/app/create$4.class differ diff --git a/bin/app/create$40.class b/bin/app/create$40.class index 56fd3f5..1e721a3 100644 Binary files a/bin/app/create$40.class and b/bin/app/create$40.class differ diff --git a/bin/app/create$41.class b/bin/app/create$41.class index 6889d8c..55bfa3a 100644 Binary files a/bin/app/create$41.class and b/bin/app/create$41.class differ diff --git a/bin/app/create$42.class b/bin/app/create$42.class index 23db14a..d12052b 100644 Binary files a/bin/app/create$42.class and b/bin/app/create$42.class differ diff --git a/bin/app/create$43.class b/bin/app/create$43.class index 1dddb80..15e2bd0 100644 Binary files a/bin/app/create$43.class and b/bin/app/create$43.class differ diff --git a/bin/app/create$44.class b/bin/app/create$44.class index b396d90..9ceba08 100644 Binary files a/bin/app/create$44.class and b/bin/app/create$44.class differ diff --git a/bin/app/create$45.class b/bin/app/create$45.class index 2f908a6..bc19219 100644 Binary files a/bin/app/create$45.class and b/bin/app/create$45.class differ diff --git a/bin/app/create$46.class b/bin/app/create$46.class index 0ae2039..6747df0 100644 Binary files a/bin/app/create$46.class and b/bin/app/create$46.class differ diff --git a/bin/app/create$47.class b/bin/app/create$47.class index 5677763..2c506b2 100644 Binary files a/bin/app/create$47.class and b/bin/app/create$47.class differ diff --git a/bin/app/create$48.class b/bin/app/create$48.class index 4c4e904..088b087 100644 Binary files a/bin/app/create$48.class and b/bin/app/create$48.class differ diff --git a/bin/app/create$49.class b/bin/app/create$49.class index 412a9ee..e04e87f 100644 Binary files a/bin/app/create$49.class and b/bin/app/create$49.class differ diff --git a/bin/app/create$5.class b/bin/app/create$5.class index 77cb61b..4c5e0a4 100644 Binary files a/bin/app/create$5.class and b/bin/app/create$5.class differ diff --git a/bin/app/create$50.class b/bin/app/create$50.class index 69d8067..76efd3f 100644 Binary files a/bin/app/create$50.class and b/bin/app/create$50.class differ diff --git a/bin/app/create$51.class b/bin/app/create$51.class index 350fd93..7401f0f 100644 Binary files a/bin/app/create$51.class and b/bin/app/create$51.class differ diff --git a/bin/app/create$52.class b/bin/app/create$52.class index da50194..ad83a72 100644 Binary files a/bin/app/create$52.class and b/bin/app/create$52.class differ diff --git a/bin/app/create$53.class b/bin/app/create$53.class index b8dcee8..e22b47e 100644 Binary files a/bin/app/create$53.class and b/bin/app/create$53.class differ diff --git a/bin/app/create$54.class b/bin/app/create$54.class index 3edfa7f..435a277 100644 Binary files a/bin/app/create$54.class and b/bin/app/create$54.class differ diff --git a/bin/app/create$55.class b/bin/app/create$55.class index 9c5627e..dc0ef52 100644 Binary files a/bin/app/create$55.class and b/bin/app/create$55.class differ diff --git a/bin/app/create$56.class b/bin/app/create$56.class index 9c22b38..17d123a 100644 Binary files a/bin/app/create$56.class and b/bin/app/create$56.class differ diff --git a/bin/app/create$57.class b/bin/app/create$57.class index 7001372..907adb6 100644 Binary files a/bin/app/create$57.class and b/bin/app/create$57.class differ diff --git a/bin/app/create$58.class b/bin/app/create$58.class index 273a931..635b91a 100644 Binary files a/bin/app/create$58.class and b/bin/app/create$58.class differ diff --git a/bin/app/create$59.class b/bin/app/create$59.class index 7dfb5da..cadbec6 100644 Binary files a/bin/app/create$59.class and b/bin/app/create$59.class differ diff --git a/bin/app/create$6.class b/bin/app/create$6.class index 0001228..0657338 100644 Binary files a/bin/app/create$6.class and b/bin/app/create$6.class differ diff --git a/bin/app/create$7.class b/bin/app/create$7.class index ec65f10..79488f4 100644 Binary files a/bin/app/create$7.class and b/bin/app/create$7.class differ diff --git a/bin/app/create$8.class b/bin/app/create$8.class index b5cb284..794f875 100644 Binary files a/bin/app/create$8.class and b/bin/app/create$8.class differ diff --git a/bin/app/create$9.class b/bin/app/create$9.class index f96f392..9f552ec 100644 Binary files a/bin/app/create$9.class and b/bin/app/create$9.class differ diff --git a/bin/app/create.class b/bin/app/create.class index f6f7e11..b5e9024 100644 Binary files a/bin/app/create.class and b/bin/app/create.class differ diff --git a/src/app/create.java b/src/app/create.java index 2b8df97..6ab799d 100644 --- a/src/app/create.java +++ b/src/app/create.java @@ -45,6 +45,7 @@ import MEPTL.meptl; import MEPTL.verificationFichierAnalyse; import cXML.Run; import cXML.node; +import calcul.calculNombrePointEvaluation; import calcul.listeAttributsAnalyseWriter; import calcul.listeNodeFormatageDirectDeWriter; @@ -137,7 +138,9 @@ public class create extends JFrame { } - + /** + * Selection du node du tree et d'un node CXML + */ private void ListenerAction() { tree.addMouseListener(new MouseAdapter() { @@ -151,83 +154,6 @@ public class create extends JFrame { } } }); - - - } - - - /** - * Calcul le total des points dans le node et les nodes enfants. - * @param nod - * @param point - * @return - */ - private int calculNombreDepoint(node nod, int point) { - System.out.println("début du calcul du nombre de point du node" + nod.getNomElt()); - if(nod.getAttributs().get("evaluer")!=null) if(nod.getAttributs().get("evaluer").equalsIgnoreCase("true")){ - if(nod.getAttributs().get("allContent")!=null) { - Pattern pt = Pattern.compile("[0-9]{1,}$"); - Matcher match= pt.matcher(nod.getAttributs().get("allContent")); - 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 allContent"); - } - System.out.println("match point pour allcontent = " + s); - } - } - - if(nod.getAttributs().get("evalNameInitialCreator")!=null) { - try { - point = point + Integer.valueOf(nod.getAttributs().get("evalNameInitialCreator")); - } catch (Exception e) { - JOptionPane.showInternalMessageDialog(null, "Erreur dans la valeur de l'attribut evalNameInitialCreator"); - } - } - - if(nod.getAttributs().get("evalNameCreator")!=null) { - try { - point = point + Integer.valueOf(nod.getAttributs().get("evalNameCreator")); - } catch (Exception e) { - JOptionPane.showInternalMessageDialog(null, "Erreur dans la valeur de l'attribut evalNameCreator"); - } - } - - if(nod.getAttributs().get("evalNameNode")!=null) { - try { - point = point + Integer.valueOf(nod.getAttributs().get("evalNameNode")); - } catch (Exception e) { - JOptionPane.showInternalMessageDialog(null, "Erreur dans la valeur de l'attribut evalNameCreator"); - } - } - - Enumeration 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); - } - } - } - } - - - for(int i = 0 ; i < nod.getNodes().size();i++) { - if(nod.getNodes().get(i)!=null) { - point = calculNombreDepoint(nod.getNodes().get(i), point); - } - } - } - return point; } @@ -1482,7 +1408,7 @@ public class create extends JFrame { @Override public void actionPerformed( ActionEvent e ) { System.out.println("Calcul le nombre de point dans le sujet"); - textNodeSelect.AfficheTotalPoint(commandes.sujet,calculNombreDepoint(commandes.sujet,0)); + textNodeSelect.AfficheTotalPoint(commandes.sujet,calculNombrePointEvaluation.calculNombreDepoint(commandes.sujet,0)); } }; @@ -1503,7 +1429,7 @@ public class create extends JFrame { DefaultMutableTreeNode selectNode = (DefaultMutableTreeNode) tree.getSelectionPath().getLastPathComponent(); node nod = (node) selectNode.getUserObject(); - textNodeSelect.AfficheTotalPoint(nod,calculNombreDepoint(nod,0)); + textNodeSelect.AfficheTotalPoint(nod,calculNombrePointEvaluation.calculNombreDepoint(nod,0)); } }; diff --git a/src/app/setting.java b/src/app/setting.java index bb28b66..31d0184 100644 --- a/src/app/setting.java +++ b/src/app/setting.java @@ -106,7 +106,6 @@ public class setting extends JFrame { ImageIcon img6 = new ImageIcon(getClass().getResource("/resources/traduction.png") ); - //********************************************************* //** CSV ** //********************************************************* @@ -595,7 +594,6 @@ public class setting extends JFrame { ListenerAction(); if(!erreurFormatHexCouleur()&&!erreurFormatHexCouleur()) miseAJourCouleurTest(); - this.setVisible(true); } diff --git a/src/calcul/calculNombrePointEvaluation.java b/src/calcul/calculNombrePointEvaluation.java new file mode 100644 index 0000000..0aa1528 --- /dev/null +++ b/src/calcul/calculNombrePointEvaluation.java @@ -0,0 +1,86 @@ +package calcul; + +import java.util.Enumeration; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import javax.swing.JOptionPane; + +import cXML.node; + +public class calculNombrePointEvaluation { + + public static int calculNombreDepoint(node nod, int point) { + + if(nod.getAttributs().get("evaluer")!=null) if(nod.getAttributs().get("evaluer").equalsIgnoreCase("true")){ + if(nod.getAttributs().get("allContent")!=null) { + Pattern pt = Pattern.compile("[0-9]{1,}$"); + Matcher match= pt.matcher(nod.getAttributs().get("allContent")); + 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 allContent"); + } + System.out.println("match point pour allcontent = " + s); + } + } + + if(nod.getAttributs().get("evalNameInitialCreator")!=null) { + try { + point = point + Integer.valueOf(nod.getAttributs().get("evalNameInitialCreator")); + } catch (Exception e) { + JOptionPane.showInternalMessageDialog(null, "Erreur dans la valeur de l'attribut evalNameInitialCreator"); + } + } + + if(nod.getAttributs().get("evalNameCreator")!=null) { + try { + point = point + Integer.valueOf(nod.getAttributs().get("evalNameCreator")); + } catch (Exception e) { + JOptionPane.showInternalMessageDialog(null, "Erreur dans la valeur de l'attribut evalNameCreator"); + } + } + + if(nod.getAttributs().get("evalNameNode")!=null) { + try { + point = point + Integer.valueOf(nod.getAttributs().get("evalNameNode")); + } catch (Exception e) { + JOptionPane.showInternalMessageDialog(null, "Erreur dans la valeur de l'attribut evalNameCreator"); + } + } + + Enumeration 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); + } + } + } + } + + + for(int i = 0 ; i < nod.getNodes().size();i++) { + if(nod.getNodes().get(i)!=null) { + point = calculNombreDepoint(nod.getNodes().get(i), point); + } + } + } + return point; + + + } + + + + +}