MAJ
This commit is contained in:
parent
fd64981064
commit
f9bdf8191f
@ -2,10 +2,10 @@
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" path="icons"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="lib" path="C:/Users/pabr6/eclipse-workspace/zip4j-1.2.7.jar"/>
|
||||
<classpathentry kind="lib" path="C:/Users/pabr6/git/analyseWriter/MEPTL/miglayout15-swing.jar"/>
|
||||
<classpathentry kind="lib" path="jgoodies-forms-1.8.0.jar" sourcepath="jgoodies-forms-1.8.0-sources.jar"/>
|
||||
<classpathentry kind="lib" path="C:/Users/pabr6/eclipse-workspace/cXML.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
1
.project
1
.project
@ -3,6 +3,7 @@
|
||||
<name>analyseWriter</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
<project>cXML</project>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
|
2
.settings/org.eclipse.jdt.ui.prefs
Normal file
2
.settings/org.eclipse.jdt.ui.prefs
Normal file
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.ui.text.custom_code_templates=
|
2
.settings/org.eclipse.ltk.core.refactoring.prefs
Normal file
2
.settings/org.eclipse.ltk.core.refactoring.prefs
Normal file
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
|
Binary file not shown.
1
bin/.gitignore
vendored
1
bin/.gitignore
vendored
@ -1,2 +1 @@
|
||||
/app/
|
||||
/resources/
|
||||
|
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.
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
bin/resources/attributmini.png
Normal file
BIN
bin/resources/attributmini.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1002 B |
BIN
bin/resources/poidsmini.png
Normal file
BIN
bin/resources/poidsmini.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
bin/resources/sautmini.png
Normal file
BIN
bin/resources/sautmini.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 533 B |
BIN
bin/resources/titremini.png
Normal file
BIN
bin/resources/titremini.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 926 B |
BIN
bin/resources/voirmini.png
Normal file
BIN
bin/resources/voirmini.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 853 B |
BIN
bin/resources/whatmini.png
Normal file
BIN
bin/resources/whatmini.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
171
src/app/attributs.java
Normal file
171
src/app/attributs.java
Normal file
@ -0,0 +1,171 @@
|
||||
package app;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.border.EmptyBorder;
|
||||
|
||||
import cXML.node;
|
||||
|
||||
import java.awt.FlowLayout;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Enumeration;
|
||||
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import javax.swing.JLabel;
|
||||
import java.awt.Font;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.JTextField;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JCheckBox;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.ActionEvent;
|
||||
|
||||
public class attributs extends JFrame {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
private JPanel contentPane;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Create the frame.
|
||||
*/
|
||||
public attributs(node nod) {
|
||||
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
|
||||
setBounds(100, 100, 727, 669);
|
||||
contentPane = new JPanel();
|
||||
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
|
||||
setContentPane(contentPane);
|
||||
contentPane.setLayout(new BorderLayout(0, 0));
|
||||
|
||||
ArrayList<JLabel> Leslabels = new ArrayList<JLabel>();
|
||||
ArrayList<JTextField> Lesvaleurs = new ArrayList<JTextField>();
|
||||
ArrayList<JCheckBox> Lesevaluer = new ArrayList<JCheckBox>();
|
||||
ArrayList<JTextField> Lespoints = new ArrayList<JTextField>();
|
||||
|
||||
JPanel panelGauche = new JPanel();
|
||||
contentPane.add(panelGauche, BorderLayout.WEST);
|
||||
|
||||
JPanel panelHaut = new JPanel();
|
||||
contentPane.add(panelHaut, BorderLayout.NORTH);
|
||||
|
||||
JLabel lblNomNode = new JLabel(nod.getNomElt());
|
||||
lblNomNode.setFont(new Font("Tahoma", Font.BOLD, 14));
|
||||
panelHaut.add(lblNomNode);
|
||||
|
||||
JPanel panelBas = new JPanel();
|
||||
contentPane.add(panelBas, BorderLayout.SOUTH);
|
||||
panelBas.setLayout(new FlowLayout(FlowLayout.RIGHT, 5, 5));
|
||||
|
||||
JButton btnNewButton = new JButton("Valider");
|
||||
panelBas.add(btnNewButton);
|
||||
|
||||
JPanel panelDroite = new JPanel();
|
||||
contentPane.add(panelDroite, BorderLayout.EAST);
|
||||
|
||||
JScrollPane scrollPaneCentre = new JScrollPane();
|
||||
contentPane.add(scrollPaneCentre, BorderLayout.CENTER);
|
||||
|
||||
JPanel panelCentre = new JPanel();
|
||||
scrollPaneCentre.setViewportView(panelCentre);
|
||||
panelCentre.setLayout(new MigLayout("", "[100px:n,grow][150px:n,grow 150][::80px][80px:n,grow]", "[::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px][::20px]"));
|
||||
|
||||
JLabel lblNewLabel = new JLabel("Nom attribut");
|
||||
lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 11));
|
||||
panelCentre.add(lblNewLabel, "cell 0 0");
|
||||
|
||||
JLabel lblNewLabel_1 = new JLabel("Valeurs");
|
||||
lblNewLabel_1.setFont(new Font("Tahoma", Font.BOLD, 11));
|
||||
panelCentre.add(lblNewLabel_1, "flowx,cell 1 0");
|
||||
|
||||
JLabel lblNewLabel_2 = new JLabel("Evaluer");
|
||||
lblNewLabel_2.setFont(new Font("Tahoma", Font.BOLD, 11));
|
||||
panelCentre.add(lblNewLabel_2, "cell 2 0");
|
||||
|
||||
JLabel lblNewLabel_3 = new JLabel("Point(s)");
|
||||
lblNewLabel_3.setFont(new Font("Tahoma", Font.BOLD, 11));
|
||||
panelCentre.add(lblNewLabel_3, "cell 3 0");
|
||||
|
||||
|
||||
|
||||
|
||||
Enumeration<String> key = nod.getAttributs().keys();
|
||||
while(key.hasMoreElements()) {
|
||||
String k = key.nextElement();
|
||||
String value = nod.getAttributs().get(k);
|
||||
String point = "0";
|
||||
JCheckBox checkEval = new JCheckBox();
|
||||
boolean evaluer = false;
|
||||
if(value.contains("‽")||value.contains("‼")) {
|
||||
evaluer=true;
|
||||
if(value.contains("‽")) {
|
||||
point = value.substring(value.lastIndexOf("‽")+1,value.length());
|
||||
value = value.substring(0,value.lastIndexOf("‽"));
|
||||
}
|
||||
if(value.contains("‼")) {
|
||||
point = value.substring(value.lastIndexOf("‼")+1,value.length());
|
||||
value = value.substring(0,value.lastIndexOf("‼"));
|
||||
}
|
||||
}
|
||||
JTextField txtFielPoints = new JTextField(point);
|
||||
txtFielPoints.setColumns(2);
|
||||
checkEval.setSelected(evaluer);
|
||||
|
||||
Leslabels.add(new JLabel(k));
|
||||
Lesvaleurs.add(new JTextField(value));
|
||||
Lespoints.add(txtFielPoints);
|
||||
Lesevaluer.add(checkEval);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
for(int i = 0 ; i<Leslabels.size();i++) {
|
||||
Leslabels.get(i).setFont(new Font("Tahoma", Font.BOLD, 11));
|
||||
Lesvaleurs.get(i).setColumns(10);
|
||||
panelCentre.add(Leslabels.get(i), "cell 0 "+i+1);
|
||||
panelCentre.add(Lesvaleurs.get(i), "cell 1 "+i+1 + ",grow");
|
||||
panelCentre.add(Lesevaluer.get(i), "cell 2 "+i+1);
|
||||
panelCentre.add(Lespoints.get(i), "cell 3 " + i+1 +",alignx left,growy");
|
||||
}
|
||||
|
||||
|
||||
btnNewButton.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
|
||||
for(int i = 0 ; i<Leslabels.size();i++) {
|
||||
|
||||
String value = Lesvaleurs.get(i).getText();
|
||||
if(value.contains("‽")) value = value.substring(0,value.lastIndexOf("‽"));
|
||||
value = value.substring(0,value.lastIndexOf("‼"));
|
||||
|
||||
if(Lesevaluer.get(i).isSelected()) value = value + "‽";
|
||||
String point = "0";
|
||||
int pointNumeric = 0;
|
||||
try {
|
||||
pointNumeric = Integer.valueOf(Lespoints.get(i).getText());
|
||||
point = String.valueOf(pointNumeric);
|
||||
} catch (Exception e2) {
|
||||
|
||||
}
|
||||
value = value + point;
|
||||
|
||||
nod.getAttributs().put(Leslabels.get(i).getText(), value);
|
||||
|
||||
|
||||
dispose();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
this.setVisible(true);
|
||||
}
|
||||
}
|
@ -131,6 +131,8 @@ public class create extends JFrame {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Initialize the contents of the frame.
|
||||
* @throws UnsupportedLookAndFeelException
|
||||
@ -860,11 +862,10 @@ public class create extends JFrame {
|
||||
}
|
||||
|
||||
@Override public void actionPerformed( ActionEvent e ) {
|
||||
if(commandes.sujet.getNomElt().equals("fichier")) {
|
||||
new proprieteFichierAnalyse();
|
||||
|
||||
}
|
||||
System.out.println( "ouvre la fenêtre propriété du fichier d'analyse" );
|
||||
DefaultMutableTreeNode selectNode = (DefaultMutableTreeNode) tree.getSelectionPath().getLastPathComponent();
|
||||
node nod = (node) selectNode.getUserObject();
|
||||
new attributs(nod);
|
||||
System.out.println( "ouvre la fenêtre attributs" );
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -33,7 +33,6 @@ import cXML.Run;
|
||||
import cXML.node;
|
||||
|
||||
import javax.swing.SwingConstants;
|
||||
import java.awt.GridLayout;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.JProgressBar;
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
@ -43,8 +42,10 @@ import javax.swing.JMenu;
|
||||
import javax.swing.JOptionPane;
|
||||
import java.awt.Color;
|
||||
import java.awt.Desktop;
|
||||
import java.awt.EventQueue;
|
||||
|
||||
import javax.swing.JEditorPane;
|
||||
import java.awt.event.ActionListener;
|
||||
|
||||
|
||||
public class evaluate extends JFrame {
|
||||
|
||||
@ -52,25 +53,27 @@ public class evaluate extends JFrame {
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private JToolBar toolBar = new JToolBar();
|
||||
private JToolBar toolBar;
|
||||
private JPanel contentPane;
|
||||
private JLabel lblPath = new JLabel();
|
||||
private JLabel lblFileAnalyse = new JLabel();
|
||||
private JLabel lblFichierCSV = new JLabel();
|
||||
private JLabel lblFichierSVG = new JLabel();
|
||||
private JCheckBox chckbxfichiersEtudaints = new JCheckBox();
|
||||
private JCheckBox chckbxZipfeedback = new JCheckBox();
|
||||
private JCheckBox chckbxnoFeedback = new JCheckBox();
|
||||
private JCheckBox chckbxNoNote = new JCheckBox();
|
||||
private JCheckBox chckCSVNotes = new JCheckBox();
|
||||
private JCheckBox chckbxNoLogo = new JCheckBox();
|
||||
private JCheckBox chckbxVerif = new JCheckBox();
|
||||
private JCheckBox chckbxNewLogo = new JCheckBox();
|
||||
private JEditorPane txtpnmessages = new JEditorPane();
|
||||
private JProgressBar progressBar = new JProgressBar();
|
||||
private JLabel lblPath;
|
||||
private JLabel lblFileAnalyse;
|
||||
private JLabel lblFichierCSV;
|
||||
private JLabel lblFichierSVG;
|
||||
private JCheckBox chckbxfichiersEtudaints;
|
||||
private JCheckBox chckbxZipfeedback;
|
||||
private JCheckBox chckbxnoFeedback;
|
||||
private JCheckBox chckbxNoNote;
|
||||
private JCheckBox chckCSVNotes;
|
||||
private JCheckBox chckbxNoLogo;
|
||||
private JCheckBox chckbxVerif;
|
||||
private JCheckBox chckbxNewLogo;
|
||||
private JEditorPane txtpnmessages;
|
||||
public JProgressBar progressBarre;
|
||||
|
||||
|
||||
/**
|
||||
@ -85,6 +88,129 @@ public class evaluate extends JFrame {
|
||||
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
setBounds(100, 100, 980, 700);
|
||||
|
||||
createMenu();
|
||||
createToolBar();
|
||||
|
||||
contentPane = new JPanel();
|
||||
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
|
||||
setContentPane(contentPane);
|
||||
contentPane.setLayout(new BorderLayout(0, 0));
|
||||
|
||||
|
||||
contentPane.add(toolBar, BorderLayout.NORTH);
|
||||
|
||||
JPanel panelWest = new JPanel();
|
||||
contentPane.add(panelWest, BorderLayout.WEST);
|
||||
panelWest.setLayout(new MigLayout("", "[309px][]", "[38.00][71px][71px][][71px][][74.00][][]"));
|
||||
|
||||
JLabel lblTITRE = new JLabel("<HTML><U>PARAMETRES</U></HTML>");
|
||||
lblTITRE.setForeground(Color.RED);
|
||||
lblTITRE.setFont(new Font("Tahoma", Font.BOLD, 16));
|
||||
lblTITRE.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
panelWest.add(lblTITRE, "cell 0 0,alignx left,aligny center");
|
||||
|
||||
lblFileAnalyse = new JLabel("<HTML><B><U>Fichier de l'analyse</U></B> : </HTML>");
|
||||
lblFileAnalyse.setHorizontalAlignment(SwingConstants.LEFT);
|
||||
lblFileAnalyse.setFont(new Font("Tahoma", Font.BOLD, 14));
|
||||
panelWest.add(lblFileAnalyse, "flowy,cell 0 1,alignx left,growy");
|
||||
|
||||
chckbxfichiersEtudaints = new JCheckBox("Les fichiers ne sont pas dans des dossiers nominatifs");
|
||||
chckbxfichiersEtudaints.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
chckbxfichiersEtudaints.setToolTipText("Cochez si les fichiers des étudiants ne sont pas dans des dossier nominatifs");
|
||||
panelWest.add(chckbxfichiersEtudaints, "flowy,cell 0 2,grow");
|
||||
|
||||
lblFichierCSV = new JLabel("<HTML><B><U>Fichier CSV liste des étudiants</U></B></HTML> :");
|
||||
lblFichierCSV.setFont(new Font("Tahoma", Font.BOLD, 14));
|
||||
panelWest.add(lblFichierCSV, "flowy,cell 0 4,grow");
|
||||
|
||||
lblFichierSVG = new JLabel("<HTML><B><U>Fichier SVG</U></B> :</HTML>");
|
||||
lblFichierSVG.setFont(new Font("Tahoma", Font.BOLD, 14));
|
||||
panelWest.add(lblFichierSVG, "flowy,cell 0 6,growx");
|
||||
|
||||
chckCSVNotes = new JCheckBox("Créer un fichier CSV des notes");
|
||||
chckCSVNotes.setToolTipText("Cochez si vous voulez importer les notes dans un fichier CSV.");
|
||||
panelWest.add(chckCSVNotes, "cell 0 4,grow");
|
||||
|
||||
lblPath = new JLabel();
|
||||
lblPath.setHorizontalAlignment(SwingConstants.LEFT);
|
||||
lblPath.setFont(new Font("Tahoma", Font.BOLD, 14));
|
||||
lblPath.setText("<HTML><B><U>Dossier de l'analyse</U></B> : " + commandes.path.substring(commandes.path.lastIndexOf("\\")+1,commandes.path.length()) + "</HTML>");
|
||||
panelWest.add(lblPath, "cell 0 1,grow");
|
||||
|
||||
chckbxnoFeedback = new JCheckBox("Pas de feedback");
|
||||
chckbxnoFeedback.setToolTipText("Cochez si vous ne voulez pas générer des feedbacks");
|
||||
chckbxnoFeedback.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
panelWest.add(chckbxnoFeedback, "cell 0 2,grow");
|
||||
|
||||
chckbxZipfeedback = new JCheckBox("Zip les feedbacks");
|
||||
chckbxZipfeedback.setToolTipText("Cochez si vous voulez placer tous les feedbacks dans une archive ZIP");
|
||||
chckbxZipfeedback.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
panelWest.add(chckbxZipfeedback, "cell 0 2,grow");
|
||||
|
||||
chckbxNoNote = new JCheckBox("Pas de note dans les feedbacks");
|
||||
chckbxNoNote.setToolTipText("Cochez si vous voulez pas faire apparaître les notes dans les feedbacks");
|
||||
chckbxNoNote.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
panelWest.add(chckbxNoNote, "cell 0 2,grow");
|
||||
|
||||
chckbxVerif = new JCheckBox("Vérification des historiques avant analyse");
|
||||
chckbxVerif.setToolTipText("Cochez si vous voulez vérifier les échanges de fichiers entre les étudiants.");
|
||||
chckbxVerif.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
panelWest.add(chckbxVerif, "cell 0 2,grow");
|
||||
|
||||
chckbxNewLogo = new JCheckBox("Nouveau logo");
|
||||
chckbxNewLogo.setToolTipText("Cochez si vous voulez remplacer le logo par celui au-dessus.");
|
||||
chckbxNewLogo.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
panelWest.add(chckbxNewLogo, "cell 0 6");
|
||||
|
||||
chckbxNoLogo = new JCheckBox("Pas de logo");
|
||||
chckbxNoLogo.setToolTipText("Cochez si vous voulez pas de logo dans les feedbacks.");
|
||||
chckbxNoLogo.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
panelWest.add(chckbxNoLogo, "cell 0 6");
|
||||
|
||||
|
||||
JPanel panelCentre = new JPanel();
|
||||
contentPane.add(panelCentre, BorderLayout.CENTER);
|
||||
panelCentre.setLayout(new BorderLayout(0, 0));
|
||||
|
||||
JScrollPane scrollPane = new JScrollPane();
|
||||
panelCentre.add(scrollPane);
|
||||
|
||||
progressBarre = new JProgressBar();
|
||||
progressBarre.setEnabled(true);
|
||||
panelCentre.add(progressBarre, BorderLayout.NORTH);
|
||||
|
||||
txtpnmessages = new JEditorPane();
|
||||
txtpnmessages.setFont(new Font("Tahoma", Font.PLAIN, 14));
|
||||
txtpnmessages.setText("*** Charger un fichier d'analyse. ***");
|
||||
scrollPane.setViewportView(txtpnmessages);
|
||||
|
||||
this.setExtendedState(MAXIMIZED_BOTH);
|
||||
|
||||
refreshLabel();
|
||||
setVisible(true);
|
||||
// Pro();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void Pro() {
|
||||
// progressBarre = new JProgressBar();
|
||||
progressBarre.setMaximum(100000000);
|
||||
progressBarre.setStringPainted(true);
|
||||
for(int i = 0 ; i < 1000; i++) {
|
||||
progressBarre.setValue(i);
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void createMenu() {
|
||||
JMenuBar menuBar = new JMenuBar();
|
||||
menuBar.setFont(new Font("Segoe UI", Font.BOLD, 14));
|
||||
setJMenuBar(menuBar);
|
||||
@ -133,17 +259,12 @@ public class evaluate extends JFrame {
|
||||
mnMenu_Informations.add(actDocumentation);
|
||||
mnMenu_Informations.addSeparator();
|
||||
mnMenu_Informations.add( actAbout );
|
||||
}
|
||||
|
||||
|
||||
contentPane = new JPanel();
|
||||
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
|
||||
setContentPane(contentPane);
|
||||
contentPane.setLayout(new BorderLayout(0, 0));
|
||||
|
||||
private void createToolBar() {
|
||||
toolBar = new JToolBar();
|
||||
contentPane.add(toolBar, BorderLayout.NORTH);
|
||||
|
||||
|
||||
JButton btnSelectFileAnalyse = toolBar.add( actOpen );
|
||||
btnSelectFileAnalyse.setHideActionText( true );
|
||||
btnSelectFileAnalyse.setIcon(new ImageIcon(evaluate.class.getResource("/resources/fichierAnalyse.png")));
|
||||
@ -233,94 +354,6 @@ public class evaluate extends JFrame {
|
||||
btnExit.setIcon(new ImageIcon(evaluate.class.getResource("/resources/exit.png")));
|
||||
btnExit.setHideActionText(true);
|
||||
toolBar.add(btnExit);
|
||||
|
||||
JPanel panel = new JPanel();
|
||||
contentPane.add(panel, BorderLayout.WEST);
|
||||
panel.setLayout(new MigLayout("", "[309px][]", "[38.00][71px][71px][][71px][][74.00][][]"));
|
||||
|
||||
JLabel lblTITRE = new JLabel("<HTML><U>PARAMETRES</U></HTML>");
|
||||
lblTITRE.setForeground(Color.RED);
|
||||
lblTITRE.setFont(new Font("Tahoma", Font.BOLD, 16));
|
||||
lblTITRE.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
panel.add(lblTITRE, "cell 0 0,alignx left,aligny center");
|
||||
|
||||
lblFileAnalyse = new JLabel("<HTML><B><U>Fichier de l'analyse</U></B> : </HTML>");
|
||||
lblFileAnalyse.setHorizontalAlignment(SwingConstants.LEFT);
|
||||
lblFileAnalyse.setFont(new Font("Tahoma", Font.BOLD, 14));
|
||||
panel.add(lblFileAnalyse, "flowy,cell 0 1,alignx left,growy");
|
||||
|
||||
chckbxfichiersEtudaints = new JCheckBox("Les fichiers ne sont pas dans des dossiers nominatifs");
|
||||
chckbxfichiersEtudaints.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
chckbxfichiersEtudaints.setToolTipText("Cochez si les fichiers des étudiants ne sont pas dans des dossier nominatifs");
|
||||
panel.add(chckbxfichiersEtudaints, "flowy,cell 0 2,grow");
|
||||
|
||||
lblFichierCSV = new JLabel("<HTML><B><U>Fichier CSV liste des étudiants</U></B></HTML> :");
|
||||
lblFichierCSV.setFont(new Font("Tahoma", Font.BOLD, 14));
|
||||
panel.add(lblFichierCSV, "flowy,cell 0 4,grow");
|
||||
|
||||
lblFichierSVG = new JLabel("<HTML><B><U>Fichier SVG</U></B> :</HTML>");
|
||||
lblFichierSVG.setFont(new Font("Tahoma", Font.BOLD, 14));
|
||||
panel.add(lblFichierSVG, "flowy,cell 0 6,growx");
|
||||
|
||||
chckCSVNotes = new JCheckBox("Créer un fichier CSV des notes");
|
||||
chckCSVNotes.setToolTipText("Cochez si vous voulez importer les notes dans un fichier CSV.");
|
||||
panel.add(chckCSVNotes, "cell 0 4,grow");
|
||||
lblPath.setHorizontalAlignment(SwingConstants.LEFT);
|
||||
lblPath.setFont(new Font("Tahoma", Font.BOLD, 14));
|
||||
lblPath.setText("<HTML><B><U>Dossier de l'analyse</U></B> : " + commandes.path.substring(commandes.path.lastIndexOf("\\")+1,commandes.path.length()) + "</HTML>");
|
||||
panel.add(lblPath, "cell 0 1,grow");
|
||||
|
||||
chckbxnoFeedback = new JCheckBox("Pas de feedback");
|
||||
chckbxnoFeedback.setToolTipText("Cochez si vous ne voulez pas générer des feedbacks");
|
||||
chckbxnoFeedback.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
panel.add(chckbxnoFeedback, "cell 0 2,grow");
|
||||
|
||||
chckbxZipfeedback = new JCheckBox("Zip les feedbacks");
|
||||
chckbxZipfeedback.setToolTipText("Cochez si vous voulez placer tous les feedbacks dans une archive ZIP");
|
||||
chckbxZipfeedback.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
panel.add(chckbxZipfeedback, "cell 0 2,grow");
|
||||
|
||||
chckbxNoNote = new JCheckBox("Pas de note dans les feedbacks");
|
||||
chckbxNoNote.setToolTipText("Cochez si vous voulez pas faire apparaître les notes dans les feedbacks");
|
||||
chckbxNoNote.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
panel.add(chckbxNoNote, "cell 0 2,grow");
|
||||
|
||||
chckbxVerif = new JCheckBox("Vérification des historiques avant analyse");
|
||||
chckbxVerif.setToolTipText("Cochez si vous voulez vérifier les échanges de fichiers entre les étudiants.");
|
||||
chckbxVerif.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
panel.add(chckbxVerif, "cell 0 2,grow");
|
||||
|
||||
chckbxNewLogo = new JCheckBox("Nouveau logo");
|
||||
chckbxNewLogo.setToolTipText("Cochez si vous voulez remplacer le logo par celui au-dessus.");
|
||||
chckbxNewLogo.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
panel.add(chckbxNewLogo, "cell 0 6");
|
||||
|
||||
chckbxNoLogo = new JCheckBox("Pas de logo");
|
||||
chckbxNoLogo.setToolTipText("Cochez si vous voulez pas de logo dans les feedbacks.");
|
||||
chckbxNoLogo.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
panel.add(chckbxNoLogo, "cell 0 6");
|
||||
|
||||
|
||||
JPanel panel_1 = new JPanel();
|
||||
contentPane.add(panel_1, BorderLayout.CENTER);
|
||||
panel_1.setLayout(new GridLayout(1, 0, 0, 0));
|
||||
|
||||
JScrollPane scrollPane = new JScrollPane();
|
||||
panel_1.add(scrollPane);
|
||||
|
||||
progressBar = new JProgressBar();
|
||||
progressBar.setEnabled(false);
|
||||
scrollPane.setColumnHeaderView(progressBar);
|
||||
|
||||
txtpnmessages = new JEditorPane();
|
||||
txtpnmessages.setFont(new Font("Tahoma", Font.PLAIN, 14));
|
||||
txtpnmessages.setText("Charger un fichier d'analyse.");
|
||||
scrollPane.setViewportView(txtpnmessages);
|
||||
|
||||
this.setExtendedState(MAXIMIZED_BOTH);
|
||||
|
||||
refreshLabel();
|
||||
setVisible(true);
|
||||
}
|
||||
|
||||
|
||||
@ -329,7 +362,8 @@ public class evaluate extends JFrame {
|
||||
*/
|
||||
private void refreshLabel() {
|
||||
if(!commandes.fichierAnalyseValide) {
|
||||
txtpnmessages.setText(MEPTL.verificationFichierAnalyse.messageErreur.toString());
|
||||
if(!MEPTL.verificationFichierAnalyse.messageErreur.toString().isEmpty()) txtpnmessages.setText(MEPTL.verificationFichierAnalyse.messageErreur.toString());
|
||||
|
||||
chckbxfichiersEtudaints.setEnabled(false);
|
||||
chckbxZipfeedback.setEnabled(false);
|
||||
chckbxnoFeedback.setEnabled(false);
|
||||
@ -338,7 +372,6 @@ public class evaluate extends JFrame {
|
||||
chckbxNewLogo.setEnabled(false);
|
||||
chckbxNoLogo.setEnabled(false);
|
||||
chckbxVerif.setEnabled(false);
|
||||
|
||||
}else {
|
||||
chckbxfichiersEtudaints.setEnabled(true);
|
||||
chckbxZipfeedback.setEnabled(true);
|
||||
@ -388,7 +421,7 @@ public class evaluate extends JFrame {
|
||||
text.append("\nFichier d'analyse :");
|
||||
text.append("\n"+commandes.PathFilenameAnalysis+"\n");
|
||||
|
||||
progressBar.setVisible(false);
|
||||
progressBarre.setVisible(false);
|
||||
txtpnmessages.setText(text.toString());
|
||||
|
||||
}
|
||||
@ -425,37 +458,24 @@ public class evaluate extends JFrame {
|
||||
public void actionPerformed( ActionEvent e ) {
|
||||
if(commandes.fichierAnalyseValide) {
|
||||
// JOptionPane.showMessageDialog(null, "Je boss", "Je travaille", JOptionPane.PLAIN_MESSAGE, null);
|
||||
|
||||
// TODO Auto-generated method stub
|
||||
// new msgBox("Je travaille dure.",true,false,"Attendez");
|
||||
|
||||
|
||||
|
||||
|
||||
evaluerLesFichiersEtudiants E = new evaluerLesFichiersEtudiants(chckbxfichiersEtudaints.isSelected(), chckbxZipfeedback.isSelected(),chckbxnoFeedback.isSelected(),
|
||||
chckbxNoNote.isSelected(), chckCSVNotes.isSelected(), chckbxNewLogo.isSelected(), chckbxNoLogo.isSelected(), chckbxVerif.isSelected(),
|
||||
progressBarre, txtpnmessages);
|
||||
|
||||
E.run();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Thread t1 = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
// JOptionPane.showConfirmDialog(null, "Message");
|
||||
msgBox V = new msgBox("Je travaille dure.",true,false,"Attendez");
|
||||
V.setVisible(true);
|
||||
// V.close();
|
||||
}
|
||||
});
|
||||
|
||||
// JOptionPane.showConfirmDialog(null, "Message");
|
||||
|
||||
Thread t2 = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
evaluerLesFichiersEtudiants();
|
||||
} catch (ParserConfigurationException | SAXException | IOException
|
||||
| CloneNotSupportedException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
t1.start();
|
||||
t2.start();
|
||||
|
||||
// try {
|
||||
// t1.join();
|
||||
@ -1037,33 +1057,45 @@ public class evaluate extends JFrame {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Permet l'évaluation des fichiers des étudaints.
|
||||
* @throws ParserConfigurationException
|
||||
* @throws SAXException
|
||||
* @throws IOException
|
||||
* @throws CloneNotSupportedException
|
||||
*/
|
||||
private void evaluerLesFichiersEtudiants() throws ParserConfigurationException, SAXException, IOException, CloneNotSupportedException {
|
||||
|
||||
commandes.analyse=true;
|
||||
progressBar.setVisible(true);
|
||||
|
||||
if(chckbxfichiersEtudaints.isSelected()) commandes.fichierStudentMoodle=true;
|
||||
if(chckbxZipfeedback.isSelected()) commandes.zipfeedback=true;
|
||||
if(chckbxnoFeedback.isSelected()) commandes.sansFeeback=true;
|
||||
if(chckbxNoNote.isSelected()) commandes.noNote=true;
|
||||
if(chckCSVNotes.isSelected()) commandes.ecritNoteCSV=true;
|
||||
if(chckbxNewLogo.isSelected()) commandes.newLogo=true;
|
||||
if(chckbxNoLogo.isSelected()) commandes.noLogo = true;
|
||||
if(chckbxVerif.isSelected()) commandes.verifHisto2 = true;
|
||||
|
||||
meptl.analyseVerifieHistoriqueLesFichiersEtudiantsEtExportNoteCSV();
|
||||
// /**
|
||||
// * Permet l'évaluation des fichiers des étudaints.
|
||||
// * @throws ParserConfigurationException
|
||||
// * @throws SAXException
|
||||
// * @throws IOException
|
||||
// * @throws CloneNotSupportedException
|
||||
// */
|
||||
// private void evaluerLesFichiersEtudiants() throws ParserConfigurationException, SAXException, IOException, CloneNotSupportedException {
|
||||
//
|
||||
// commandes.analyse=true;
|
||||
// progressBarre.setVisible(true);
|
||||
//
|
||||
// if(chckbxfichiersEtudaints.isSelected()) commandes.fichierStudentMoodle=true;
|
||||
// if(chckbxZipfeedback.isSelected()) commandes.zipfeedback=true;
|
||||
// if(chckbxnoFeedback.isSelected()) commandes.sansFeeback=true;
|
||||
// if(chckbxNoNote.isSelected()) commandes.noNote=true;
|
||||
// if(chckCSVNotes.isSelected()) commandes.ecritNoteCSV=true;
|
||||
// if(chckbxNewLogo.isSelected()) commandes.newLogo=true;
|
||||
// if(chckbxNoLogo.isSelected()) commandes.noLogo = true;
|
||||
// if(chckbxVerif.isSelected()) commandes.verifHisto2 = true;
|
||||
//
|
||||
// meptl.analyseVerifieHistoriqueLesFichiersEtudiantsEtExportNoteCSV();
|
||||
//
|
||||
// txtpnmessages.setText(commandes.message.toString());
|
||||
//
|
||||
//
|
||||
// }
|
||||
|
||||
|
||||
|
||||
txtpnmessages.setText(commandes.message.toString());
|
||||
progressBar.setVisible(false);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
254
src/app/evaluerLesFichiersEtudiants.java
Normal file
254
src/app/evaluerLesFichiersEtudiants.java
Normal file
@ -0,0 +1,254 @@
|
||||
package app;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.swing.JEditorPane;
|
||||
import javax.swing.JProgressBar;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import MEPTL.commandes;
|
||||
import MEPTL.feedbacks;
|
||||
import MEPTL.meptl;
|
||||
import MEPTL.verificationFichierAnalyse;
|
||||
import cXML.Run;
|
||||
import cXML.node;
|
||||
import net.lingala.zip4j.exception.ZipException;
|
||||
|
||||
public class evaluerLesFichiersEtudiants implements Runnable{
|
||||
|
||||
private final JProgressBar progressBarre;
|
||||
private final JEditorPane txt;
|
||||
|
||||
|
||||
public evaluerLesFichiersEtudiants(boolean listeEtudiantCSV, boolean zipfeedback, boolean nofeedback, boolean nonote
|
||||
, boolean notedansunCSV, boolean newlogo, boolean nologo, boolean verifhisto2uniquement, JProgressBar progressBar, JEditorPane txt) {
|
||||
|
||||
commandes.analyse=true;
|
||||
|
||||
if(listeEtudiantCSV) commandes.fichierStudentMoodle=true;
|
||||
if(zipfeedback) commandes.zipfeedback=true;
|
||||
if(nofeedback) commandes.sansFeeback=true;
|
||||
if(nonote) commandes.noNote=true;
|
||||
if(notedansunCSV) commandes.ecritNoteCSV=true;
|
||||
if(newlogo) commandes.newLogo=true;
|
||||
if(nologo) commandes.noLogo = true;
|
||||
if(verifhisto2uniquement) commandes.verifHisto2 = true;
|
||||
this.progressBarre=progressBar;
|
||||
this.txt=txt;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public synchronized void run() {
|
||||
|
||||
|
||||
commandes.message = new StringBuilder();
|
||||
commandes.message.append("\n *** LES FICHIERS ANALYSES & EVALUES ***\n");
|
||||
commandes.message.append("\n");
|
||||
commandes.message.append("\n Dossier contenant les fichiers des étudiants.");
|
||||
commandes.message.append("\n " + commandes.path + "\n");
|
||||
commandes.message.append("\n Les fichiers des étudiants ne sont pas dans des dossiers nominatifs ?");
|
||||
commandes.message.append(" " + commandes.fichierStudentMoodle+"\n");
|
||||
|
||||
Run a = null;
|
||||
try {
|
||||
a = new Run(commandes.path,commandes.Profil, commandes.fichierStudentMoodle);
|
||||
} catch (ParserConfigurationException e2) {
|
||||
e2.printStackTrace();
|
||||
} catch (SAXException e2) {
|
||||
e2.printStackTrace();
|
||||
} catch (IOException e2) {
|
||||
e2.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
//**********************************************
|
||||
//** Chargement et verification du CVS fourni **
|
||||
//**********************************************
|
||||
if(commandes.fourniCSV) {
|
||||
commandes.nodeCSV = meptl.chargementFichierCSV();
|
||||
}
|
||||
|
||||
|
||||
//*****************************************
|
||||
//** Nombre de fichier writer à analyser **
|
||||
//*****************************************
|
||||
int nbFichierWriter = a.getLectDossiers().getEC().getListeContentWriter().size();
|
||||
commandes.analyse_Nbre_Fichier_Student = nbFichierWriter;
|
||||
progressBarre.setMaximum(nbFichierWriter);
|
||||
progressBarre.setVisible(true);
|
||||
progressBarre.setStringPainted(true);
|
||||
commandes.message.append("\nNombre de fichier à analyser et évaluer : " + Integer.valueOf(nbFichierWriter) + "\n");
|
||||
|
||||
|
||||
//***************************************
|
||||
//** -verif ou -use file.xml -verifcsv **
|
||||
//***************************************
|
||||
node verif = new node();
|
||||
if(commandes.verifHisto || commandes.verifHisto2) {
|
||||
node verification = new node();
|
||||
verification.setNomElt("verification");
|
||||
verification.getAttributs().put("nombre_fichier", String.valueOf(a.getLectDossiers().getEC().getListeFichierodt().size()));
|
||||
for(int i = 0 ; i < nbFichierWriter ; i++) {
|
||||
node nod = Run.XMLContent(a.getLectDossiers().getEC().getListeContentWriter().get(i));
|
||||
node nodStudent = meptl.LectureFichierEtudiantPourVerification(nod,a,i);
|
||||
verification.getNodes().add(nodStudent);
|
||||
}
|
||||
//a.ecritureNodeEnXML(verification, "VerificationHistorique","",false); //écriture du node de l'étudiant
|
||||
verif = meptl.verificationHistorique(verification, a); // vérification des correspondances entre les fichiers
|
||||
|
||||
//********************************
|
||||
//** Ecriture du node verif.xml **
|
||||
//********************************
|
||||
try {
|
||||
Run.ecritureNodeEnXML(verif, "Verif",commandes.path, "Verif");
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} //écriture du node de vérification
|
||||
commandes.message.append("\n*******************************************************");
|
||||
commandes.message.append("\nEcriture du fichier Verif.xml dans le dossier d'analyse");
|
||||
commandes.message.append("\n*******************************************************");
|
||||
if(!commandes.analyse) {
|
||||
//** bye bye analyseWriter
|
||||
commandes.clotureApplication();
|
||||
}
|
||||
}
|
||||
|
||||
//*********************************************************
|
||||
//** Node contenant l'ensemble des analyses des étudiants **
|
||||
//*********************************************************
|
||||
node ensembleanalyse = new node();
|
||||
ensembleanalyse.setNomElt("analyses");
|
||||
|
||||
//*****************************************************
|
||||
//** Parcours l'ensemble des fichiers des étudiants ***
|
||||
//*****************************************************
|
||||
for(int i = 0 ; i < nbFichierWriter ; i++) {
|
||||
progressBarre.setValue(i);
|
||||
txt.setText(String.valueOf(i) +"/"+ String.valueOf(nbFichierWriter-1));
|
||||
|
||||
//index de l'étudiant
|
||||
commandes.analyse_index_Fichier_Student = i;
|
||||
|
||||
//** Ne prends pas en compte le dossier destination créé par la commande -dest
|
||||
//** Si pas d'analyse alors le nom doit contenir le caractère $ dans le nom du dossier.
|
||||
if(commandes.fourniDossierDestination) if(a.getLectDossiers().getEC().getListeNomDossier().get(i).equals(commandes.pathDestination)) continue;
|
||||
|
||||
//***********************************************************
|
||||
//** Lecture et transformation en node du fichier étudiant **
|
||||
//***********************************************************
|
||||
node nod = Run.XMLContent(a.getLectDossiers().getEC().getListeContentWriter().get(i));
|
||||
node nodStudent=null;
|
||||
try {
|
||||
nodStudent = meptl.LectureFichierEtudiantSousFormeDeNode(nod,a,i);
|
||||
} catch (IOException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
//a.ecritureNodeEnXML(nodStudent, a.getLectDossiers().getEC().getListeNomDossier().get(i),"",false,""); //écriture du node de l'étudiant
|
||||
|
||||
//**********************************
|
||||
//** Analyse des fichiers student **
|
||||
//**********************************
|
||||
if(commandes.analyse||commandes.ecritNodeAnalyse) {
|
||||
|
||||
// Run.ecritureNodeEnXML(nodStudent, "fichier student","",false,""); //écriture du node nodStudent de l'étudiant
|
||||
node ana = meptl.analyse(nodStudent, commandes.sujet, i, a);
|
||||
|
||||
//**************************************************
|
||||
//** Ecriture des fichiers d'analyse des students **
|
||||
//**************************************************
|
||||
if(commandes.ecritNodeAnalyse) {
|
||||
try {
|
||||
Run.ecritureNodeEnXML(ana, "nodana"+ana.retourneFirstEnfantsByName("ouverture").getAttributs().get("dossier"),commandes.path,"");
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
//****************************
|
||||
//** Création des feedbacks **
|
||||
//****************************
|
||||
if(!commandes.sansFeeback&&!commandes.ecritNodeAnalyse) {
|
||||
if(!commandes.zipfeedback) {
|
||||
//feedback(ana, verif); //classique directement dans le répertoire
|
||||
try {
|
||||
feedbacks.feedback(ana,verif, false);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
if(commandes.zipfeedback) { // Dans une archive pour Moodle
|
||||
try {
|
||||
a.AddStreamToZip(feedbacks.feedback(ana, verif, true), meptl.retourneLeNomDuFeedback(a.getLectDossiers().getEC().getListeNomFichierFeedBack().get(i),ana, verif),commandes.analyse_size,commandes.analyse_nameZip);
|
||||
} catch (ZipException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//********************************************************************************
|
||||
//** Ajoute au node ensembleanalyse lorsque -csv file.csv ou -verifcsv file.scv **
|
||||
//********************************************************************************
|
||||
if(commandes.ecritNoteCSV) ensembleanalyse.addNode(ana);
|
||||
|
||||
//*********************************************************
|
||||
//** Message dans la console sur l'analyse de l'étudiant **
|
||||
//*********************************************************
|
||||
commandes.message.append(meptl.messageSystem(ana).toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
txt.setText(commandes.message.toString());
|
||||
|
||||
//*****************************************************
|
||||
//** Exportation au format CSV si -csv ou -verifcsv **
|
||||
//*****************************************************
|
||||
if(commandes.ecritNoteCSV && !commandes.fourniCSV) {
|
||||
if(!commandes.verifHisto2)
|
||||
try {
|
||||
meptl.ecritureCSV(ensembleanalyse);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if(commandes.verifHisto2)
|
||||
try {
|
||||
meptl.ecritureCSV(ensembleanalyse,verif,a,commandes.sujet.retourneFirstEnfantsByName("setting"));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
//***********************************************************************
|
||||
//** Exportation au format CSV si -csv file.csv ou -verifcsv file.csv **
|
||||
//***********************************************************************
|
||||
if(commandes.ecritNoteCSV && commandes.fourniCSV) {
|
||||
try {
|
||||
meptl.ecritureCSV(ensembleanalyse,verif,a,commandes.nodeCSV, commandes.sujet.retourneFirstEnfantsByName("setting"));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
//a.ecritureNodeEnXML(ensembleanalyse, "ensembleAnalyse"); //écriture du node de l'étudiant
|
||||
}
|
||||
|
||||
//**************************************
|
||||
//** Mise à jour du fichier d'analyse **
|
||||
//**************************************
|
||||
if(commandes.MAJFichierAnalyse||commandes.MAJnameAnalysisFile) {
|
||||
try {
|
||||
verificationFichierAnalyse.MiseAJourFichierAnalyse();
|
||||
} catch (CloneNotSupportedException | IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
verificationFichierAnalyse.messagMiseAJourFichierAnalyseAprèsAnalyse();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -37,16 +37,17 @@ public class mainApp extends JFrame implements ActionListener{
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
commandes.console=false;
|
||||
EventQueue.invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
// EventQueue.invokeLater(new Runnable() {
|
||||
// public void run() {
|
||||
try {
|
||||
mainApp window = new mainApp();
|
||||
// window.setVisible(true);
|
||||
window.frmEvalwriter.setVisible(true);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
});
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
/**
|
||||
@ -137,7 +138,7 @@ public class mainApp extends JFrame implements ActionListener{
|
||||
|
||||
if(e.getSource()==actCharge) {
|
||||
if(!commandes.console) System.out.println( "Début chargement du fichier d'analyse." );
|
||||
new evaluate();
|
||||
evaluate f = new evaluate();
|
||||
frmEvalwriter.dispose();
|
||||
}
|
||||
|
||||
|
@ -1,71 +0,0 @@
|
||||
package app;
|
||||
|
||||
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JProgressBar;
|
||||
|
||||
|
||||
public class progress extends JFrame {
|
||||
public progress() {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// create a frame
|
||||
static JFrame f;
|
||||
|
||||
static JProgressBar b;
|
||||
|
||||
public static void main()
|
||||
{
|
||||
|
||||
// create a frame
|
||||
f = new JFrame("ProgressBar demo");
|
||||
|
||||
// create a panel
|
||||
JPanel p = new JPanel();
|
||||
|
||||
// create a progressbar
|
||||
b = new JProgressBar();
|
||||
|
||||
// set initial value
|
||||
b.setValue(0);
|
||||
|
||||
b.setStringPainted(true);
|
||||
|
||||
// add progressbar
|
||||
p.add(b);
|
||||
|
||||
// add panel
|
||||
f.getContentPane().add(p);
|
||||
|
||||
// set the size of the frame
|
||||
f.setSize(500, 500);
|
||||
f.setVisible(true);
|
||||
|
||||
fill();
|
||||
}
|
||||
|
||||
// function to increase progress
|
||||
public static void fill()
|
||||
{
|
||||
int i = 0;
|
||||
try {
|
||||
while (i <= 100) {
|
||||
// fill the menu bar
|
||||
b.setValue(i + 10);
|
||||
|
||||
// delay the thread
|
||||
Thread.sleep(1000);
|
||||
i += 20;
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -12,7 +12,7 @@ import javax.swing.JTextField;
|
||||
|
||||
|
||||
import MEPTL.commandes;
|
||||
|
||||
import MEPTL.meptl;
|
||||
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JComboBox;
|
||||
@ -188,8 +188,8 @@ public class proprieteFichierAnalyse extends JFrame {
|
||||
textFieldNoteFrom.setFont(new Font("Tahoma", Font.PLAIN, 12));
|
||||
contentPane.add(textFieldNoteFrom, "cell 1 5,growx");
|
||||
textFieldNoteFrom.setColumns(10);
|
||||
if(commandes.sujet.getAttributs().get("noteFrom")!=null){
|
||||
textFieldNoteFrom.setText(commandes.sujet.getAttributs().get("noteFrom"));
|
||||
if(commandes.sujet.getAttributs().get("notefrom")!=null){
|
||||
textFieldNoteFrom.setText(commandes.sujet.getAttributs().get("notefrom"));
|
||||
}
|
||||
|
||||
btnAideNoteFrom = new JButton("");
|
||||
@ -341,7 +341,7 @@ public class proprieteFichierAnalyse extends JFrame {
|
||||
commandes.sujet.getAttributs().put("metaSujet", textFieldMetaSujet.getText() );
|
||||
commandes.sujet.getAttributs().put("presenceMetaSujet", comboBoxPresenceMetaSujet.getSelectedItem().toString() );
|
||||
commandes.sujet.getAttributs().put("baremeABC", comboBoxBaremeABC.getSelectedItem().toString() );
|
||||
commandes.sujet.getAttributs().put("noteFrom", textFieldNoteFrom.getText() );
|
||||
commandes.sujet.getAttributs().put("notefrom", textFieldNoteFrom.getText() );
|
||||
commandes.sujet.getAttributs().put("progression", textFieldProgression.getText() );
|
||||
commandes.sujet.getAttributs().put("historiquePresent", comboBoxhistoriquePresent.getSelectedItem().toString() );
|
||||
commandes.sujet.getAttributs().put("creationDate", textFieldDateCreation.getText() );
|
||||
@ -351,6 +351,9 @@ public class proprieteFichierAnalyse extends JFrame {
|
||||
commandes.sujet.getAttributs().put("link_help", textFieldlink_help.getText() );
|
||||
commandes.sujet.getAttributs().put("link_sujet", textFieldlink_sujet.getText() );
|
||||
|
||||
|
||||
meptl.chargementParametresFichierAnalyse();
|
||||
|
||||
dispose();
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user