diff --git a/.classpath b/.classpath index 4237c90..3dbcf24 100644 --- a/.classpath +++ b/.classpath @@ -2,11 +2,8 @@ - - - - - + + @@ -16,6 +13,6 @@ - + diff --git a/analyseWriter.exe b/analyseWriter.exe index 988a716..203ee25 100644 Binary files a/analyseWriter.exe and b/analyseWriter.exe differ diff --git a/analyseWriter.jar b/analyseWriter.jar index 38d1607..9786792 100644 Binary files a/analyseWriter.jar and b/analyseWriter.jar differ diff --git a/bin/.gitignore b/bin/.gitignore index b4f6967..a09484f 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -1,4 +1,4 @@ -/resources/ +/fenetres/ +/list/ /MEPTL/ /evaluer/ -/fenetres/ diff --git a/bin/MEPTL/rechercherUnNodeStudent.class b/bin/MEPTL/rechercherUnNodeStudent.class index 572267e..9e914c0 100644 Binary files a/bin/MEPTL/rechercherUnNodeStudent.class and b/bin/MEPTL/rechercherUnNodeStudent.class differ diff --git a/bin/evaluer/analyseLesNodesEnfants.class b/bin/evaluer/analyseLesNodesEnfants.class index 18624e7..3992c37 100644 Binary files a/bin/evaluer/analyseLesNodesEnfants.class and b/bin/evaluer/analyseLesNodesEnfants.class differ diff --git a/bin/evaluer/analyseLesNodesPrincipaux.class b/bin/evaluer/analyseLesNodesPrincipaux.class index 1e435e1..66263e2 100644 Binary files a/bin/evaluer/analyseLesNodesPrincipaux.class and b/bin/evaluer/analyseLesNodesPrincipaux.class differ diff --git a/bin/fenetres/afficheText.class b/bin/fenetres/afficheText.class index dc2e3c0..5c70d34 100644 Binary files a/bin/fenetres/afficheText.class and b/bin/fenetres/afficheText.class differ diff --git a/bin/fenetres/create_act/actNewFichierAnalyse.class b/bin/fenetres/create_act/actNewFichierAnalyse.class index bcdc279..3fd4400 100644 Binary files a/bin/fenetres/create_act/actNewFichierAnalyse.class and b/bin/fenetres/create_act/actNewFichierAnalyse.class differ diff --git a/bin/fenetres/create_act/actOu.class b/bin/fenetres/create_act/actOu.class index ed8dcb3..3a0a3e6 100644 Binary files a/bin/fenetres/create_act/actOu.class and b/bin/fenetres/create_act/actOu.class differ diff --git a/bin/fenetres/evaluate$1.class b/bin/fenetres/evaluate$1.class index 8558f97..da741ce 100644 Binary files a/bin/fenetres/evaluate$1.class and b/bin/fenetres/evaluate$1.class differ diff --git a/bin/fenetres/evaluate$10.class b/bin/fenetres/evaluate$10.class index 0a9b458..243b22a 100644 Binary files a/bin/fenetres/evaluate$10.class and b/bin/fenetres/evaluate$10.class differ diff --git a/bin/fenetres/evaluate$11.class b/bin/fenetres/evaluate$11.class index bb02936..a90cd6a 100644 Binary files a/bin/fenetres/evaluate$11.class and b/bin/fenetres/evaluate$11.class differ diff --git a/bin/fenetres/evaluate$12.class b/bin/fenetres/evaluate$12.class index 869226d..86d3a1e 100644 Binary files a/bin/fenetres/evaluate$12.class and b/bin/fenetres/evaluate$12.class differ diff --git a/bin/fenetres/evaluate$13.class b/bin/fenetres/evaluate$13.class index 89e3e9b..cdcbdd1 100644 Binary files a/bin/fenetres/evaluate$13.class and b/bin/fenetres/evaluate$13.class differ diff --git a/bin/fenetres/evaluate$14.class b/bin/fenetres/evaluate$14.class index 18cc46c..e8ca281 100644 Binary files a/bin/fenetres/evaluate$14.class and b/bin/fenetres/evaluate$14.class differ diff --git a/bin/fenetres/evaluate$15.class b/bin/fenetres/evaluate$15.class index 33bab56..219d944 100644 Binary files a/bin/fenetres/evaluate$15.class and b/bin/fenetres/evaluate$15.class differ diff --git a/bin/fenetres/evaluate$16.class b/bin/fenetres/evaluate$16.class index 8c5f77d..82849ee 100644 Binary files a/bin/fenetres/evaluate$16.class and b/bin/fenetres/evaluate$16.class differ diff --git a/bin/fenetres/evaluate$17.class b/bin/fenetres/evaluate$17.class index 3586d3e..6fc17d2 100644 Binary files a/bin/fenetres/evaluate$17.class and b/bin/fenetres/evaluate$17.class differ diff --git a/bin/fenetres/evaluate$18.class b/bin/fenetres/evaluate$18.class index b0ca861..6a84ffd 100644 Binary files a/bin/fenetres/evaluate$18.class and b/bin/fenetres/evaluate$18.class differ diff --git a/bin/fenetres/evaluate$19.class b/bin/fenetres/evaluate$19.class index 7807952..15ef0be 100644 Binary files a/bin/fenetres/evaluate$19.class and b/bin/fenetres/evaluate$19.class differ diff --git a/bin/fenetres/evaluate$2.class b/bin/fenetres/evaluate$2.class index 86a6209..7ac5229 100644 Binary files a/bin/fenetres/evaluate$2.class and b/bin/fenetres/evaluate$2.class differ diff --git a/bin/fenetres/evaluate$20.class b/bin/fenetres/evaluate$20.class index 7fff336..79776f4 100644 Binary files a/bin/fenetres/evaluate$20.class and b/bin/fenetres/evaluate$20.class differ diff --git a/bin/fenetres/evaluate$21.class b/bin/fenetres/evaluate$21.class index 56859a7..47279f6 100644 Binary files a/bin/fenetres/evaluate$21.class and b/bin/fenetres/evaluate$21.class differ diff --git a/bin/fenetres/evaluate$22.class b/bin/fenetres/evaluate$22.class index 898bbe0..b964b69 100644 Binary files a/bin/fenetres/evaluate$22.class and b/bin/fenetres/evaluate$22.class differ diff --git a/bin/fenetres/evaluate$23.class b/bin/fenetres/evaluate$23.class index 00b1109..f9592b2 100644 Binary files a/bin/fenetres/evaluate$23.class and b/bin/fenetres/evaluate$23.class differ diff --git a/bin/fenetres/evaluate$24.class b/bin/fenetres/evaluate$24.class index 48b3662..0130c3e 100644 Binary files a/bin/fenetres/evaluate$24.class and b/bin/fenetres/evaluate$24.class differ diff --git a/bin/fenetres/evaluate$25.class b/bin/fenetres/evaluate$25.class index 01a59ef..654fdf4 100644 Binary files a/bin/fenetres/evaluate$25.class and b/bin/fenetres/evaluate$25.class differ diff --git a/bin/fenetres/evaluate$26.class b/bin/fenetres/evaluate$26.class index d8e411f..ff593bd 100644 Binary files a/bin/fenetres/evaluate$26.class and b/bin/fenetres/evaluate$26.class differ diff --git a/bin/fenetres/evaluate$27.class b/bin/fenetres/evaluate$27.class index 9a093ed..7d22231 100644 Binary files a/bin/fenetres/evaluate$27.class and b/bin/fenetres/evaluate$27.class differ diff --git a/bin/fenetres/evaluate$28.class b/bin/fenetres/evaluate$28.class index 42f48f6..d45e498 100644 Binary files a/bin/fenetres/evaluate$28.class and b/bin/fenetres/evaluate$28.class differ diff --git a/bin/fenetres/evaluate$29.class b/bin/fenetres/evaluate$29.class index f6620a8..15c6f7c 100644 Binary files a/bin/fenetres/evaluate$29.class and b/bin/fenetres/evaluate$29.class differ diff --git a/bin/fenetres/evaluate$3.class b/bin/fenetres/evaluate$3.class index 1495f1b..30c9ab9 100644 Binary files a/bin/fenetres/evaluate$3.class and b/bin/fenetres/evaluate$3.class differ diff --git a/bin/fenetres/evaluate$30.class b/bin/fenetres/evaluate$30.class index b545570..9a6cf3c 100644 Binary files a/bin/fenetres/evaluate$30.class and b/bin/fenetres/evaluate$30.class differ diff --git a/bin/fenetres/evaluate$31.class b/bin/fenetres/evaluate$31.class index d753242..583751c 100644 Binary files a/bin/fenetres/evaluate$31.class and b/bin/fenetres/evaluate$31.class differ diff --git a/bin/fenetres/evaluate$32.class b/bin/fenetres/evaluate$32.class index 161fb48..18ab59d 100644 Binary files a/bin/fenetres/evaluate$32.class and b/bin/fenetres/evaluate$32.class differ diff --git a/bin/fenetres/evaluate$33.class b/bin/fenetres/evaluate$33.class index 26f5e10..adb429f 100644 Binary files a/bin/fenetres/evaluate$33.class and b/bin/fenetres/evaluate$33.class differ diff --git a/bin/fenetres/evaluate$34.class b/bin/fenetres/evaluate$34.class index 7c0ec2a..4f0185e 100644 Binary files a/bin/fenetres/evaluate$34.class and b/bin/fenetres/evaluate$34.class differ diff --git a/bin/fenetres/evaluate$4.class b/bin/fenetres/evaluate$4.class index bd06a1e..b542cef 100644 Binary files a/bin/fenetres/evaluate$4.class and b/bin/fenetres/evaluate$4.class differ diff --git a/bin/fenetres/evaluate$5.class b/bin/fenetres/evaluate$5.class index c9be6a8..206adac 100644 Binary files a/bin/fenetres/evaluate$5.class and b/bin/fenetres/evaluate$5.class differ diff --git a/bin/fenetres/evaluate$6.class b/bin/fenetres/evaluate$6.class index 9021303..b7dfc46 100644 Binary files a/bin/fenetres/evaluate$6.class and b/bin/fenetres/evaluate$6.class differ diff --git a/bin/fenetres/evaluate$7.class b/bin/fenetres/evaluate$7.class index 64460b9..0f463dd 100644 Binary files a/bin/fenetres/evaluate$7.class and b/bin/fenetres/evaluate$7.class differ diff --git a/bin/fenetres/evaluate$8.class b/bin/fenetres/evaluate$8.class index 81b358c..eb979bc 100644 Binary files a/bin/fenetres/evaluate$8.class and b/bin/fenetres/evaluate$8.class differ diff --git a/bin/fenetres/evaluate$9.class b/bin/fenetres/evaluate$9.class index 3f573d8..da2babf 100644 Binary files a/bin/fenetres/evaluate$9.class and b/bin/fenetres/evaluate$9.class differ diff --git a/bin/fenetres/evaluate.class b/bin/fenetres/evaluate.class index 8f4f7d9..f8d7e1f 100644 Binary files a/bin/fenetres/evaluate.class and b/bin/fenetres/evaluate.class differ diff --git a/bin/fenetres/filechooserXML.class b/bin/fenetres/filechooserXML.class index aa760ba..d996e4e 100644 Binary files a/bin/fenetres/filechooserXML.class and b/bin/fenetres/filechooserXML.class differ diff --git a/bin/fenetres/proprieteFichierAnalyse$1.class b/bin/fenetres/proprieteFichierAnalyse$1.class index ee1e3f0..587419a 100644 Binary files a/bin/fenetres/proprieteFichierAnalyse$1.class and b/bin/fenetres/proprieteFichierAnalyse$1.class differ diff --git a/bin/fenetres/proprieteFichierAnalyse$10.class b/bin/fenetres/proprieteFichierAnalyse$10.class index b4fdcee..090fe6f 100644 Binary files a/bin/fenetres/proprieteFichierAnalyse$10.class and b/bin/fenetres/proprieteFichierAnalyse$10.class differ diff --git a/bin/fenetres/proprieteFichierAnalyse$11.class b/bin/fenetres/proprieteFichierAnalyse$11.class index 7444b78..3322dfa 100644 Binary files a/bin/fenetres/proprieteFichierAnalyse$11.class and b/bin/fenetres/proprieteFichierAnalyse$11.class differ diff --git a/bin/fenetres/proprieteFichierAnalyse$12.class b/bin/fenetres/proprieteFichierAnalyse$12.class index b0f37db..770b615 100644 Binary files a/bin/fenetres/proprieteFichierAnalyse$12.class and b/bin/fenetres/proprieteFichierAnalyse$12.class differ diff --git a/bin/fenetres/proprieteFichierAnalyse$13.class b/bin/fenetres/proprieteFichierAnalyse$13.class index 8b71b4e..887ff2f 100644 Binary files a/bin/fenetres/proprieteFichierAnalyse$13.class and b/bin/fenetres/proprieteFichierAnalyse$13.class differ diff --git a/bin/fenetres/proprieteFichierAnalyse$14.class b/bin/fenetres/proprieteFichierAnalyse$14.class index 76b1bff..31dad15 100644 Binary files a/bin/fenetres/proprieteFichierAnalyse$14.class and b/bin/fenetres/proprieteFichierAnalyse$14.class differ diff --git a/bin/fenetres/proprieteFichierAnalyse$15.class b/bin/fenetres/proprieteFichierAnalyse$15.class index a42f0bc..d340c85 100644 Binary files a/bin/fenetres/proprieteFichierAnalyse$15.class and b/bin/fenetres/proprieteFichierAnalyse$15.class differ diff --git a/bin/fenetres/proprieteFichierAnalyse$16.class b/bin/fenetres/proprieteFichierAnalyse$16.class index 709512f..d22d649 100644 Binary files a/bin/fenetres/proprieteFichierAnalyse$16.class and b/bin/fenetres/proprieteFichierAnalyse$16.class differ diff --git a/bin/fenetres/proprieteFichierAnalyse$17.class b/bin/fenetres/proprieteFichierAnalyse$17.class index c90a4b6..b0828ff 100644 Binary files a/bin/fenetres/proprieteFichierAnalyse$17.class and b/bin/fenetres/proprieteFichierAnalyse$17.class differ diff --git a/bin/fenetres/proprieteFichierAnalyse$2.class b/bin/fenetres/proprieteFichierAnalyse$2.class index 3c370e1..90f07f9 100644 Binary files a/bin/fenetres/proprieteFichierAnalyse$2.class and b/bin/fenetres/proprieteFichierAnalyse$2.class differ diff --git a/bin/fenetres/proprieteFichierAnalyse$3.class b/bin/fenetres/proprieteFichierAnalyse$3.class index 688ed8f..5b1ff55 100644 Binary files a/bin/fenetres/proprieteFichierAnalyse$3.class and b/bin/fenetres/proprieteFichierAnalyse$3.class differ diff --git a/bin/fenetres/proprieteFichierAnalyse$4.class b/bin/fenetres/proprieteFichierAnalyse$4.class index cbba2ff..730885e 100644 Binary files a/bin/fenetres/proprieteFichierAnalyse$4.class and b/bin/fenetres/proprieteFichierAnalyse$4.class differ diff --git a/bin/fenetres/proprieteFichierAnalyse$5.class b/bin/fenetres/proprieteFichierAnalyse$5.class index fd6cdd1..f9e65b8 100644 Binary files a/bin/fenetres/proprieteFichierAnalyse$5.class and b/bin/fenetres/proprieteFichierAnalyse$5.class differ diff --git a/bin/fenetres/proprieteFichierAnalyse$6.class b/bin/fenetres/proprieteFichierAnalyse$6.class index 4f23189..d2edb4a 100644 Binary files a/bin/fenetres/proprieteFichierAnalyse$6.class and b/bin/fenetres/proprieteFichierAnalyse$6.class differ diff --git a/bin/fenetres/proprieteFichierAnalyse$7.class b/bin/fenetres/proprieteFichierAnalyse$7.class index 771d366..c1b3950 100644 Binary files a/bin/fenetres/proprieteFichierAnalyse$7.class and b/bin/fenetres/proprieteFichierAnalyse$7.class differ diff --git a/bin/fenetres/proprieteFichierAnalyse$8.class b/bin/fenetres/proprieteFichierAnalyse$8.class index 7091d84..19558d0 100644 Binary files a/bin/fenetres/proprieteFichierAnalyse$8.class and b/bin/fenetres/proprieteFichierAnalyse$8.class differ diff --git a/bin/fenetres/proprieteFichierAnalyse$9.class b/bin/fenetres/proprieteFichierAnalyse$9.class index c628b5a..9d2e50d 100644 Binary files a/bin/fenetres/proprieteFichierAnalyse$9.class and b/bin/fenetres/proprieteFichierAnalyse$9.class differ diff --git a/bin/fenetres/proprieteFichierAnalyse.class b/bin/fenetres/proprieteFichierAnalyse.class index f87d3ac..e51deb2 100644 Binary files a/bin/fenetres/proprieteFichierAnalyse.class and b/bin/fenetres/proprieteFichierAnalyse.class differ diff --git a/bin/fenetres/setting$1.class b/bin/fenetres/setting$1.class index 44f9cca..5203d84 100644 Binary files a/bin/fenetres/setting$1.class and b/bin/fenetres/setting$1.class differ diff --git a/bin/fenetres/setting$2.class b/bin/fenetres/setting$2.class index bf7097b..ce3f0d0 100644 Binary files a/bin/fenetres/setting$2.class and b/bin/fenetres/setting$2.class differ diff --git a/bin/fenetres/setting$3.class b/bin/fenetres/setting$3.class index 3268478..e6f1e11 100644 Binary files a/bin/fenetres/setting$3.class and b/bin/fenetres/setting$3.class differ diff --git a/bin/fenetres/setting$4.class b/bin/fenetres/setting$4.class index 124bc2b..b179b54 100644 Binary files a/bin/fenetres/setting$4.class and b/bin/fenetres/setting$4.class differ diff --git a/bin/fenetres/setting$5.class b/bin/fenetres/setting$5.class index d9c54e7..84eab7c 100644 Binary files a/bin/fenetres/setting$5.class and b/bin/fenetres/setting$5.class differ diff --git a/bin/fenetres/setting.class b/bin/fenetres/setting.class index 940ae37..c939211 100644 Binary files a/bin/fenetres/setting.class and b/bin/fenetres/setting.class differ diff --git a/bin/list/listeAttributsAnalyseWriter.class b/bin/list/listeAttributsAnalyseWriter.class index 678f2c2..cf30fdf 100644 Binary files a/bin/list/listeAttributsAnalyseWriter.class and b/bin/list/listeAttributsAnalyseWriter.class differ diff --git a/src/MEPTL/rechercherUnNodeStudent.java b/src/MEPTL/rechercherUnNodeStudent.java index 6f4e479..05ba938 100644 --- a/src/MEPTL/rechercherUnNodeStudent.java +++ b/src/MEPTL/rechercherUnNodeStudent.java @@ -34,6 +34,17 @@ public class rechercherUnNodeStudent { node nodStudent =null; + + //************************************************************************************************ + //** Recherche le node par le contenu exact du node en intégrant les contenus des nodes enfants ** + //** Le contenu exact supprime dans le texte les espaces au début et à la fin et ignore la case ** + //************************************************************************************************ + if(nodSujet.getAttributs().get("recherche_contenu_exact")!=null){ + nodStudent = findNodeParContenuEXACT(nameNode, nodSujet, nod0Student, nod1Student, nod2Student, a); + if(nodStudent!=null) return nodStudent; + } + + //************************************************************************************************ //** Recherche le node par le contenu ayant la distance Levenshtein la plus proche de 1 ** //************************************************************************************************ @@ -50,46 +61,32 @@ public class rechercherUnNodeStudent { } - //************************************************************************************************ - //** Recherche le node par le contenu exact du node en intégrant les contenus des nodes enfants ** - //** Le contenu exact supprime dans le texte les espaces au début et à la fin et ignore la case ** - //************************************************************************************************ - if(nodSujet.getAttributs().get("recherche_contenu_exact")!=null){ - nodStudent = findNodeParContenuEXACT(nameNode, nodSujet, nod0Student, nod1Student, nod2Student, a); - if(nodStudent!=null) return nodStudent; - } - - - //************************************************************************* - //** Recherche les nodes text:p, text:h, text:span par le contenu textue ** - //************************************************************************* - if(nodSujet.getNomElt().contains("text:")) { - nodStudent = findNodeByContenuTextuel(nameNode, nodSujet, nod0Student, nod1Student, nod2Student, a); -// System.out.println("*1-"+nodSujet.retourneLesContenusEnfants("")); -// if(nodStudent!=null) { -// System.out.println("*2-"+nodStudent.retourneLesContenusEnfants("")); -// }else { -// System.out.println("*2-null"); -// } - if(nodStudent!=null) return nodStudent; - } + //*********************************** //** Recherche le node par l'index ** //*********************************** if(nodSujet.getAttributs().get("recherche_index")!=null){ - nodStudent = findNodeParIndex(nameNode, nodSujet, nod0Student, nod1Student, nod2Student, a); -// System.out.println("Index sujet="+nodSujet.getAttributs().get("index")); -// if(nodStudent!=null) { -// System.out.println("Index student="+nodStudent.getAttributs().get("index")); -// System.out.println("taille child student="+nodStudent.getNodes().size()); -// }else { -// System.out.println("Index student=null"); -// } - if(nodSujet.getAttributs().get("recherche_index").equals("true")) return nodStudent; + if(nodSujet.getAttributs().get("recherche_index").equals("true")) { + nodStudent = findNodeParIndex(nameNode, nodSujet, nod0Student, nod1Student, nod2Student, a); + return nodStudent; + } } + + + //************************************************************************** + //** Recherche les nodes text:p, text:h, text:span par le contenu textuel ** + //************************************************************************** + if(nodSujet.getNomElt().contains("text:")) { + nodStudent = findNodeByContenuTextuel(nameNode, nodSujet, nod0Student, nod1Student, nod2Student, a); + if(nodStudent!=null) return nodStudent; + } + + + + //***************************************************************** //** Recherche le node text:p par les différents contenu du node ** //***************************************************************** @@ -239,16 +236,70 @@ public class rechercherUnNodeStudent { */ private static node findNodeByContenuTextuel(String nameNode, node nodSujet,node nod0Student, node nod1Student, node nod2Student, Run a) { node nodStudent = null; + if(nodSujet.retourneLesContenusEnfants("").length()<1) return null; Pattern p = Pattern.compile("^text:p|^text:h|text:span"); Matcher m = p.matcher(nodSujet.getNomElt()); if(m.find()) { if(!nodSujet.retourneLesContenusEnfants("").isEmpty()) { String valueAttribut = evaluation.withoutCodeAndPointPourRechercheContenuExact(nodSujet.retourneLesContenusEnfants("")); - if(nod2Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNodeByFindContentExact(nod2Student.getNodes(), valueAttribut, nodSujet.getNomElt()); - if(nod1Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNodeByFindContentExact(nod1Student.getNodes(), valueAttribut, nodSujet.getNomElt()); - if(nod0Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNodeByFindContentExact(nod0Student.getNodes(), valueAttribut, nodSujet.getNomElt()); + if(nod2Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNameNodeByFindContentExactly(nod2Student.getNodes(), valueAttribut, nodSujet.getNomElt()); + if(nod1Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNameNodeByFindContentExactly(nod1Student.getNodes(), valueAttribut, nodSujet.getNomElt()); + if(nod0Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNameNodeByFindContentExactly(nod0Student.getNodes(), valueAttribut, nodSujet.getNomElt()); } } + if(nodStudent!=null) return nodStudent; + System.out.println("n'a pas trouvé par la méthode contenu rigoureusement exact"); + if(nodSujet.getAttributs().get("recherche_contenu_exact")!=null) { + if(nodSujet.getAttributs().get("recherche_contenu_exact").equals("true")) { + if(!nodSujet.retourneLesContenusEnfants("").isEmpty()) { + String valueAttribut = evaluation.withoutCodeAndPointPourRechercheContenuExact(nodSujet.retourneLesContenusEnfants("")); + if(nod2Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNodeByFindContentExact(nod2Student.getNodes(), valueAttribut, nodSujet.getNomElt()); + if(nod1Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNodeByFindContentExact(nod1Student.getNodes(), valueAttribut, nodSujet.getNomElt()); + if(nod0Student!=null) if(nodStudent==null) nodStudent = a.retourneFirstNodeByFindContentExact(nod0Student.getNodes(), valueAttribut, nodSujet.getNomElt()); + } + } + } + if(nodStudent!=null) return nodStudent; + System.out.println("n'a pas trouvé par la méthode contenu exact sans casse et trim()"); + nodStudent = findNodeParContenuPlusProcheVoisinSim(nameNode, nodSujet, nod0Student, nod1Student, nod2Student, a, 0.95); + if(nodStudent!=null) return nodStudent; + System.out.println("n'a pas trouvé par la méthode plus proche voisin avec distance de 0.95"); + nodStudent = findNodeParContenuPlusProcheVoisinSim(nameNode, nodSujet, nod0Student, nod1Student, nod2Student, a, 0.9); + if(nodStudent!=null) return nodStudent; + System.out.println("n'a pas trouvé par la méthode plus proche voisin avec distance de 0.9"); + nodStudent = findNodeParContenuPlusProcheVoisinSim(nameNode, nodSujet, nod0Student, nod1Student, nod2Student, a, 0.85); + if(nodStudent!=null) return nodStudent; + System.out.println("n'a pas trouvé par la méthode plus proche voisin avec distance de 0.85"); + nodStudent = findNodeParContenuPlusProcheVoisinSim(nameNode, nodSujet, nod0Student, nod1Student, nod2Student, a, 0.8); + if(nodStudent!=null) return nodStudent; + System.out.println("n'a pas trouvé par la méthode plus proche voisin avec distance de 0.8"); + nodStudent = findNodeParContenuPlusProcheVoisinSim(nameNode, nodSujet, nod0Student, nod1Student, nod2Student, a, 0.75); + if(nodStudent!=null) return nodStudent; + System.out.println("n'a pas trouvé par la méthode plus proche voisin avec distance de 0.75"); + nodStudent = findNodeParContenuPlusProcheVoisinSim(nameNode, nodSujet, nod0Student, nod1Student, nod2Student, a, 0.7); + return nodStudent; + } + + + /** + * Recherche par le contenu par le plus proche voisin. Englobe les contenus des nodes enfants.
+ * La distance maximale est de 0.8.
+ * @param nameNode + * @param nodSujet + * @param nod0Student + * @param nod1Student + * @param nod2Student + * @param a + * @return + */ + private static node findNodeParContenuPlusProcheVoisinSim(String nameNode, node nodSujet,node nod0Student, node nod1Student, node nod2Student, Run a , double sim) { + node nodStudent = null; + if(!nodSujet.retourneLesContenusEnfants("").isEmpty()) { + String valueAttribut = evaluation.withoutCodeAndPointPourRechercheContenuExact(nodSujet.retourneLesContenusEnfants("")); + if(nod0Student!=null) if(nodStudent==null) nodStudent = a.retourneLeNodeByContentPlusProche(nod0Student.getNodes(), valueAttribut, nodSujet.getNomElt(),sim,null); + if(nod1Student!=null) if(nodStudent==null) nodStudent = a.retourneLeNodeByContentPlusProche(nod1Student.getNodes(), valueAttribut, nodSujet.getNomElt(),sim,null); + if(nod2Student!=null) if(nodStudent==null) nodStudent = a.retourneLeNodeByContentPlusProche(nod2Student.getNodes(), valueAttribut, nodSujet.getNomElt(),sim,null); + } return nodStudent; } diff --git a/src/evaluer/analyseLesNodesEnfants.java b/src/evaluer/analyseLesNodesEnfants.java index 4d08cfe..3ce48c0 100644 --- a/src/evaluer/analyseLesNodesEnfants.java +++ b/src/evaluer/analyseLesNodesEnfants.java @@ -40,8 +40,6 @@ public class analyseLesNodesEnfants { continue; } - - //***************************** //** Ajoute un saut de ligne ** diff --git a/src/evaluer/analyseLesNodesPrincipaux.java b/src/evaluer/analyseLesNodesPrincipaux.java index 09655f6..0e8c3a3 100644 --- a/src/evaluer/analyseLesNodesPrincipaux.java +++ b/src/evaluer/analyseLesNodesPrincipaux.java @@ -308,6 +308,12 @@ public class analyseLesNodesPrincipaux { node nodSujet = sujet.get(i); String namenode = nodSujet.getNomElt(); + //************************************ + //** Analyser que les nodes évaluer ** + //************************************ + if(nodSujet.getAttributs().get("evaluer")==null) continue; + if(!nodSujet.getAttributs().get("evaluer").equals("true")) continue; + //***************************** //** Ajoute un saut de ligne ** //***************************** @@ -393,6 +399,13 @@ public class analyseLesNodesPrincipaux { //** Parcours les nodes enfants du node ** //******************************************************* for(int i = 0 ; i < nodSujetSections.getNodes().size(); i++) { + + //************************************ + //** Analyser que les nodes évaluer ** + //************************************ + if(nodSujetSections.getNodes().get(i).getAttributs().get("evaluer")==null) continue; + if(!nodSujetSections.getNodes().get(i).getAttributs().get("evaluer").equals("true")) continue; + if(nodSujetSections.getNodes().get(i).getNomElt().equals("text:section")) { node sectionSujet = nodSujetSections.getNodes().get(i); int pointDebut = evaluation.getPointsClass(); @@ -480,6 +493,13 @@ public class analyseLesNodesPrincipaux { //** Parcours les nodes enfants du node ** //************************************************************* for(int i = 0 ; i < nodSujetSequence.getNodes().size(); i++) { + + //************************************ + //** Analyser que les nodes évaluer ** + //************************************ + if(nodSujetSequence.getNodes().get(i).getAttributs().get("evaluer")==null) continue; + if(!nodSujetSequence.getNodes().get(i).getAttributs().get("evaluer").equals("true")) continue; + if(nodSujetSequence.getNodes().get(i).getNomElt().equals("text:sequence-decl")) { node seqSujet = nodSujetSequence.getNodes().get(i); int pointDebut = evaluation.getPointsClass(); @@ -563,6 +583,13 @@ public class analyseLesNodesPrincipaux { //** Parcours les nodes enfants du node ** //****************************************************** for(int i = 0 ; i < nodSujetTableaux.getNodes().size(); i++) { + + //************************************ + //** Analyser que les nodes évaluer ** + //************************************ + if(nodSujetTableaux.getNodes().get(i).getAttributs().get("evaluer")==null) continue; + if(!nodSujetTableaux.getNodes().get(i).getAttributs().get("evaluer").equals("true")) continue; + if(nodSujetTableaux.getNodes().get(i).getNomElt().equals("table:table")) { int pointDebut = evaluation.getPointsClass(); int pointTotalDebut = evaluation.getPointTotal(); @@ -598,67 +625,6 @@ public class analyseLesNodesPrincipaux { //************************************ tableau = analyseLesNodesEnfants.nodeNext(tableau, "ana:tableau", tableauStudent, null, null, tableSujet, null, null,nodmenu, a); -// // les enfants du premier niveau du node -// for(int j = 0 ; j < tableSujet.getNodes().size();j++ ) { //niveau 2 -// -// node nodSujet = tableSujet.getNodes().get(j); -// String nameNode = nodSujet.getNomElt(); -// node nodStudent = null; -// -// if(tableauStudent!=null) nodStudent = rechercherUnNodeStudent.rechercheLeNodeEnCascade(nameNode,nodSujet,null,null,tableauStudent,a); -// -// //insère un saut si titre pas vide et saut=true -// tableau=addNodeSautTitre(nodSujet, tableau); -// -// -// // analyse attribut et contenu des enfants du premier niveau -// tableau = analyseLesAttributEtContenuDuNode(nodStudent, nodSujet, tableau, "ana:tableau",nameNode); -// -// -// for(int k = 0 ; k < nodSujet.getNodes().size();k++) { //niveau 3 -// node nod2Sujet = nodSujet.getNodes().get(k); -// String nameNode2 = nod2Sujet.getNomElt(); -// node nod2Student = null; -// -// if(tableauStudent!=null) nod2Student = rechercherUnNodeStudent.rechercheLeNodeEnCascade(nameNode2,nod2Sujet,null,tableauStudent,nodStudent,a); -// -// //insère un saut si titre pas vide et saut=true -// tableau=addNodeSautTitre(nod2Sujet, tableau); -// -// // analyse attribut et contenu des enfants du second niveau -// tableau = analyseLesAttributEtContenuDuNode(nod2Student, nod2Sujet, tableau, "ana:tableau",nameNode2 ); -// -// -// for(int l = 0 ; l < nod2Sujet.getNodes().size();l++) { //niveau 4 -// node nod3Sujet = nod2Sujet.getNodes().get(l); -// String nameNode3 = nod3Sujet.getNomElt(); -// node nod3Student = null; -// -// if(tableauStudent!=null) nod3Student = rechercherUnNodeStudent.rechercheLeNodeEnCascade(nameNode3,nod3Sujet,tableauStudent,nodStudent,nod2Student,a); -// -// //insère un saut si titre pas vide et saut=true -// tableau=addNodeSautTitre(nod3Sujet, tableau); -// -// // analyse attribut et contenu des enfants du second niveau -// tableau = analyseLesAttributEtContenuDuNode(nod3Student, nod3Sujet, tableau, "ana:tableau", nameNode3); -// -// -// for(int m = 0 ; m < nod3Sujet.getNodes().size();m++) { //niveau 5 -// node nod4Sujet = nod3Sujet.getNodes().get(m); -// String nameNode4 = nod4Sujet.getNomElt(); -// node nod4Student = null; -// -// if(tableauStudent!=null) nod4Student = rechercherUnNodeStudent.rechercheLeNodeEnCascade(nameNode4,nod4Sujet,nodStudent,nod2Student,nod3Student,a); -// -// //insère un saut si titre pas vide et saut=true -// tableau=addNodeSautTitre(nod4Sujet, tableau); -// -// // analyse attribut et contenu des enfants du second niveau -// tableau = analyseLesAttributEtContenuDuNode(nod4Student, nod4Sujet, tableau, "ana:tableau", nameNode4); -// } -// } -// } -// } //**************************************************************** //** Insère les attributs des points dans les node de l'analyse ** //**************************************************************** @@ -707,7 +673,11 @@ public class analyseLesNodesPrincipaux { for(int i = 0 ; i < nodSujetTableI.getNodes().size(); i++) { - //text:illustration-index-sourceIllustrations + //************************************ + //** Analyser que les nodes évaluer ** + //************************************ + if(nodSujetTableI.getNodes().get(i).getAttributs().get("evaluer")==null) continue; + if(!nodSujetTableI.getNodes().get(i).getAttributs().get("evaluer").equals("true")) continue; if(nodSujetTableI.getNodes().get(i).getNomElt().equals("text:illustration-index")) { int pointDebut = evaluation.getPointsClass(); @@ -847,6 +817,14 @@ public class analyseLesNodesPrincipaux { for(int i = 0 ; i < nodSujetTableM.getNodes().size(); i++) { + + //************************************ + //** Analyser que les nodes évaluer ** + //************************************ + if(nodSujetTableM.getNodes().get(i).getAttributs().get("evaluer")==null) continue; + if(!nodSujetTableM.getNodes().get(i).getAttributs().get("evaluer").equals("true")) continue; + + if(nodSujetTableM.getNodes().get(i).getNomElt().equals("text:table-of-content")) { node table = new node(); table.setNomElt("tablematiere"); @@ -911,15 +889,8 @@ public class analyseLesNodesPrincipaux { table.getAttributs().put("point", String.valueOf(evaluation.getPointsClass()-pointDebut)); table.getAttributs().put("pointTotal", String.valueOf(evaluation.getPointTotal()-pointTotalDebut)); nodTablesMs.getNodes().add(table); - - - - } - - - } //***************************************************************** //** Insère les attributs des points dans les nodes de l'analyse ** @@ -962,6 +933,12 @@ public class analyseLesNodesPrincipaux { //**************************************** for(int i = 0 ; i < nodSujetPage.getNodes().size(); i++) { + //************************************ + //** Analyser que les nodes évaluer ** + //************************************ + if(nodSujetPage.getNodes().get(i).getAttributs().get("evaluer")==null) continue; + if(!nodSujetPage.getNodes().get(i).getAttributs().get("evaluer").equals("true")) continue; + if(nodSujetPage.getNodes().get(i).getNomElt().equals("style:master-page")) { node pageSujet = nodSujetPage.getNodes().get(i); int pointDebut = evaluation.getPointsClass(); @@ -1143,6 +1120,13 @@ public class analyseLesNodesPrincipaux { //** Parcours les nodes enfants du node ** //******************************************************** for(int i = 0 ; i < nodSujetS.getNodes().size(); i++) { + + //************************************ + //** Analyser que les nodes évaluer ** + //************************************ + if(nodSujetS.getNodes().get(i).getAttributs().get("evaluer")==null) continue; + if(!nodSujetS.getNodes().get(i).getAttributs().get("evaluer").equals("true")) continue; + if(nodSujetS.getNodes().get(i).getNomElt().equals("page")) { node pageSujet = nodSujetS.getNodes().get(i); int pointDebut = evaluation.getPointsClass(); diff --git a/src/fenetres/afficheText.java b/src/fenetres/afficheText.java index f9a4bb6..4c03bc9 100644 --- a/src/fenetres/afficheText.java +++ b/src/fenetres/afficheText.java @@ -110,6 +110,10 @@ public class afficheText extends JEditorPane { if(nod.getAttributs().size()==1) sb.append("

PAS D'ATTRIBUT DANS CE NODE

"); } + if(nod.getNomElt().equals("OU")) { + sb.append("
  • "+ imageOU + " Méthode OU
  • "); + } + Enumeration key = nod.getAttributs().keys(); List Lesattributsdunode = new ArrayList(); while(key.hasMoreElements()) { @@ -201,11 +205,6 @@ public class afficheText extends JEditorPane { if(Lesattributsdunode.get(i).equals("evalPiedPageActive") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) { sb.append("
  • "+imagePiedPageActive + " " + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"
  • "); } - if(Lesattributsdunode.get(i).equals("pointOuMax")) { - sb.append("
  • "+imageOU+ " " + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"
  • "); - } - - // sb.append("
  • " + Lesattributsdunode.get(i) + "=\"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"
  • "); } diff --git a/src/fenetres/create_act/actNewFichierAnalyse.java b/src/fenetres/create_act/actNewFichierAnalyse.java index 589da0f..64950e9 100644 --- a/src/fenetres/create_act/actNewFichierAnalyse.java +++ b/src/fenetres/create_act/actNewFichierAnalyse.java @@ -1,5 +1,8 @@ package fenetres.create_act; +import java.awt.Component; +import java.awt.HeadlessException; +import java.awt.Image; import java.awt.event.ActionEvent; import java.awt.event.InputEvent; import java.awt.event.KeyEvent; @@ -8,6 +11,7 @@ import java.io.IOException; import javax.swing.AbstractAction; import javax.swing.Action; import javax.swing.ImageIcon; +import javax.swing.JDialog; import javax.swing.JFileChooser; import javax.swing.KeyStroke; import javax.swing.filechooser.FileNameExtensionFilter; @@ -38,7 +42,18 @@ public class actNewFichierAnalyse extends AbstractAction{ } @Override public void actionPerformed(ActionEvent e) { - JFileChooser chooser = new JFileChooser(); + JFileChooser chooser = new JFileChooser(){ + private static final long serialVersionUID = 1L; + @Override + protected JDialog createDialog( Component parent ) throws HeadlessException { + JDialog dialog = super.createDialog( parent ); + Image img = new ImageIcon(getClass().getResource("/evalwriter.png") ).getImage(); + dialog.setIconImage(img); + return dialog; + } + }; + + chooser.setDialogTitle("Choisir un fichier ODF"); chooser.setCurrentDirectory(new java.io.File(commandes.path)); @@ -64,11 +79,11 @@ public class actNewFichierAnalyse extends AbstractAction{ //Supprime l'historique des modifications commandes.sujet.supprimeTousLesNodesEnfantWithThisName("text:tracked-changes"); - commandes.sujet.supprimeTousLesNodesEnfantWithThisName("text:deletion"); - commandes.sujet.supprimeTousLesNodesEnfantWithThisName("text:change-start"); - commandes.sujet.supprimeTousLesNodesEnfantWithThisName("text:change-end"); - commandes.sujet.supprimeTousLesNodesEnfantWithThisName("text:tracked-changes"); - commandes.sujet.supprimeTousLesNodesEnfantWithThisName("text:change"); +// commandes.sujet.supprimeTousLesNodesEnfantWithThisName("text:deletion"); +// commandes.sujet.supprimeTousLesNodesEnfantWithThisName("text:change-start"); +// commandes.sujet.supprimeTousLesNodesEnfantWithThisName("text:change-end"); +// commandes.sujet.supprimeTousLesNodesEnfantWithThisName("text:tracked-changes"); +// commandes.sujet.supprimeTousLesNodesEnfantWithThisName("text:change"); commandes.sujet = meptl.LectureFichierEtudiantSousFormeDeNode(commandes.sujet,b,0); diff --git a/src/fenetres/create_act/actOu.java b/src/fenetres/create_act/actOu.java index afa6adb..7967048 100644 --- a/src/fenetres/create_act/actOu.java +++ b/src/fenetres/create_act/actOu.java @@ -31,7 +31,6 @@ public class actOu extends AbstractAction{ nodeOu.setNomElt("OU"); nodeOu.setLevel(nod.getLevel()+1); nodeOu.setParent(nod); - nodeOu.getAttributs().put("pointOuMax","1"); nodeOu.getAttributs().put("evaluer","true"); nodeOu.setClose(true); nod.getNodes().add(nodeOu); diff --git a/src/fenetres/evaluate.java b/src/fenetres/evaluate.java index c56244b..2174fc4 100644 --- a/src/fenetres/evaluate.java +++ b/src/fenetres/evaluate.java @@ -1,10 +1,14 @@ package fenetres; import java.awt.BorderLayout; +import java.awt.Color; import java.awt.Font; import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.InputEvent; import java.awt.event.KeyEvent; import java.io.IOException; + import javax.swing.AbstractAction; import javax.swing.Action; import javax.swing.ImageIcon; @@ -13,29 +17,28 @@ import javax.swing.JCheckBox; import javax.swing.JFileChooser; import javax.swing.JFrame; import javax.swing.JLabel; +import javax.swing.JMenu; +import javax.swing.JMenuBar; +import javax.swing.JOptionPane; import javax.swing.JPanel; +import javax.swing.JScrollPane; import javax.swing.JToolBar; import javax.swing.KeyStroke; +import javax.swing.SwingConstants; import javax.swing.border.EmptyBorder; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; import javax.swing.filechooser.FileNameExtensionFilter; import javax.xml.parsers.ParserConfigurationException; + import org.xml.sax.SAXException; + import MEPTL.commandes; import MEPTL.meptl; import cXML.Run; import cXML.node; import fenetres.create_act.actAbout; -import javax.swing.SwingConstants; -import javax.swing.JScrollPane; import net.miginfocom.swing.MigLayout; -import java.awt.event.InputEvent; -import javax.swing.JMenuBar; -import javax.swing.JMenu; -import javax.swing.JOptionPane; -import java.awt.Color; -import javax.swing.event.ChangeListener; -import javax.swing.event.ChangeEvent; -import java.awt.event.ActionListener; public class evaluate extends JFrame { @@ -936,9 +939,12 @@ public class evaluate extends JFrame { } @Override public void actionPerformed( ActionEvent e ) { - + + + }; + }; /** diff --git a/src/fenetres/filechooserXML.java b/src/fenetres/filechooserXML.java index 4ab9925..fed79ee 100644 --- a/src/fenetres/filechooserXML.java +++ b/src/fenetres/filechooserXML.java @@ -1,6 +1,9 @@ package fenetres; +import java.awt.Component; import java.awt.Dimension; +import java.awt.HeadlessException; +import java.awt.Image; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; @@ -8,6 +11,8 @@ import java.io.FileNotFoundException; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; +import javax.swing.ImageIcon; +import javax.swing.JDialog; import javax.swing.JFileChooser; import javax.swing.JOptionPane; import javax.swing.filechooser.FileNameExtensionFilter; @@ -26,6 +31,7 @@ public class filechooserXML extends JFileChooser { public filechooserXML() { + setDialogTitle("Choisir un fichier d'analyse"); FileNameExtensionFilter filter = new FileNameExtensionFilter("Fichier d'analyse .XML", "xml"); @@ -54,6 +60,13 @@ public class filechooserXML extends JFileChooser { } } + @Override + protected JDialog createDialog( Component parent ) throws HeadlessException { + JDialog dialog = super.createDialog( parent ); + Image img = new ImageIcon(getClass().getResource("/evalwriter.png") ).getImage(); + dialog.setIconImage(img); + return dialog; + } /** diff --git a/src/fenetres/proprieteFichierAnalyse.java b/src/fenetres/proprieteFichierAnalyse.java index 4f0546f..2a4b3e2 100644 --- a/src/fenetres/proprieteFichierAnalyse.java +++ b/src/fenetres/proprieteFichierAnalyse.java @@ -21,7 +21,6 @@ import javax.swing.DefaultComboBoxModel; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; import net.miginfocom.swing.MigLayout; -import java.awt.Toolkit; import javax.swing.ImageIcon; import javax.swing.JTextArea; @@ -64,6 +63,9 @@ public final class proprieteFichierAnalyse extends JFrame { private JButton btnAideControleDateCreation; private JButton btnAideInitial_Creator; private JButton btnAidecontrole_Initial_Creator; + private JButton btnAidecontrole_URLAide; + private JButton btnAidecontrole_URLSujet; + private JButton btnAidecontrole_Commentaire; private JButton btnVoirBaremeABC; private JButton btnVoirBaremeNumeric; private static proprieteFichierAnalyse instance; @@ -75,10 +77,14 @@ public final class proprieteFichierAnalyse extends JFrame { * Create the frame. */ public proprieteFichierAnalyse() { - setIconImage(Toolkit.getDefaultToolkit().getImage(proprieteFichierAnalyse.class.getResource("/resources/evalwriter.ico"))); - setBounds(0, 0, 630, 700); + + ImageIcon img = new ImageIcon(getClass().getResource("/evalwriter.png") ); + setTitle("Propriétés du fichier d'analyse - " + commandes.version + " " + commandes.branch); + setIconImage(img.getImage()); + + setBounds(0, 0, 630, 715); setResizable(false); - setTitle("Propriété du fichier d'analyse"); + setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); int screenWidth = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getWidth(); int screenHeight = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getHeight(); @@ -135,6 +141,7 @@ public final class proprieteFichierAnalyse extends JFrame { lblNewLabel_2.setFont(new Font("Tahoma", Font.PLAIN, 12)); contentPane.add(lblNewLabel_2, "cell 0 2,alignx left,aligny center"); + // Meta textFieldMetaSujet = new JTextField(); textFieldMetaSujet.setFont(new Font("Tahoma", Font.PLAIN, 12)); contentPane.add(textFieldMetaSujet, "cell 1 2,grow"); @@ -142,7 +149,6 @@ public final class proprieteFichierAnalyse extends JFrame { if(commandes.sujet.getAttributs().get("metaSujet")!=null){ textFieldMetaSujet.setText(commandes.sujet.getAttributs().get("metaSujet")); } - btnAideMetaSujet = new JButton(""); btnAideMetaSujet.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { @@ -155,6 +161,7 @@ public final class proprieteFichierAnalyse extends JFrame { btnAideMetaSujet.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png"))); contentPane.add(btnAideMetaSujet, "cell 2 2"); + JLabel lblNewLabel_3 = new JLabel("

    Propriété personnalisé Sujet obligatoire
    dans les fichiers des étudiants.

    " ); lblNewLabel_3.setFont(new Font("Tahoma", Font.PLAIN, 12)); contentPane.add(lblNewLabel_3, "cell 0 3,alignx left,aligny center"); @@ -375,7 +382,22 @@ public final class proprieteFichierAnalyse extends JFrame { lblNewLabel_11 = new JLabel("Lien URL de l'aide"); lblNewLabel_11.setFont(new Font("Tahoma", Font.PLAIN, 12)); contentPane.add(lblNewLabel_11, "cell 0 12,alignx left"); + btnAidecontrole_URLAide = new JButton(""); + btnAidecontrole_URLAide.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + JOptionPane.showInternalMessageDialog(null, "Si vous indiquez une URL alors elle apparaîtra dans" + + "le feedback des étudiants."); + } + }); + btnAidecontrole_URLAide.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png"))); + contentPane.add(btnAidecontrole_URLAide, "cell 2 12"); + + // URL Aide + lblNewLabel_12 = new JLabel("Lien URL du sujet"); + lblNewLabel_12.setFont(new Font("Tahoma", Font.PLAIN, 12)); + contentPane.add(lblNewLabel_12, "cell 0 13,alignx left"); + textFieldlink_help = new JTextField(); textFieldlink_help.setFont(new Font("Tahoma", Font.PLAIN, 12)); contentPane.add(textFieldlink_help, "cell 1 12,growx"); @@ -384,16 +406,7 @@ public final class proprieteFichierAnalyse extends JFrame { textFieldlink_help.setText(commandes.sujet.getAttributs().get("link_help")); } - lblNewLabel_12 = new JLabel("Lien URL du sujet"); - lblNewLabel_12.setFont(new Font("Tahoma", Font.PLAIN, 12)); - contentPane.add(lblNewLabel_12, "cell 0 13,alignx left"); - - textFieldlink_sujet = new JTextField(); - contentPane.add(textFieldlink_sujet, "cell 1 13,growx"); - textFieldlink_sujet.setColumns(10); - if(commandes.sujet.getAttributs().get("link_sujet")!=null){ - textFieldlink_sujet.setText(commandes.sujet.getAttributs().get("link_sujet")); - } + btnVoirBaremeABC = new JButton(""); btnVoirBaremeABC.addActionListener(new ActionListener() { @@ -405,7 +418,50 @@ public final class proprieteFichierAnalyse extends JFrame { }); btnVoirBaremeABC.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/voirmini.png"))); contentPane.add(btnVoirBaremeABC, "cell 2 4"); + + // URL Sujet Ligne 13 + textFieldlink_sujet = new JTextField(); + contentPane.add(textFieldlink_sujet, "cell 1 13,growx"); + textFieldlink_sujet.setColumns(10); + if(commandes.sujet.getAttributs().get("link_sujet")!=null){ + textFieldlink_sujet.setText(commandes.sujet.getAttributs().get("link_sujet")); + } + btnAidecontrole_URLSujet = new JButton(""); + btnAidecontrole_URLSujet.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + JOptionPane.showInternalMessageDialog(null, "Si vous indiquez une URL alors elle apparaîtra dans" + + "le feedback des étudiants."); + } + }); + btnAidecontrole_URLSujet.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png"))); + contentPane.add(btnAidecontrole_URLSujet, "cell 2 13"); + + // Commentaire exercice Ligne 14 + lblNewLabel_13 = new JLabel("Commentaire sur l'exercice"); + lblNewLabel_13.setFont(new Font("Tahoma", Font.PLAIN, 12)); + contentPane.add(lblNewLabel_13, "cell 0 14,alignx left"); + textAreaCommentaire = new JTextArea(); + textAreaCommentaire.setFont(new Font("Tahoma", Font.PLAIN, 12)); + contentPane.add(textAreaCommentaire, "cell 1 14,grow"); + if(!commandes.sujet.getContenu().isEmpty()) { + if(commandes.sujet.getContenu().get(0)!=null) { + String textCommentaire = commandes.sujet.getContenu().get(0).replace("-NewLine-", "\n"); + textAreaCommentaire.setText(textCommentaire); + } + } + btnAidecontrole_Commentaire = new JButton(""); + btnAidecontrole_Commentaire.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + JOptionPane.showInternalMessageDialog(null, "Si vous tapez un commentaire, " + + "il apparaîtra dans les feedbacks des étudiants."); + } + }); + btnAidecontrole_Commentaire.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png"))); + contentPane.add(btnAidecontrole_Commentaire, "cell 2 14"); + + + // Bouton de calcul de la base numérique btnVoirBaremeNumeric = new JButton(""); btnVoirBaremeNumeric.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { @@ -418,21 +474,8 @@ public final class proprieteFichierAnalyse extends JFrame { btnVoirBaremeNumeric.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/voirmini.png"))); contentPane.add(btnVoirBaremeNumeric, "cell 2 5"); - lblNewLabel_13 = new JLabel("Commentaire sur l'exercice"); - lblNewLabel_13.setFont(new Font("Tahoma", Font.PLAIN, 12)); - contentPane.add(lblNewLabel_13, "cell 0 14,alignx left"); - - textAreaCommentaire = new JTextArea(); - textAreaCommentaire.setFont(new Font("Tahoma", Font.PLAIN, 12)); - contentPane.add(textAreaCommentaire, "cell 1 14,grow"); - if(!commandes.sujet.getContenu().isEmpty()) { - if(commandes.sujet.getContenu().get(0)!=null) { - String textCommentaire = commandes.sujet.getContenu().get(0).replace("-NewLine-", "\n"); - textAreaCommentaire.setText(textCommentaire); - } - } - + // Bouton pour validation JButton btnNewButton = new JButton("Valider"); btnNewButton.setFont(new Font("Tahoma", Font.BOLD, 14)); contentPane.add(btnNewButton, "cell 1 15,grow"); diff --git a/src/fenetres/setting.java b/src/fenetres/setting.java index 303eef4..9d7c9fc 100644 --- a/src/fenetres/setting.java +++ b/src/fenetres/setting.java @@ -92,7 +92,7 @@ public final class setting extends JFrame { ImageIcon img = new ImageIcon(getClass().getResource("/evalwriter.png") ); setIconImage(img.getImage()); - setTitle(commandes.Titre + commandes.version + " - Les paramètres pour l'évaluation"); + setTitle(commandes.Titre +" "+ commandes.version +" "+commandes.branch+" - Les paramètres pour l'évaluation"); setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); int screenWidth = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getWidth(); int screenHeight = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getHeight(); @@ -332,8 +332,7 @@ public final class setting extends JFrame { textFieldNbrMiniModification.setText(nodTriche.getAttributs().get("mini_number_modification")); panelPlagiarism.add(textFieldNbrMiniModification); - JLabel lblNewLabel_2 = new JLabel("L'étudiants n'a pas réaliser assez de travaux.
    " - + "si valuer = -1 alors n'est pas pris en compte."); + JLabel lblNewLabel_2 = new JLabel("L'étudiants n'a pas réaliser assez de travaux.
    si valeur = -1 alors n'est pas pris en compte."); lblNewLabel_2.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblNewLabel_2.setVerticalAlignment(SwingConstants.TOP); lblNewLabel_2.setBounds(430, 297, 239, 41); @@ -760,7 +759,7 @@ public final class setting extends JFrame { nodImportMoodle.getAttributs().put("firstname","prenom"); nodImportMoodle.getAttributs().put("id","identification"); node nodZIP = commandes.sujet.retourneFirstEnfantsByName("zip"); - nodZIP.getAttributs().put("size","48000000"); + nodZIP.getAttributs().put("size","50"); nodZIP.getAttributs().put("nameZip","feedbackMoodle"); node nodplagiarism = commandes.sujet.retourneFirstEnfantsByName("plagiarism"); nodplagiarism.getAttributs().put("number_match","2"); diff --git a/src/list/listeAttributsAnalyseWriter.java b/src/list/listeAttributsAnalyseWriter.java index fe9845f..dd00f70 100644 --- a/src/list/listeAttributsAnalyseWriter.java +++ b/src/list/listeAttributsAnalyseWriter.java @@ -72,7 +72,6 @@ public class listeAttributsAnalyseWriter { //Le node OU if(attribut.equals("OU")) return true; - if(attribut.equals("pointOuMax")) return true; // if(attribut.equals("page_start:text_contenu_index")) return true;