This commit is contained in:
pablo rodriguez 2022-06-14 20:09:16 +02:00
parent ac02164a83
commit 4e49c959c2
66 changed files with 94 additions and 83 deletions

View File

@ -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 danalyse. Elle permet de facilité l'importation des notes et des feedbacks des étudiants sur Moodle.

Binary file not shown.

1
bin/.gitignore vendored
View File

@ -1,2 +1,3 @@
/app/
/MEPTL/
/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.

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.

View File

@ -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<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);
}
}
}
}
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));
}
};

View File

@ -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);
}

View File

@ -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<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);
}
}
}
}
for(int i = 0 ; i < nod.getNodes().size();i++) {
if(nod.getNodes().get(i)!=null) {
point = calculNombreDepoint(nod.getNodes().get(i), point);
}
}
}
return point;
}
}