2022-05-24 18:25:41 +02:00
package app ;
import java.awt.BorderLayout ;
2022-05-25 09:30:49 +02:00
import java.awt.Font ;
import java.awt.event.ActionEvent ;
import java.awt.event.ActionListener ;
2022-05-28 19:13:25 +02:00
import java.awt.event.KeyEvent ;
2022-05-28 21:08:52 +02:00
import java.io.File ;
import java.io.FileInputStream ;
2022-05-25 09:30:49 +02:00
import java.io.IOException ;
2022-05-28 21:08:52 +02:00
import java.io.InputStream ;
import java.io.PrintWriter ;
2022-05-24 18:25:41 +02:00
2022-05-28 19:13:25 +02:00
import javax.swing.AbstractAction ;
import javax.swing.Action ;
2022-05-25 09:30:49 +02:00
import javax.swing.ImageIcon ;
import javax.swing.JButton ;
import javax.swing.JCheckBox ;
import javax.swing.JFileChooser ;
2022-05-24 18:25:41 +02:00
import javax.swing.JFrame ;
2022-05-25 09:30:49 +02:00
import javax.swing.JLabel ;
2022-05-24 18:25:41 +02:00
import javax.swing.JPanel ;
2022-05-25 09:30:49 +02:00
import javax.swing.JTextPane ;
import javax.swing.JToolBar ;
2022-05-28 19:13:25 +02:00
import javax.swing.KeyStroke ;
2022-05-24 18:25:41 +02:00
import javax.swing.border.EmptyBorder ;
2022-05-25 21:22:38 +02:00
import javax.swing.filechooser.FileNameExtensionFilter ;
2022-05-24 18:25:41 +02:00
import javax.xml.parsers.ParserConfigurationException ;
import org.xml.sax.SAXException ;
import MEPTL.commandes ;
2022-05-27 15:02:18 +02:00
import MEPTL.ecritureSujet ;
2022-05-24 18:25:41 +02:00
import MEPTL.meptl ;
2022-05-27 11:40:08 +02:00
import cXML.Run ;
import cXML.node ;
2022-05-25 15:28:58 +02:00
import javax.swing.SwingConstants ;
import java.awt.GridLayout ;
import javax.swing.JScrollPane ;
2022-05-25 18:21:23 +02:00
import javax.swing.JProgressBar ;
2022-05-26 20:10:24 +02:00
import net.miginfocom.swing.MigLayout ;
2022-05-28 19:13:25 +02:00
import java.awt.event.InputEvent ;
import javax.swing.JMenuBar ;
import javax.swing.JMenu ;
import javax.swing.JMenuItem ;
import javax.swing.JOptionPane ;
import java.awt.Color ;
2022-05-28 21:08:52 +02:00
import java.awt.Desktop ;
2022-05-28 19:13:25 +02:00
import javax.swing.JToggleButton ;
import java.awt.FlowLayout ;
2022-05-24 18:25:41 +02:00
public class evaluate extends JFrame {
/ * *
*
* /
2022-05-28 19:13:25 +02:00
@SuppressWarnings ( " unused " )
private final long serialVersionUID = 1L ;
private JToolBar toolBar = new JToolBar ( ) ;
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 JTextPane txtpnmessages = new JTextPane ( ) ;
private JProgressBar progressBar = new JProgressBar ( ) ;
2022-05-25 18:21:23 +02:00
2022-05-24 18:25:41 +02:00
/ * *
* Create the frame .
* /
public evaluate ( ) {
2022-05-26 20:10:24 +02:00
ImageIcon img = new ImageIcon ( getClass ( ) . getResource ( " /evalwriter.png " ) ) ;
this . setIconImage ( img . getImage ( ) ) ;
this . setTitle ( commandes . Titre ) ;
2022-05-24 18:25:41 +02:00
setDefaultCloseOperation ( JFrame . EXIT_ON_CLOSE ) ;
2022-05-28 19:13:25 +02:00
setBounds ( 100 , 100 , 980 , 700 ) ;
2022-05-27 11:40:08 +02:00
2022-05-28 19:13:25 +02:00
JMenuBar menuBar = new JMenuBar ( ) ;
menuBar . setFont ( new Font ( " Segoe UI " , Font . BOLD , 14 ) ) ;
setJMenuBar ( menuBar ) ;
2022-05-27 11:40:08 +02:00
2022-05-28 19:13:25 +02:00
JMenu mnNewMenu = new JMenu ( " Fichier " ) ;
mnNewMenu . setMnemonic ( 'F' ) ;
menuBar . add ( mnNewMenu ) ;
mnNewMenu . add ( actExit ) ;
2022-05-27 11:40:08 +02:00
2022-05-28 19:13:25 +02:00
JMenu mnMenu_Fichier = new JMenu ( " Fichier d'analyse " ) ;
menuBar . add ( mnMenu_Fichier ) ;
mnMenu_Fichier . add ( actOpen ) ;
mnMenu_Fichier . addSeparator ( ) ;
mnMenu_Fichier . add ( actAboutFichierAnalyse ) ;
mnMenu_Fichier . add ( actCodeFichierAnalyse ) ;
mnMenu_Fichier . add ( actModifierFichierAnalyse ) ;
mnMenu_Fichier . addSeparator ( ) ;
mnMenu_Fichier . add ( actNewFichierAnalyse ) ;
JMenu mnMenu_Liste_Etudiant = new JMenu ( " Liste des étudiants " ) ;
menuBar . add ( mnMenu_Liste_Etudiant ) ;
mnMenu_Liste_Etudiant . add ( actChargeListeEtudiantCSV ) ;
mnMenu_Liste_Etudiant . addSeparator ( ) ;
mnMenu_Liste_Etudiant . add ( actAfficheListeEtudiant ) ;
JMenu mnMenu_Logo = new JMenu ( " Logo " ) ;
menuBar . add ( mnMenu_Logo ) ;
mnMenu_Logo . add ( actChargeLogo ) ;
JMenu mnMenu_Evaluation = new JMenu ( " Evaluation des étudiants " ) ;
menuBar . add ( mnMenu_Evaluation ) ;
mnMenu_Evaluation . add ( actSelectFolder ) ;
2022-05-28 21:08:52 +02:00
mnMenu_Evaluation . addSeparator ( ) ;
2022-05-28 19:13:25 +02:00
mnMenu_Evaluation . add ( actEvaluate ) ;
JMenu mnMenu_Informations = new JMenu ( " Informations " ) ;
menuBar . add ( mnMenu_Informations ) ;
2022-05-28 21:08:52 +02:00
mnMenu_Informations . add ( actDocumentation ) ;
mnMenu_Informations . addSeparator ( ) ;
2022-05-28 19:13:25 +02:00
mnMenu_Informations . add ( actAbout ) ;
2022-05-27 11:40:08 +02:00
2022-05-28 19:13:25 +02:00
contentPane = new JPanel ( ) ;
contentPane . setBorder ( new EmptyBorder ( 5 , 5 , 5 , 5 ) ) ;
setContentPane ( contentPane ) ;
contentPane . setLayout ( new BorderLayout ( 0 , 0 ) ) ;
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 " ) ) ) ;
JButton btnInformationAnalyse = toolBar . add ( actCodeFichierAnalyse ) ;
btnInformationAnalyse . setHideActionText ( true ) ;
btnInformationAnalyse . setIcon ( new ImageIcon ( evaluate . class . getResource ( " /resources/fichierAnalyseInfo2.png " ) ) ) ;
JButton btnAfficheCodeFichierAnalyse = toolBar . add ( actAboutFichierAnalyse ) ;
btnAfficheCodeFichierAnalyse . setHideActionText ( true ) ;
btnAfficheCodeFichierAnalyse . setIcon ( new ImageIcon ( evaluate . class . getResource ( " /resources/fichierAnalyseInfo.png " ) ) ) ;
toolBar . add ( btnAfficheCodeFichierAnalyse ) ;
JButton btnModifierFichierAnalyse = toolBar . add ( actModifierFichierAnalyse ) ;
btnModifierFichierAnalyse . setIcon ( new ImageIcon ( evaluate . class . getResource ( " /resources/fichierAnalyseModif.png " ) ) ) ;
btnModifierFichierAnalyse . setHideActionText ( true ) ;
toolBar . add ( btnModifierFichierAnalyse ) ;
toolBar . addSeparator ( ) ;
JButton btnNewFichierAnalyse = toolBar . add ( actNewFichierAnalyse ) ;
btnNewFichierAnalyse . setHideActionText ( true ) ;
btnNewFichierAnalyse . setIcon ( new ImageIcon ( evaluate . class . getResource ( " /resources/fichierODF.png " ) ) ) ;
toolBar . add ( btnNewFichierAnalyse ) ;
toolBar . addSeparator ( ) ;
JButton btnEvaluerLesFichiers = toolBar . add ( actEvaluate ) ;
btnEvaluerLesFichiers . setHideActionText ( true ) ;
JButton btnFichierCSV = toolBar . add ( actChargeListeEtudiantCSV ) ;
btnFichierCSV . setHideActionText ( true ) ;
btnFichierCSV . setIcon ( new ImageIcon ( evaluate . class . getResource ( " /resources/fichierCSV.png " ) ) ) ;
toolBar . add ( btnFichierCSV ) ;
JButton btnInfoListeEtudiant = toolBar . add ( actAfficheListeEtudiant ) ;
btnInfoListeEtudiant . setIcon ( new ImageIcon ( evaluate . class . getResource ( " /resources/fichierCSVInfo.png " ) ) ) ;
btnInfoListeEtudiant . setHideActionText ( true ) ;
toolBar . add ( btnInfoListeEtudiant ) ;
toolBar . addSeparator ( ) ;
JButton btnFichierSVG = toolBar . add ( actChargeLogo ) ;
btnFichierSVG . setHideActionText ( true ) ;
btnFichierSVG . setIcon ( new ImageIcon ( evaluate . class . getResource ( " /resources/fichierSVG.png " ) ) ) ;
toolBar . add ( btnFichierSVG ) ;
toolBar . addSeparator ( ) ;
JButton btnSelectFolder = toolBar . add ( actSelectFolder ) ;
btnSelectFolder . setIcon ( new ImageIcon ( evaluate . class . getResource ( " /resources/open2.png " ) ) ) ;
btnSelectFolder . setHideActionText ( true ) ;
toolBar . add ( btnSelectFolder ) ;
btnEvaluerLesFichiers . setIcon ( new ImageIcon ( evaluate . class . getResource ( " /resources/evaluate.png " ) ) ) ;
toolBar . add ( btnEvaluerLesFichiers ) ;
toolBar . addSeparator ( ) ;
2022-05-28 21:08:52 +02:00
JButton btnNewButton = toolBar . add ( actDocumentation ) ;
btnNewButton . setIcon ( new ImageIcon ( evaluate . class . getResource ( " /resources/documentation.png " ) ) ) ;
btnNewButton . setHideActionText ( true ) ;
toolBar . add ( btnNewButton ) ;
2022-05-28 19:13:25 +02:00
JButton btnAbout = toolBar . add ( actAbout ) ;
btnAbout . setIcon ( new ImageIcon ( evaluate . class . getResource ( " /resources/apropos.png " ) ) ) ;
btnAbout . setHideActionText ( true ) ;
toolBar . add ( btnAbout ) ;
toolBar . addSeparator ( ) ;
toolBar . addSeparator ( ) ;
JButton btnExit = toolBar . add ( actExit ) ;
btnExit . setIcon ( new ImageIcon ( evaluate . class . getResource ( " /resources/exit.png " ) ) ) ;
btnExit . setHideActionText ( true ) ;
toolBar . add ( btnExit ) ;
2022-05-27 11:40:08 +02:00
2022-05-24 18:25:41 +02:00
JPanel panel = new JPanel ( ) ;
contentPane . add ( panel , BorderLayout . WEST ) ;
2022-05-28 19:13:25 +02:00
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 " ) ;
2022-05-25 15:28:58 +02:00
lblFileAnalyse = new JLabel ( " <HTML><B><U>Fichier de l'analyse</U></B> : </HTML> " ) ;
lblFileAnalyse . setHorizontalAlignment ( SwingConstants . LEFT ) ;
2022-05-25 21:22:38 +02:00
lblFileAnalyse . setFont ( new Font ( " Tahoma " , Font . BOLD , 14 ) ) ;
2022-05-28 19:13:25 +02:00
panel . add ( lblFileAnalyse , " flowy,cell 0 1,alignx left,growy " ) ;
2022-05-25 21:22:38 +02:00
2022-05-24 18:25:41 +02:00
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 " ) ;
2022-05-28 19:13:25 +02:00
panel . add ( chckbxfichiersEtudaints , " flowy,cell 0 2,grow " ) ;
2022-05-26 20:10:24 +02:00
lblFichierCSV = new JLabel ( " <HTML><B><U>Fichier CSV liste des étudiants</U></B></HTML> : " ) ;
lblFichierCSV . setFont ( new Font ( " Tahoma " , Font . BOLD , 14 ) ) ;
2022-05-28 19:13:25 +02:00
panel . add ( lblFichierCSV , " flowy,cell 0 4,grow " ) ;
2022-05-26 20:10:24 +02:00
lblFichierSVG = new JLabel ( " <HTML><B><U>Fichier SVG</U></B> :</HTML> " ) ;
lblFichierSVG . setFont ( new Font ( " Tahoma " , Font . BOLD , 14 ) ) ;
2022-05-28 19:13:25 +02:00
panel . add ( lblFichierSVG , " flowy,cell 0 6,growx " ) ;
2022-05-26 20:10:24 +02:00
chckCSVNotes = new JCheckBox ( " Créer un fichier CSV des notes " ) ;
2022-05-27 11:40:08 +02:00
chckCSVNotes . setToolTipText ( " Cochez si vous voulez importer les notes dans un fichier CSV. " ) ;
2022-05-28 19:13:25 +02:00
panel . add ( chckCSVNotes , " cell 0 4,grow " ) ;
2022-05-26 20:10:24 +02:00
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> " ) ;
2022-05-28 19:13:25 +02:00
panel . add ( lblPath , " cell 0 1,grow " ) ;
2022-05-24 18:25:41 +02:00
chckbxnoFeedback = new JCheckBox ( " Pas de feedback " ) ;
2022-05-27 11:40:08 +02:00
chckbxnoFeedback . setToolTipText ( " Cochez si vous ne voulez pas générer des feedbacks " ) ;
2022-05-24 18:25:41 +02:00
chckbxnoFeedback . setFont ( new Font ( " Tahoma " , Font . PLAIN , 12 ) ) ;
2022-05-28 19:13:25 +02:00
panel . add ( chckbxnoFeedback , " cell 0 2,grow " ) ;
2022-05-24 18:25:41 +02:00
chckbxZipfeedback = new JCheckBox ( " Zip les feedbacks " ) ;
2022-05-27 11:40:08 +02:00
chckbxZipfeedback . setToolTipText ( " Cochez si vous voulez placer tous les feedbacks dans une archive ZIP " ) ;
2022-05-24 18:25:41 +02:00
chckbxZipfeedback . setFont ( new Font ( " Tahoma " , Font . PLAIN , 12 ) ) ;
2022-05-28 19:13:25 +02:00
panel . add ( chckbxZipfeedback , " cell 0 2,grow " ) ;
2022-05-24 18:25:41 +02:00
chckbxNoNote = new JCheckBox ( " Pas de note dans les feedbacks " ) ;
2022-05-27 11:40:08 +02:00
chckbxNoNote . setToolTipText ( " Cochez si vous voulez pas faire apparaître les notes dans les feedbacks " ) ;
2022-05-24 18:25:41 +02:00
chckbxNoNote . setFont ( new Font ( " Tahoma " , Font . PLAIN , 12 ) ) ;
2022-05-28 19:13:25 +02:00
panel . add ( chckbxNoNote , " cell 0 2,grow " ) ;
2022-05-25 18:21:23 +02:00
2022-05-27 11:40:08 +02:00
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 ) ) ;
2022-05-28 19:13:25 +02:00
panel . add ( chckbxVerif , " cell 0 2,grow " ) ;
2022-05-27 11:40:08 +02:00
2022-05-26 20:10:24 +02:00
chckbxNewLogo = new JCheckBox ( " Nouveau logo " ) ;
2022-05-27 11:40:08 +02:00
chckbxNewLogo . setToolTipText ( " Cochez si vous voulez remplacer le logo par celui au-dessus. " ) ;
chckbxNewLogo . setFont ( new Font ( " Tahoma " , Font . PLAIN , 12 ) ) ;
2022-05-28 19:13:25 +02:00
panel . add ( chckbxNewLogo , " cell 0 6 " ) ;
2022-05-26 20:10:24 +02:00
chckbxNoLogo = new JCheckBox ( " Pas de logo " ) ;
2022-05-27 11:40:08 +02:00
chckbxNoLogo . setToolTipText ( " Cochez si vous voulez pas de logo dans les feedbacks. " ) ;
chckbxNoLogo . setFont ( new Font ( " Tahoma " , Font . PLAIN , 12 ) ) ;
2022-05-28 19:13:25 +02:00
panel . add ( chckbxNoLogo , " cell 0 6 " ) ;
2022-05-24 18:25:41 +02:00
JPanel panel_1 = new JPanel ( ) ;
contentPane . add ( panel_1 , BorderLayout . CENTER ) ;
2022-05-25 15:28:58 +02:00
panel_1 . setLayout ( new GridLayout ( 1 , 0 , 0 , 0 ) ) ;
2022-05-24 18:25:41 +02:00
2022-05-25 15:28:58 +02:00
JScrollPane scrollPane = new JScrollPane ( ) ;
panel_1 . add ( scrollPane ) ;
2022-05-25 18:21:23 +02:00
progressBar = new JProgressBar ( ) ;
progressBar . setEnabled ( false ) ;
scrollPane . setColumnHeaderView ( progressBar ) ;
2022-05-24 18:25:41 +02:00
2022-05-25 18:21:23 +02:00
txtpnmessages = new JTextPane ( ) ;
2022-05-27 11:40:08 +02:00
txtpnmessages . setFont ( new Font ( " Tahoma " , Font . PLAIN , 14 ) ) ;
2022-05-26 20:10:24 +02:00
txtpnmessages . setText ( " Charger un fichier d'analyse. " ) ;
2022-05-25 18:21:23 +02:00
scrollPane . setViewportView ( txtpnmessages ) ;
2022-05-24 18:25:41 +02:00
2022-05-28 19:13:25 +02:00
2022-05-24 18:25:41 +02:00
refreshLabel ( ) ;
setVisible ( true ) ;
}
2022-05-25 18:21:23 +02:00
/ * *
* Raffraichi les informations
* /
2022-05-24 18:25:41 +02:00
private void refreshLabel ( ) {
if ( ! commandes . fichierAnalyseValide ) {
2022-05-25 18:21:23 +02:00
txtpnmessages . setText ( MEPTL . verificationFichierAnalyse . messageErreur . toString ( ) ) ;
2022-05-24 18:25:41 +02:00
chckbxfichiersEtudaints . setEnabled ( false ) ;
chckbxZipfeedback . setEnabled ( false ) ;
chckbxnoFeedback . setEnabled ( false ) ;
chckbxNoNote . setEnabled ( false ) ;
2022-05-25 18:21:23 +02:00
chckCSVNotes . setEnabled ( false ) ;
2022-05-26 20:10:24 +02:00
chckbxNewLogo . setEnabled ( false ) ;
chckbxNoLogo . setEnabled ( false ) ;
2022-05-27 11:40:08 +02:00
chckbxVerif . setEnabled ( false ) ;
2022-05-26 20:10:24 +02:00
2022-05-25 15:28:58 +02:00
} else {
chckbxfichiersEtudaints . setEnabled ( true ) ;
chckbxZipfeedback . setEnabled ( true ) ;
chckbxnoFeedback . setEnabled ( true ) ;
chckbxNoNote . setEnabled ( true ) ;
2022-05-25 18:21:23 +02:00
chckCSVNotes . setEnabled ( true ) ;
2022-05-26 20:10:24 +02:00
chckbxNewLogo . setEnabled ( true ) ;
chckbxNoLogo . setEnabled ( true ) ;
2022-05-27 11:40:08 +02:00
chckbxVerif . setEnabled ( true ) ;
2022-05-25 15:28:58 +02:00
StringBuilder text = new StringBuilder ( ) ;
2022-05-25 21:22:38 +02:00
text . append ( " \ n*********************************************** " ) ;
2022-05-26 20:10:24 +02:00
text . append ( " \ n INFORMATIONS " ) ;
2022-05-25 21:22:38 +02:00
text . append ( " \ n*********************************************** " ) ;
text . append ( " \ nLe titre de l'exercice est : " + commandes . analyse_titre ) ;
2022-05-25 15:28:58 +02:00
text . append ( " \ n " ) ;
2022-05-25 21:22:38 +02:00
text . append ( " \ nLe sujet (metaSujet) est : " + commandes . analyse_metaSujet ) ;
2022-05-25 15:28:58 +02:00
text . append ( " \ n " ) ;
2022-05-25 21:22:38 +02:00
text . append ( " \ nL'auteur de l'exercice est : " + commandes . analyse_auteur ) ;
2022-05-25 15:28:58 +02:00
text . append ( " \ n " ) ;
2022-05-25 21:22:38 +02:00
2022-05-25 15:28:58 +02:00
if ( commandes . analyse_baremeABC = = true ) {
2022-05-25 21:22:38 +02:00
text . append ( " \ nLa notation est sous la forme d'un barème alphabétique ABCDE. " ) ;
text . append ( " \ n \ tLa progression est de " + String . valueOf ( commandes . analyse_progression ) ) ;
2022-05-25 15:28:58 +02:00
} else {
2022-05-25 21:22:38 +02:00
text . append ( " \ nLa notation est sous la forme d'une note numérique. " ) ;
text . append ( " \ n \ tLe barème est sur " + String . valueOf ( commandes . analyse_notefrom ) ) ;
text . append ( " \ n \ tLa progression est de " + String . valueOf ( commandes . analyse_progression ) ) ;
2022-05-25 15:28:58 +02:00
}
2022-05-26 20:10:24 +02:00
text . append ( " \ n______ " ) ;
text . append ( " \ nLe nom du fichier : " + commandes . analysis_filename ) ;
2022-05-25 21:22:38 +02:00
text . append ( " \ nLe hash de l'évaluation est : " + commandes . hash ) ;
2022-05-26 20:10:24 +02:00
text . append ( " \ n______ " ) ;
text . append ( " \ nHistoriques des modifications present : " + commandes . analyse_historiquePresent ) ;
text . append ( " \ n______ " ) ;
text . append ( " \ nVerification de la presence metaSujet : " + commandes . analyse_presenceMetaSujet ) ;
text . append ( " \ n______ " ) ;
text . append ( " \ nContrôle la date de céation : " + commandes . analyse_controleDateCreation ) ;
text . append ( " \ n______ " ) ;
text . append ( " \ nContrôle l'auteur initial du fichier : " + commandes . analyse_controle_Initial_Creator ) ;
2022-05-27 11:40:08 +02:00
text . append ( " \ n \ n*********************************************** " ) ;
text . append ( " \ n \ n*********************************************** " ) ;
text . append ( " \ nDossier de l'analyse contenant les fichiers des étudiants : " ) ;
text . append ( " \ n " + commandes . path + " \ n " ) ;
text . append ( " \ nFichier d'analyse : " ) ;
text . append ( " \ n " + commandes . PathFilenameAnalysis + " \ n " ) ;
2022-05-25 18:21:23 +02:00
progressBar . setVisible ( false ) ;
txtpnmessages . setText ( text . toString ( ) ) ;
2022-05-25 15:28:58 +02:00
2022-05-24 18:25:41 +02:00
}
lblPath . setText ( " <HTML><B><U>Dossier de l'analyse</U></B> : " + commandes . path . substring ( commandes . path . lastIndexOf ( " \\ " ) + 1 , commandes . path . length ( ) ) + " </HTML> " ) ;
2022-05-26 20:10:24 +02:00
lblFileAnalyse . setText ( " <HTML><B><U>Fichier de l'analyse</U></B> : " + commandes . analysis_filename + " </HTML> " ) ;
lblFichierSVG . setText ( " <HTML><B><U>Fichier SVG</U></B> : " + commandes . nameSVG . substring ( commandes . nameSVG . lastIndexOf ( " \\ " ) + 1 , commandes . nameSVG . length ( ) ) + " </HTML> " ) ;
lblFichierCSV . setText ( " <HTML><B><U>Fichier CSV</U></B> : " + commandes . nameCSV + " </HTML> " ) ;
2022-05-27 11:40:08 +02:00
2022-05-24 18:25:41 +02:00
}
2022-05-28 19:13:25 +02:00
/ * *
* Evaluer et analayser les fichiers des étudiants
* /
private AbstractAction actEvaluate = new AbstractAction ( ) {
private static final long serialVersionUID = 1L ;
{
putValue ( LARGE_ICON_KEY , new ImageIcon ( evaluate . class . getResource ( " /resources/evaluate.png " ) ) ) ;
putValue ( Action . NAME , " Evaluer les fichiers (CTRL+E) " ) ;
putValue ( Action . SMALL_ICON , new ImageIcon ( evaluate . class . getResource ( " /resources/evaluate.png " ) ) ) ;
putValue ( Action . MNEMONIC_KEY , KeyEvent . VK_E ) ;
putValue ( Action . SHORT_DESCRIPTION , " Evaluer les fichiers (CTRL+E) " ) ;
putValue ( Action . ACCELERATOR_KEY , KeyStroke . getKeyStroke ( KeyEvent . VK_E , InputEvent . CTRL_DOWN_MASK ) ) ;
}
@Override
public void actionPerformed ( ActionEvent e ) {
if ( commandes . fichierAnalyseValide ) {
2022-05-26 20:10:24 +02:00
try {
msgBox V = new msgBox ( " Je travaille dure. " , false , false , " Attendez " ) ;
2022-05-28 19:13:25 +02:00
Thread . sleep ( 100 ) ;
2022-05-26 20:10:24 +02:00
evaluerLesFichiersEtudiants ( ) ;
V . close ( ) ;
} catch ( ParserConfigurationException | SAXException | IOException | CloneNotSupportedException e1 ) {
e1 . printStackTrace ( ) ;
} catch ( InterruptedException e1 ) {
e1 . printStackTrace ( ) ;
}
} else {
2022-05-28 19:13:25 +02:00
txtpnmessages . setText ( " *** Veuillez charger un fichier d'analyse *** " ) ;
2022-05-26 20:10:24 +02:00
new msgBox ( " Le fichier d'analyse n'est pas valide. " , true , false , " Avertissement " ) ;
2022-05-25 18:21:23 +02:00
}
2022-05-28 19:13:25 +02:00
}
} ;
2022-05-26 20:10:24 +02:00
2022-05-28 19:13:25 +02:00
/ * *
* Ouvre et affiche un node dans le composant JTree
* /
private AbstractAction actOpen = new AbstractAction ( ) {
2022-05-25 21:22:38 +02:00
2022-05-28 19:13:25 +02:00
private static final long serialVersionUID = 1L ;
{
putValue ( LARGE_ICON_KEY , new ImageIcon ( evaluate . class . getResource ( " /resources/fichierAnalyse.png " ) ) ) ;
putValue ( Action . NAME , " Ouvrir un fichier d'analyse " ) ;
putValue ( Action . SMALL_ICON , new ImageIcon ( create . class . getResource ( " /resources/fichierAnalyse.png " ) ) ) ;
putValue ( Action . MNEMONIC_KEY , KeyEvent . VK_O ) ;
putValue ( Action . SHORT_DESCRIPTION , " Ouvrir un nouveau fichier d'analyse (CTRL+O) " ) ;
putValue ( Action . ACCELERATOR_KEY , KeyStroke . getKeyStroke ( KeyEvent . VK_O , InputEvent . CTRL_DOWN_MASK ) ) ;
}
@Override
public void actionPerformed ( ActionEvent e ) {
new filechooserXML ( ) ;
refreshLabel ( ) ;
System . out . println ( " Open " ) ;
}
} ;
/ * *
* Charge un logo SVG
* /
private AbstractAction actChargeLogo = new AbstractAction ( ) {
private static final long serialVersionUID = 1L ;
{
putValue ( LARGE_ICON_KEY , new ImageIcon ( evaluate . class . getResource ( " /resources/fichierSVG.png " ) ) ) ;
putValue ( Action . NAME , " Charge un logo SVG (CTRL+G) " ) ;
putValue ( Action . SMALL_ICON , new ImageIcon ( evaluate . class . getResource ( " /resources/fichierSVG.png " ) ) ) ;
putValue ( Action . MNEMONIC_KEY , KeyEvent . VK_G ) ;
putValue ( Action . SHORT_DESCRIPTION , " Charge un logo SVG (CTRL+G) " ) ;
putValue ( Action . ACCELERATOR_KEY , KeyStroke . getKeyStroke ( KeyEvent . VK_G , InputEvent . CTRL_DOWN_MASK ) ) ;
}
@Override
public void actionPerformed ( ActionEvent e ) {
JFileChooser chooser = new JFileChooser ( ) ;
2022-05-26 20:10:24 +02:00
chooser . setDialogTitle ( " Choisir un fichier SVG " ) ;
chooser . setCurrentDirectory ( new java . io . File ( commandes . path ) ) ;
chooser . setFileSelectionMode ( JFileChooser . FILES_ONLY ) ;
FileNameExtensionFilter filter = new FileNameExtensionFilter ( " Format SVG " , " svg " ) ;
chooser . setFileFilter ( filter ) ;
chooser . setAcceptAllFileFilterUsed ( true ) ;
if ( chooser . showOpenDialog ( null ) = = JFileChooser . APPROVE_OPTION ) {
System . out . println ( " getCurrentDirectory(): " + chooser . getCurrentDirectory ( ) ) ;
System . out . println ( " getSelectedFile() : " + chooser . getSelectedFile ( ) . getAbsolutePath ( ) ) ;
commandes . nameSVG = chooser . getSelectedFile ( ) . getAbsolutePath ( ) ;
commandes . contenuFichierSVG = meptl . chargementFichierSVG ( ) ;
txtpnmessages . setText ( commandes . contenuFichierSVG ) ;
} else {
commandes . nameSVG = " " ;
commandes . contenuFichierSVG = " " ;
System . out . println ( " No Selection " ) ;
}
2022-05-25 21:22:38 +02:00
refreshLabel ( ) ;
2022-05-28 19:13:25 +02:00
}
} ;
/ * *
* Sélectionne le dossier courant contenant les fichiers des étudiants
* /
private AbstractAction actSelectFolder = new AbstractAction ( ) {
private static final long serialVersionUID = 1L ;
{
putValue ( LARGE_ICON_KEY , new ImageIcon ( evaluate . class . getResource ( " /resources/open2.png " ) ) ) ;
putValue ( Action . NAME , " Dossier des étudiants (CTRL+U) " ) ;
putValue ( Action . SMALL_ICON , new ImageIcon ( evaluate . class . getResource ( " /resources/open2.png " ) ) ) ;
putValue ( Action . MNEMONIC_KEY , KeyEvent . VK_U ) ;
putValue ( Action . SHORT_DESCRIPTION , " Dossier des étudiants (CTRL+U) " ) ;
putValue ( Action . ACCELERATOR_KEY , KeyStroke . getKeyStroke ( KeyEvent . VK_U , InputEvent . CTRL_DOWN_MASK ) ) ;
}
@Override
public void actionPerformed ( ActionEvent e ) {
JFileChooser chooser = new JFileChooser ( ) ;
2022-05-26 20:10:24 +02:00
2022-05-28 19:13:25 +02:00
chooser . setCurrentDirectory ( new java . io . File ( commandes . path ) ) ;
chooser . setDialogTitle ( " Sélectionner le dossier contenant les fichiers des étudiants. " ) ;
chooser . setFileSelectionMode ( JFileChooser . DIRECTORIES_ONLY ) ;
chooser . setAcceptAllFileFilterUsed ( false ) ;
if ( chooser . showOpenDialog ( null ) = = JFileChooser . APPROVE_OPTION ) {
System . out . println ( " getCurrentDirectory(): " + chooser . getCurrentDirectory ( ) ) ;
System . out . println ( " getSelectedFile() : " + chooser . getSelectedFile ( ) . getAbsolutePath ( ) ) ;
commandes . path = chooser . getSelectedFile ( ) . getAbsolutePath ( ) ;
} else {
System . out . println ( " No Selection " ) ;
}
2022-05-26 20:10:24 +02:00
2022-05-28 19:13:25 +02:00
refreshLabel ( ) ;
}
} ;
/ * *
* Gènère un nouveau fichier d ' analyse à partir d ' un fichier ODF
* /
private AbstractAction actNewFichierAnalyse = new AbstractAction ( ) {
private static final long serialVersionUID = 1L ;
{
putValue ( LARGE_ICON_KEY , new ImageIcon ( evaluate . class . getResource ( " /resources/fichierODF.png " ) ) ) ;
putValue ( Action . NAME , " Génère un nouveau fichier d'analyse (CTRL+N) " ) ;
putValue ( Action . SMALL_ICON , new ImageIcon ( evaluate . class . getResource ( " /resources/fichierODF.png " ) ) ) ;
putValue ( Action . MNEMONIC_KEY , KeyEvent . VK_N ) ;
putValue ( Action . SHORT_DESCRIPTION , " Génère un nouveau fichier d'analyse (CTRL+N) " ) ;
putValue ( Action . ACCELERATOR_KEY , KeyStroke . getKeyStroke ( KeyEvent . VK_N , InputEvent . CTRL_DOWN_MASK ) ) ;
}
@Override
public void actionPerformed ( ActionEvent e ) {
JFileChooser chooser = new JFileChooser ( ) ;
2022-05-27 15:02:18 +02:00
chooser . setDialogTitle ( " Choisir un fichier ODF " ) ;
chooser . setCurrentDirectory ( new java . io . File ( commandes . path ) ) ;
chooser . setFileSelectionMode ( JFileChooser . FILES_ONLY ) ;
FileNameExtensionFilter filter = new FileNameExtensionFilter ( " Format ODF " , " odt " ) ;
chooser . setFileFilter ( filter ) ;
chooser . setAcceptAllFileFilterUsed ( true ) ;
if ( chooser . showOpenDialog ( null ) = = JFileChooser . APPROVE_OPTION ) {
System . out . println ( " getCurrentDirectory(): " + chooser . getCurrentDirectory ( ) ) ;
System . out . println ( " getSelectedFile() : " + chooser . getSelectedFile ( ) . getAbsolutePath ( ) ) ;
commandes . path = chooser . getCurrentDirectory ( ) . getAbsolutePath ( ) ;
commandes . PathFilenameAnalysis = chooser . getSelectedFile ( ) . getAbsolutePath ( ) ;
commandes . nameSujet = chooser . getSelectedFile ( ) . getName ( ) ;
Run b = null ;
try {
b = new Run ( commandes . PathFilenameAnalysis ) ;
node nodSujet = Run . XMLContent ( b . getLectDossiers ( ) . getEC ( ) . getListeContentWriter ( ) . get ( 0 ) ) ;
nodSujet = meptl . LectureFichierEtudiantSousFormeDeNode ( nodSujet , b , 0 ) ;
nodSujet . getAttributs ( ) . put ( " analysis_filename " , " sujet.xml " ) ;
nodSujet = ecritureSujet . nodePourEcritureSujet ( nodSujet , b , 0 ) ;
Run . ecritureNodeEnXML ( nodSujet , " sujet " , commandes . path , " Sujet " ) ;
txtpnmessages . setText ( Run . ecritureNode ( nodSujet , 0 ) . toString ( )
+ " \ n \ n "
+ " \ n************************* "
+ " \ nLe fichier sujet.xml a été généré dans le dossier : "
+ " \ n " + commandes . path
+ " \ n************************* " ) ;
commandes . fichierAnalyseValide = true ;
} catch ( ParserConfigurationException | SAXException | IOException | CloneNotSupportedException e1 ) {
e1 . printStackTrace ( ) ;
}
} else {
commandes . nameSujet = " " ;
commandes . PathFilenameAnalysis = " " ;
System . out . println ( " No Selection " ) ;
commandes . fichierAnalyseValide = false ;
refreshLabel ( ) ;
}
2022-05-25 21:22:38 +02:00
2022-05-27 15:02:18 +02:00
commandes . ecritCode = true ;
2022-05-28 19:13:25 +02:00
}
} ;
/ * *
* Information sur le fichier d ' analyse
* /
private AbstractAction actAboutFichierAnalyse = new AbstractAction ( ) {
private static final long serialVersionUID = 1L ;
{
putValue ( Action . NAME , " Informations du fichier d'analyse (CTRL+I) " ) ;
putValue ( Action . SMALL_ICON , new ImageIcon ( evaluate . class . getResource ( " /resources/fichierAnalyseInfo2.png " ) ) ) ;
putValue ( Action . MNEMONIC_KEY , KeyEvent . VK_K ) ;
putValue ( Action . SHORT_DESCRIPTION , " Informations du fichier d'analyse (CTRL+I) " ) ;
putValue ( Action . ACCELERATOR_KEY , KeyStroke . getKeyStroke ( KeyEvent . VK_K , InputEvent . CTRL_DOWN_MASK ) ) ;
}
@Override public void actionPerformed ( ActionEvent e ) {
if ( commandes . fichierAnalyseValide ) {
refreshLabel ( ) ;
} else {
txtpnmessages . setText ( " *** Veuillez charger un fichier d'analyse *** " ) ;
}
System . out . println ( " Refresh Labels and texts " ) ;
}
} ;
/ * *
* Quitter l ' application
* /
private AbstractAction actExit = new AbstractAction ( ) {
private static final long serialVersionUID = 1L ;
{
putValue ( Action . NAME , " Quitter (CTRL+Q) " ) ;
putValue ( Action . SMALL_ICON , new ImageIcon ( getClass ( ) . getResource ( " /exit.png " ) ) ) ;
putValue ( Action . MNEMONIC_KEY , KeyEvent . VK_Q ) ;
putValue ( Action . SHORT_DESCRIPTION , " Quitter (CRTL+Q) " ) ;
putValue ( Action . ACCELERATOR_KEY , KeyStroke . getKeyStroke ( KeyEvent . VK_Q , KeyEvent . CTRL_DOWN_MASK ) ) ;
}
@Override public void actionPerformed ( ActionEvent e ) {
int a = JOptionPane . showConfirmDialog ( null , " Voulez-vous quitter l'application? " , " Sélectionner un choix " , JOptionPane . YES_NO_OPTION ) ;
if ( a = = JOptionPane . YES_NO_OPTION ) {
System . out . println ( " Le choix : " + a ) ;
System . out . println ( " Exit " + e . getSource ( ) . toString ( ) ) ;
dispose ( ) ;
}
}
} ;
/ * *
* Affiche la fenêtre d ' information sur analyseWriter
* /
private AbstractAction actAbout = new AbstractAction ( ) {
private static final long serialVersionUID = 1L ;
{
putValue ( Action . NAME , " Informations (CTRL+I) " ) ;
putValue ( Action . SMALL_ICON , new ImageIcon ( create . class . getResource ( " /resources/apropos.png " ) ) ) ;
putValue ( Action . MNEMONIC_KEY , KeyEvent . VK_I ) ;
putValue ( Action . SHORT_DESCRIPTION , " Informations (CTRL+I) " ) ;
putValue ( Action . ACCELERATOR_KEY , KeyStroke . getKeyStroke ( KeyEvent . VK_I , InputEvent . CTRL_DOWN_MASK ) ) ;
}
@Override public void actionPerformed ( ActionEvent e ) {
new about ( ) ;
System . out . println ( " About " ) ;
}
} ;
/ * *
* Affiche le code XMl du fichier d ' analyse
* /
private AbstractAction actCodeFichierAnalyse = new AbstractAction ( ) {
private static final long serialVersionUID = 1L ;
{
putValue ( Action . NAME , " Affiche le code XML (CTRL+J) " ) ;
putValue ( Action . SMALL_ICON , new ImageIcon ( evaluate . class . getResource ( " /resources/fichierAnalyseInfo.png " ) ) ) ;
putValue ( Action . MNEMONIC_KEY , KeyEvent . VK_J ) ;
putValue ( Action . SHORT_DESCRIPTION , " Affiche le code XML (CTRL+J) " ) ;
putValue ( Action . ACCELERATOR_KEY , KeyStroke . getKeyStroke ( KeyEvent . VK_J , InputEvent . CTRL_DOWN_MASK ) ) ;
}
@Override public void actionPerformed ( ActionEvent e ) {
2022-05-27 15:02:18 +02:00
if ( commandes . fichierAnalyseValide ) {
txtpnmessages . setText ( Run . ecritureNode ( commandes . sujet , 0 ) . toString ( ) ) ;
} else {
txtpnmessages . setText ( " *** Veuillez charger un fichier d'analyse *** " ) ;
}
2022-05-28 19:13:25 +02:00
System . out . println ( " Affiche le code XML du fichier d'analyse. " ) ;
}
} ;
/ * *
* Affiche le code XMl du fichier d ' analyse
* /
private AbstractAction actModifierFichierAnalyse = new AbstractAction ( ) {
2022-05-25 18:21:23 +02:00
2022-05-28 19:13:25 +02:00
private static final long serialVersionUID = 1L ;
{
putValue ( Action . NAME , " Modifier le fichier d'analyse (CTRL+M) " ) ;
putValue ( Action . SMALL_ICON , new ImageIcon ( evaluate . class . getResource ( " /resources/fichierAnalyseModif.png " ) ) ) ;
putValue ( Action . MNEMONIC_KEY , KeyEvent . VK_M ) ;
putValue ( Action . SHORT_DESCRIPTION , " Modifier le fichier d'analyse (CTRL+M) " ) ;
putValue ( Action . ACCELERATOR_KEY , KeyStroke . getKeyStroke ( KeyEvent . VK_M , InputEvent . CTRL_DOWN_MASK ) ) ;
}
@Override public void actionPerformed ( ActionEvent e ) {
if ( commandes . fichierAnalyseValide ) {
new create ( ) ;
dispose ( ) ;
} else {
txtpnmessages . setText ( " *** Veuillez sélectionner un fichier d'analyse pour le modifier *** " ) ;
}
System . out . println ( " Affiche la fenêtre pour la modification. " ) ;
}
} ;
2022-05-28 21:08:52 +02:00
/ * *
* Affiche la documentation
* /
private AbstractAction actDocumentation = new AbstractAction ( ) {
private static final long serialVersionUID = 1L ;
{
putValue ( Action . NAME , " Documentation (CTRL+D) " ) ;
putValue ( Action . SMALL_ICON , new ImageIcon ( evaluate . class . getResource ( " /resources/documentation.png " ) ) ) ;
putValue ( Action . MNEMONIC_KEY , KeyEvent . VK_D ) ;
putValue ( Action . SHORT_DESCRIPTION , " Documentation (CTRL+D) " ) ;
putValue ( Action . ACCELERATOR_KEY , KeyStroke . getKeyStroke ( KeyEvent . VK_D , InputEvent . CTRL_DOWN_MASK ) ) ;
}
@Override public void actionPerformed ( ActionEvent e ) {
Desktop d = Desktop . getDesktop ( ) ;
try {
d . open ( new File ( evaluate . class . getResource ( " /resources/documentation.pdf " ) . getPath ( ) ) ) ;
} catch ( IOException e1 ) {
// TODO Auto-generated catch block
e1 . printStackTrace ( ) ;
}
System . out . println ( " Affiche la documentation. " ) ;
}
} ;
2022-05-28 19:13:25 +02:00
/ * *
* Charge la liste des étudiants sous la frome d ' un fichier XML .
* /
private AbstractAction actChargeListeEtudiantCSV = new AbstractAction ( ) {
private static final long serialVersionUID = 1L ;
{
putValue ( Action . NAME , " Charge la liste des étudiants (CTRL+L) " ) ;
putValue ( Action . SMALL_ICON , new ImageIcon ( evaluate . class . getResource ( " /resources/fichierCSV.png " ) ) ) ;
putValue ( Action . MNEMONIC_KEY , KeyEvent . VK_L ) ;
putValue ( Action . SHORT_DESCRIPTION , " Charge la liste des étudiants (CTRL+L) " ) ;
putValue ( Action . ACCELERATOR_KEY , KeyStroke . getKeyStroke ( KeyEvent . VK_L , InputEvent . CTRL_DOWN_MASK ) ) ;
}
@Override public void actionPerformed ( ActionEvent e ) {
JFileChooser chooser = new JFileChooser ( ) ;
chooser . setDialogTitle ( " Choisir un fichier CSV " ) ;
chooser . setCurrentDirectory ( new java . io . File ( commandes . path ) ) ;
chooser . setFileSelectionMode ( JFileChooser . FILES_ONLY ) ;
FileNameExtensionFilter filter = new FileNameExtensionFilter ( " Format CSV " , " csv " ) ;
chooser . setFileFilter ( filter ) ;
chooser . setAcceptAllFileFilterUsed ( true ) ;
if ( chooser . showOpenDialog ( null ) = = JFileChooser . APPROVE_OPTION ) {
System . out . println ( " getCurrentDirectory(): " + chooser . getCurrentDirectory ( ) ) ;
System . out . println ( " getSelectedFile() : " + chooser . getSelectedFile ( ) . getAbsolutePath ( ) ) ;
commandes . nameCSV = chooser . getSelectedFile ( ) . getAbsolutePath ( ) ;
commandes . fourniCSV = true ;
commandes . nodeCSV = meptl . chargementFichierCSV ( ) ;
txtpnmessages . setText ( Run . ecritureNode ( commandes . nodeCSV , 0 ) . toString ( ) ) ;
} else {
commandes . nameCSV = " " ;
commandes . fourniCSV = false ;
System . out . println ( " No Selection " ) ;
commandes . nodeCSV = new node ( ) ;
refreshLabel ( ) ;
}
System . out . println ( " Charge la liste des étudiants. " ) ;
}
} ;
/ * *
* Affiche le code XMl du fichier d ' analyse
* /
private AbstractAction actAfficheListeEtudiant = new AbstractAction ( ) {
private static final long serialVersionUID = 1L ;
{
putValue ( Action . NAME , " Affiche la liste des étudiants (ALT+L) " ) ;
putValue ( Action . SMALL_ICON , new ImageIcon ( evaluate . class . getResource ( " /resources/fichierCSVInfo.png " ) ) ) ;
putValue ( Action . MNEMONIC_KEY , KeyEvent . VK_L ) ;
putValue ( Action . SHORT_DESCRIPTION , " Affiche la liste des étudiants (ALT+L) " ) ;
putValue ( Action . ACCELERATOR_KEY , KeyStroke . getKeyStroke ( KeyEvent . VK_L , InputEvent . ALT_DOWN_MASK ) ) ;
}
@Override public void actionPerformed ( ActionEvent e ) {
if ( commandes . fourniCSV ) {
txtpnmessages . setText ( Run . ecritureNode ( commandes . nodeCSV , 0 ) . toString ( ) ) ;
} else {
txtpnmessages . setText ( " *** Veuillez sélectionner un fichier CSV contenant la liste des étudiants. *** " ) ;
}
System . out . println ( " Affiche la liste des étudaints déjà en mémoire. " ) ;
}
} ;
2022-05-26 20:10:24 +02:00
/ * *
* Permet l ' évaluation des fichiers des étudaints .
* @throws ParserConfigurationException
* @throws SAXException
* @throws IOException
* @throws CloneNotSupportedException
* /
2022-05-25 18:21:23 +02:00
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 ;
2022-05-26 20:10:24 +02:00
if ( chckbxNewLogo . isSelected ( ) ) commandes . newLogo = true ;
if ( chckbxNoLogo . isSelected ( ) ) commandes . noLogo = true ;
2022-05-27 11:40:08 +02:00
if ( chckbxVerif . isSelected ( ) ) commandes . verifHisto2 = true ;
2022-05-25 18:21:23 +02:00
meptl . analyseVerifieHistoriqueLesFichiersEtudiantsEtExportNoteCSV ( ) ;
2022-05-26 20:10:24 +02:00
2022-05-25 18:21:23 +02:00
txtpnmessages . setText ( commandes . message . toString ( ) ) ;
progressBar . setVisible ( false ) ;
2022-05-26 20:10:24 +02:00
2022-05-24 18:25:41 +02:00
}
2022-05-25 09:30:49 +02:00
2022-05-24 18:25:41 +02:00
}