This commit is contained in:
pablo rodriguez 2022-06-14 21:24:10 +02:00
parent 4e49c959c2
commit 074c8fe6ec
42 changed files with 89 additions and 9 deletions

View File

@ -15,6 +15,6 @@ Cette application permet dévaluer un très grand nombre de fichiers réalis
• de générer des fichiers danalyses pour créer ses propres évaluations.
### Tutoriels :
https://artoistv.univ-artois.fr/video/4334-presentation-analysewriter/
https://www.youtube.com/watch?v=vmE38I6iVCs
https://www.youtube.com/channel/UCBSfItcCVnbRJdQbVE9ppjQ

Binary file not shown.

15
bin/.gitignore vendored
View File

@ -1,3 +1,18 @@
/app/
/MEPTL/
/calcul/
/couleur.png
/couleur.svg
/couleurmini.png
/similitude.png
/similitude.svg
/similitudemini.png
/traduction.png
/traduction.svg
/traductionmini.png
/triche.png
/triche.svg
/trichemini.png
/zip.png
/zip.svg
/zipmini.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.

View File

@ -1,5 +1,7 @@
package app;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
@ -24,7 +26,10 @@ public class afficheText extends JEditorPane {
private static final long serialVersionUID = 1L;
/**
* Raffraichie l'affichage de la fenête create lorsque selection d'un node.
* @param nod
*/
public void refreshAffichage(node nod) {
if(nod!=null) {
@ -234,6 +239,11 @@ public class afficheText extends JEditorPane {
}
/**
* Affiche le nombre de point d'un node.
* @param nod
* @param pointTotalNode
*/
public void AfficheTotalPoint(node nod, int pointTotalNode) {
setContentType("text/html");
@ -255,7 +265,44 @@ public class afficheText extends JEditorPane {
setText("<html>"+sb.toString()+"</html>");
}
/**
* Affiche le nombre de point et la réppartition dans les node principaux.
* @param liste
*/
public void afficheListeDesPointsDansToutExercice(ArrayList<String> liste) {
StringBuilder text = new StringBuilder();
NumberFormat f = new DecimalFormat("##.00");
text.append(baliseStyle.balise());
text.append("<hr><h1><u>INFORMATIONS</u><h1><hr><br>");
Double NbrPointDansExercice = 0.0;
for(int i = 0 ; i < liste.size(); i++) {
String[] A = liste.get(i).split(" ");
double NbrPointApresPonderation = 0.0;
int NbrPointBrut = 0;
NbrPointBrut = Integer.valueOf(A[1]);
NbrPointApresPonderation = NbrPointBrut*Double.valueOf(A[2]);
NbrPointDansExercice = NbrPointDansExercice + NbrPointApresPonderation;
if(NbrPointBrut>0) {
text.append("<p><b><u>Dans le node "+ A[0] + "</u></b>.<br>"
+ "Le nombre de point brut est de <b>" + A[1] + "</b><br>"
+ "Le poids est de " + A[2]+ " soit un total de <span class=\"rouge\"><b>" + f.format(NbrPointApresPonderation) + "</b></span></p><br><hr>");
}
}
text.append("<br>");
text.append("<h3>Le nombre de point total dans l'exercice est de : " + f.format(NbrPointDansExercice) + "</h3>");
setContentType("text/html");
setText("<html>"+text.toString()+"</html>");
}
/**
* Affiche le chargement du fichier d'analyse
*/
public void afficheChargementFichierAnalyse(){

View File

@ -538,7 +538,7 @@ public class create extends JFrame {
toolBar_1.addSeparator();
JButton btnTotalPoint = new JButton(actTotalPoint);
btnTotalPoint.setToolTipText("");
btnTotalPoint.setToolTipText("Nombre de point total dans l'exercice.");
btnTotalPoint.setText("");
btnTotalPoint.setIcon(new ImageIcon(create.class.getResource("/resources/totalpoint.png")));
toolBar_1.add(btnTotalPoint);
@ -1401,14 +1401,15 @@ public class create extends JFrame {
{
putValue( Action.NAME, "Nombre de point" );
putValue( Action.SHORT_DESCRIPTION, "Nombre de points dans le node" );
putValue( Action.SHORT_DESCRIPTION, "Nombre de point total dans l'exercice" );
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/totalpointmini.png")) );
putValue( Action.LARGE_ICON_KEY, new ImageIcon(create.class.getResource("/resources/totalpoint.png")) );
}
@Override public void actionPerformed( ActionEvent e ) {
System.out.println("Calcul le nombre de point dans le sujet");
textNodeSelect.AfficheTotalPoint(commandes.sujet,calculNombrePointEvaluation.calculNombreDepoint(commandes.sujet,0));
textNodeSelect.afficheListeDesPointsDansToutExercice(calculNombrePointEvaluation.calculPointDansToutExercice());
}
};
@ -1419,7 +1420,7 @@ public class create extends JFrame {
{
putValue( Action.NAME, "Nombre de point" );
putValue( Action.SHORT_DESCRIPTION, "Nombre de points dans le node" );
putValue( Action.SHORT_DESCRIPTION, "Nombre de point brut dans le node" );
putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/totalpointnodemini.png")) );
putValue( Action.LARGE_ICON_KEY, new ImageIcon(create.class.getResource("/resources/totalpointnode.png")) );
}

View File

@ -8,7 +8,6 @@ import javax.swing.border.EmptyBorder;
import javax.swing.filechooser.FileNameExtensionFilter;
import MEPTL.commandes;
import MEPTL.verificationFichierAnalyse;
import cXML.Run;
import cXML.node;
@ -33,7 +32,6 @@ import java.util.regex.Pattern;
import java.awt.event.ActionEvent;
import java.awt.GridLayout;
import java.awt.Color;
import javax.swing.UIManager;
public class setting extends JFrame {

View File

@ -1,15 +1,34 @@
package calcul;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.swing.JOptionPane;
import MEPTL.commandes;
import cXML.node;
public class calculNombrePointEvaluation {
/**
* Ensemble des points dans les différents node principaux.
* @return
*/
public static ArrayList<String> calculPointDansToutExercice(){
ArrayList<String> ListeNodeEvaluer = new ArrayList<String>();;
for(int i = 0 ; i < commandes.sujet.getNodes().size();i++) {
if(!commandes.sujet.getNodes().get(i).getNomElt().equals("setting")) {
ListeNodeEvaluer.add(commandes.sujet.getNodes().get(i).getNomElt() + " " +
String.valueOf(calculNombreDepoint(commandes.sujet.getNodes().get(i), 0)) + " " +
String.valueOf(commandes.sujet.getNodes().get(i).getAttributs().get("poids")));
}
}
return ListeNodeEvaluer;
}
public static int calculNombreDepoint(node nod, int point) {
if(nod.getAttributs().get("evaluer")!=null) if(nod.getAttributs().get("evaluer").equalsIgnoreCase("true")){