Modification de la fenêtre propriété du fichier d'analyse.
This commit is contained in:
pablo rodriguez 2023-02-14 09:20:58 +01:00
parent 7e623f1ce2
commit 9d8e3d5fd7
69 changed files with 239 additions and 247 deletions

Binary file not shown.

2
bin/.gitignore vendored
View File

@ -6,3 +6,5 @@
/sousmenuRecherche/
/sousmenuRepresentation/
/MEPTL/
/action/
/evaluer/

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

@ -3,7 +3,6 @@ package MEPTL;
import java.text.DecimalFormat;
import java.util.ArrayList;
import cXML.node;
import evaluer.evaluation;

View File

@ -86,7 +86,7 @@ public class VerificationHistorique {
xmlid = HitoriqueDuFichier.get(j).getAttributs().get("xml:id");
if(!typeModification.equals("text:UnknownChange")&&!typeModification.equals("text:format-change")) {
if(!typeModification.equals("text:UnknownChange")) { //&&!typeModification.equals("text:format-change")
if(nodDate!=null) {
dcdate1 = nodDate.getContenu().get(0);

View File

@ -423,7 +423,6 @@ public class feedbacks {
if(copiercoller) cheminFeedBack = cheminFeedBack + "- copier-coller";
if(pasAssezDeModification) cheminFeedBack = cheminFeedBack + "- pas assez de modification";
if(dateModificationAnterieur) cheminFeedBack = cheminFeedBack + "- date modification antérieur au controle";
cheminFeedBack = cheminFeedBack + ".html";
}
if(!commandes.noNote&&baremeABC) {
if(!plagiat)cheminFeedBack = cheminFeedBack + "-" + nodana.retourneFirstEnfantsByName("bodyetnotation").getAttributs().get("noteABC") + ".html";
@ -431,15 +430,13 @@ public class feedbacks {
if(plagiat) cheminFeedBack = cheminFeedBack + "- plagiat";
if(pasAssezDeModification) cheminFeedBack = cheminFeedBack + "- pas assez de modification";
if(dateModificationAnterieur) cheminFeedBack = cheminFeedBack + "- date modification antérieur au controle";
cheminFeedBack = cheminFeedBack + ".html";
}
if(commandes.noNote) {
cheminFeedBack = cheminFeedBack + ".html";
}
// Chemin vers le dossier de destination
Path outputFilePath = Paths.get(commandes.path + "/" + cheminFeedBack);
if(commandes.fourniDossierDestination) outputFilePath = Paths.get(commandes.path + "/" + commandes.pathDestination+ "/" + cheminFeedBack);
Path outputFilePath = Paths.get(commandes.path + "/" + cheminFeedBack + ".html");
if(commandes.fourniDossierDestination) outputFilePath = Paths.get(commandes.path + "/" + commandes.pathDestination+ "/" + cheminFeedBack + ".html");
@ -447,15 +444,15 @@ public class feedbacks {
BufferedWriter fichier1 = Files.newBufferedWriter(outputFilePath, StandardCharsets.UTF_8);
//ajoute le chemin vers le feedback dans le node d'analyse
nodana.retourneFirstEnfantsByName("ouverture").getAttributs().put("feedback", commandes.path + "/" + cheminFeedBack);
nodana.retourneFirstEnfantsByName("ouverture").getAttributs().put("feedback", commandes.path + "/" + cheminFeedBack+ ".html");
fichier1.append(fichier.toString());
fichier1.close();
//affichage dans la console
if(!commandes.fourniDossierDestination) System.out.println("\n\t The feedback file has been written.\n\t " + commandes.path + "\\" + cheminFeedBack);
if(commandes.fourniDossierDestination) System.out.println("\n\t The feedback file has been written.\n\t " + commandes.path + "\\" + commandes.pathDestination + "\\" + cheminFeedBack);
if(!commandes.fourniDossierDestination) System.out.println("\n\t The feedback file has been written.\n\t " + commandes.path + "\\" + cheminFeedBack + ".html");
if(commandes.fourniDossierDestination) System.out.println("\n\t The feedback file has been written.\n\t " + commandes.path + "\\" + commandes.pathDestination + "\\" + cheminFeedBack + ".html");
}

View File

@ -6,7 +6,6 @@ import java.awt.datatransfer.StringSelection;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.ImageIcon;

View File

@ -8,6 +8,7 @@ import javax.swing.ImageIcon;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.TreePath;
import cXML.node;
import fenetres.create;

View File

@ -1,6 +1,7 @@
package action;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.tree.DefaultMutableTreeNode;

View File

@ -1,9 +1,9 @@
package evaluer;
import cXML.node;
import MEPTL.meptl;
import MEPTL.rechercherUnNodeStudent;
import cXML.Run;
import cXML.node;
public class analyseLesNodesEnfants {

View File

@ -9,7 +9,6 @@ import javax.swing.JTree;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeCellRenderer;
import cXML.node;
public class MyCellRenderer extends DefaultTreeCellRenderer{

View File

@ -2,7 +2,6 @@ package fenetres;
import java.awt.Component;
import javax.swing.AbstractCellEditor;
import javax.swing.JTree;
import javax.swing.tree.TreeCellEditor;

View File

@ -1,16 +1,17 @@
package fenetres;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import MEPTL.commandes;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
public final class about extends JFrame {

View File

@ -1,10 +1,29 @@
package fenetres;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.util.ArrayList;
import java.util.Enumeration;
import javax.swing.FocusManager;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextField;
import javax.swing.border.EmptyBorder;
import MEPTL.commandes;
@ -13,29 +32,7 @@ import list.listeAttributWriterPasEvaluableAvecCodeEvaluateur;
import list.listeAttributWriterValeurPasModifiable;
import list.listeAttributsAnalyseWriter;
import list.listeNodeFormatageDirectDeWriter;
import java.awt.FlowLayout;
import java.util.ArrayList;
import java.util.Enumeration;
import net.miginfocom.swing.MigLayout;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import java.awt.Font;
import javax.swing.JScrollPane;
import javax.swing.JTextField;
import javax.swing.FocusManager;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.ActionEvent;
import javax.swing.ImageIcon;
import java.awt.GridLayout;
import java.awt.Color;
public class attributs extends JFrame {

View File

@ -1,6 +1,7 @@
package fenetres;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.GridLayout;
@ -70,7 +71,6 @@ import action.actUpNode;
import cXML.Run;
import cXML.node;
import menucontextuel.CreatePopupMenu;
import java.awt.Color;

View File

@ -1,6 +1,7 @@
package fenetres;
import java.awt.Font;
import java.awt.SystemColor;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@ -11,7 +12,6 @@ import javax.swing.JLabel;
import javax.swing.SwingConstants;
import MEPTL.commandes;
import java.awt.SystemColor;
public class mainApp extends JFrame implements ActionListener{

View File

@ -2,17 +2,17 @@ package fenetres;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.event.ActionEvent;
public class msgBox extends JFrame {

View File

@ -1,28 +1,26 @@
package fenetres;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.DefaultComboBoxModel;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import java.awt.Font;
import javax.swing.JPanel;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import MEPTL.commandes;
import MEPTL.meptl;
import calcul.calculNotesProgression;
import calcul.formatDateWriter;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.DefaultComboBoxModel;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import net.miginfocom.swing.MigLayout;
import javax.swing.ImageIcon;
import javax.swing.JTextArea;
public final class proprieteFichierAnalyse extends JFrame {
@ -88,8 +86,7 @@ public final class proprieteFichierAnalyse extends JFrame {
setTitle("Propriétés du fichier d'analyse - " + commandes.version + " " + commandes.branch);
setIconImage(img.getImage());
setBounds(0, 0, 682, 780);
setResizable(false);
setBounds(0, 0, 1200, 583);
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
int screenWidth = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getWidth();
@ -97,9 +94,8 @@ public final class proprieteFichierAnalyse extends JFrame {
setLocation(( (screenWidth) - getWidth()) / 2, (screenHeight - getHeight()) / 2);
contentPane = new JPanel();
contentPane.setBorder(null);
setContentPane(contentPane);
contentPane.setLayout(new MigLayout("", "[260px][260px,grow][10,grow 20]", "[18px][18px][18px][30px][18px][18px][18px][30px][45px][18px][18px][18px][18px][18px][18px][18px][40px][18px:24px:48px,grow]"));
contentPane.setLayout(new MigLayout("", "[260px][260px,grow][10,grow 20][10px:10px:10px][260px][260px][10,grow 20]", "[18px][18px][18px][30px][18px][18px][18px][30px][45px][18px][18px][60px:60px:120px]"));
JLabel lblNewLabel = new JLabel("Titre de l'exercice");
lblNewLabel.setFont(new Font("Tahoma", Font.PLAIN, 12));
@ -122,6 +118,29 @@ public final class proprieteFichierAnalyse extends JFrame {
btnAideTitre.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
contentPane.add(btnAideTitre, "cell 2 0");
JLabel lblNewLabel_6 = new JLabel("<html>Le suivi des modifications doit être activé dans les fichiers des étudiants.</html>");
lblNewLabel_6.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(lblNewLabel_6, "cell 4 0,alignx left");
comboBoxhistoriquePresent = new JComboBox<String>();
comboBoxhistoriquePresent.setModel(new DefaultComboBoxModel<String>(new String[] {"false", "true"}));
comboBoxhistoriquePresent.setFont(new Font("Tahoma", Font.BOLD, 12));
contentPane.add(comboBoxhistoriquePresent, "cell 5 0,growx,aligny top");
btnAideHistoriquePresent = new JButton("");
btnAideHistoriquePresent.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JOptionPane.showInternalMessageDialog(null, "<html>Si VRAI alors le suivi des modifications doit être activé dans les fichiers des étudiants.<br>"
+ "Si ce n'est pas le cas alors l'étudiant aura une note nulle.<br><br>"
+ "L'étudiant doit utiliser le fichier remis par l'enseignant.<br>"
+ "L'enseignant aura activé le suivi des modifications et protégé le suivi par un mot de passe.<br><br>"
+ "Cette technique peut être utilisée durant les contrôles.<br>"
+ "Elle permettra de rechercher les fichiers échangés entre les étudiants en comparant les modifications.</html>");
}
});
btnAideHistoriquePresent.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
contentPane.add(btnAideHistoriquePresent, "cell 6 0");
JLabel lblNewLabel_1 = new JLabel("Auteur");
lblNewLabel_1.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(lblNewLabel_1, "cell 0 1,alignx left,aligny center");
@ -143,6 +162,26 @@ public final class proprieteFichierAnalyse extends JFrame {
btnAideAuteur.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
contentPane.add(btnAideAuteur, "cell 2 1");
JLabel lblNewLabel_7 = new JLabel("<html>La date de création du fichier transmis aux étudiants.</html>");
lblNewLabel_7.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(lblNewLabel_7, "cell 4 1,alignx left");
textFieldDateCreation = new JTextField();
textFieldDateCreation.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(textFieldDateCreation, "cell 5 1,growx");
textFieldDateCreation.setColumns(10);
btnAideDateCreation = new JButton("");
btnAideDateCreation.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JOptionPane.showInternalMessageDialog(null, "<html>Ne modifier pas cette date.<br>"
+ "Sauf, si vous avez remis aux étudiants un nouveau fichier.</html>");
}
});
btnAideDateCreation.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
contentPane.add(btnAideDateCreation, "cell 6 1");
JLabel lblNewLabel_2 = new JLabel("metaSujet");
lblNewLabel_2.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(lblNewLabel_2, "cell 0 2,alignx left,aligny center");
@ -167,6 +206,28 @@ public final class proprieteFichierAnalyse extends JFrame {
btnAideMetaSujet.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
contentPane.add(btnAideMetaSujet, "cell 2 2");
lblNewLabel_8 = new JLabel("<html>La date de création dans les fichers des étudiants doit être le même que celui du fichier fourni.</html>");
lblNewLabel_8.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(lblNewLabel_8, "cell 4 2,alignx trailing");
comboBoxcontroleDateCreation = new JComboBox<String>();
comboBoxcontroleDateCreation.setModel(new DefaultComboBoxModel<String>(new String[] {"false", "true"}));
comboBoxcontroleDateCreation.setFont(new Font("Tahoma", Font.BOLD, 12));
contentPane.add(comboBoxcontroleDateCreation, "cell 5 2,growx,aligny top");
btnAideControleDateCreation = new JButton("");
btnAideControleDateCreation.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JOptionPane.showInternalMessageDialog(null, "<html>Si VRAI alors la date de création du fichier de l'étudiant doit être identique à celle-ci.<br>"
+ "Si ce n'est pas le cas alors l'étudiant aura une note nulle.<br><br>"
+ "L'étudiant doit utiliser le fichier remis par l'enseignant.<br><br>"
+ "Cette technique peut être utilisée durant les contrôles.<br>"
+ "Elle permettra de rechercher les fichiers réïnitialisés pour effacer l'historique.</html>");
}
});
btnAideControleDateCreation.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
contentPane.add(btnAideControleDateCreation, "cell 6 2,aligny top");
JLabel lblNewLabel_3 = new JLabel("<HTML><p>Propriété personnalisé Sujet obligatoire<br>dans les fichiers des étudiants.</p></HTML>" );
lblNewLabel_3.setFont(new Font("Tahoma", Font.PLAIN, 12));
@ -193,6 +254,25 @@ public final class proprieteFichierAnalyse extends JFrame {
btnAidePresenceMetaSujet.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
contentPane.add(btnAidePresenceMetaSujet, "cell 2 3");
lblNewLabel_9 = new JLabel("Auteur du fichier transmis aux étudiants.");
lblNewLabel_9.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(lblNewLabel_9, "cell 4 3,alignx left");
textFieldInitial_Creator = new JTextField();
textFieldInitial_Creator.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(textFieldInitial_Creator, "cell 5 3,growx");
textFieldInitial_Creator.setColumns(10);
btnAideInitial_Creator = new JButton("");
btnAideInitial_Creator.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JOptionPane.showInternalMessageDialog(null, "<html>Le premier auteur du fichier (créateur).<br>"
+ "Ne modifier pas, sauf si vous avez fourni un nouveau fichier aux étudiants avec un autre créateur.<html>");
}
});
btnAideInitial_Creator.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
contentPane.add(btnAideInitial_Creator, "cell 6 3");
JLabel lblNewLabel_4 = new JLabel("Barème alphabétique ABCDE");
lblNewLabel_4.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(lblNewLabel_4, "cell 0 4,alignx left");
@ -214,6 +294,26 @@ public final class proprieteFichierAnalyse extends JFrame {
});
btnAideBaremeABC.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
contentPane.add(btnAideBaremeABC, "flowx,cell 2 4");
lblNewLabel_10 = new JLabel("<html>L'auteur des fichiers des étudiants doit être celui du fichier transmis.</html>");
lblNewLabel_10.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(lblNewLabel_10, "cell 4 4,alignx trailing");
comboBoxcontrole_Initial_Creator = new JComboBox<String>();
comboBoxcontrole_Initial_Creator.setModel(new DefaultComboBoxModel<String>(new String[] {"false", "true"}));
comboBoxcontrole_Initial_Creator.setFont(new Font("Tahoma", Font.BOLD, 12));
contentPane.add(comboBoxcontrole_Initial_Creator, "cell 5 4,growx,aligny top");
btnAidecontrole_Initial_Creator = new JButton("");
btnAidecontrole_Initial_Creator.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JOptionPane.showInternalMessageDialog(null, "<html>Si vrai alors le créateur du fichier des étudiants doit correspondre avec cet auteur.<br>"
+ "Si ce n'est pas le cas, l'étudiant aura une note nulle.<br><br>"
+ "Cette technique peut être utilisée pour les contrôles.<html>");
}
});
btnAidecontrole_Initial_Creator.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
contentPane.add(btnAidecontrole_Initial_Creator, "cell 6 4");
@ -223,7 +323,7 @@ public final class proprieteFichierAnalyse extends JFrame {
textFieldNoteFrom = new JTextField();
textFieldNoteFrom.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(textFieldNoteFrom, "cell 1 5,growx");
contentPane.add(textFieldNoteFrom, "cell 1 5,growx,aligny center");
textFieldNoteFrom.setColumns(10);
if(commandes.sujet.getAttributs().get("notefrom")!=null){
textFieldNoteFrom.setText(commandes.sujet.getAttributs().get("notefrom"));
@ -242,7 +342,24 @@ public final class proprieteFichierAnalyse extends JFrame {
btnAideNoteFrom.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
contentPane.add(btnAideNoteFrom, "flowx,cell 2 5");
JLabel lblNewLabel_5 = new JLabel("Coef. de progression");
lblNewLabel_14 = new JLabel("<html>La date et heure du début du contrôle.<br>C'est la date de modification qui doit être la plus ancienne dans le fichier des étudiants.</html>");
lblNewLabel_14.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(lblNewLabel_14, "cell 4 5,alignx left");
textField_dateModificationMini = new JTextField();
textField_dateModificationMini.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(textField_dateModificationMini, "cell 5 5,growx,aligny center");
textField_dateModificationMini.setColumns(10);
btnAidecontrole_dateModificationMini = new JButton("");
btnAidecontrole_dateModificationMini.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JOptionPane.showInternalMessageDialog(null, "<html>Si vous indiquez une date, alors toutes les dates"
+ "<br>de modification dans un fichier doivent être postérieures à la date indiquée.<html>");
}
});
btnAidecontrole_dateModificationMini.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
contentPane.add(btnAidecontrole_dateModificationMini, "cell 6 5");
JLabel lblNewLabel_5 = new JLabel("Coefficient de progression");
lblNewLabel_5.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(lblNewLabel_5, "cell 0 6,alignx left");
@ -252,6 +369,9 @@ public final class proprieteFichierAnalyse extends JFrame {
if(commandes.sujet.getAttributs().get("progression")!=null){
textFieldProgression.setText(commandes.sujet.getAttributs().get("progression"));
}
if(commandes.sujet.getAttributs().get("historiquePresent")!=null){
comboBoxhistoriquePresent.setSelectedItem(commandes.sujet.getAttributs().get("historiquePresent").toLowerCase());
}
btnAideProgression = new JButton("");
btnAideProgression.addActionListener(new ActionListener() {
@ -265,170 +385,51 @@ public final class proprieteFichierAnalyse extends JFrame {
});
btnAideProgression.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
contentPane.add(btnAideProgression, "cell 2 6");
JLabel lblNewLabel_6 = new JLabel("<html>Le suivi des modifications activé dans les <br>fichiers des étudiants.</html>");
lblNewLabel_6.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(lblNewLabel_6, "cell 0 7,alignx left");
comboBoxhistoriquePresent = new JComboBox<String>();
comboBoxhistoriquePresent.setModel(new DefaultComboBoxModel<String>(new String[] {"false", "true"}));
comboBoxhistoriquePresent.setFont(new Font("Tahoma", Font.BOLD, 12));
contentPane.add(comboBoxhistoriquePresent, "cell 1 7,growx,aligny top");
if(commandes.sujet.getAttributs().get("historiquePresent")!=null){
comboBoxhistoriquePresent.setSelectedItem(commandes.sujet.getAttributs().get("historiquePresent").toLowerCase());
}
btnAideHistoriquePresent = new JButton("");
btnAideHistoriquePresent.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JOptionPane.showInternalMessageDialog(null, "<html>Si VRAI alors le suivi des modifications doit être activé dans les fichiers des étudiants.<br>"
+ "Si ce n'est pas le cas alors l'étudiant aura une note nulle.<br><br>"
+ "L'étudiant doit utiliser le fichier remis par l'enseignant.<br>"
+ "L'enseignant aura activé le suivi des modifications et protégé le suivi par un mot de passe.<br><br>"
+ "Cette technique peut être utilisée durant les contrôles.<br>"
+ "Elle permettra de rechercher les fichiers échangés entre les étudiants en comparant les modifications.</html>");
}
});
btnAideHistoriquePresent.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
contentPane.add(btnAideHistoriquePresent, "cell 2 7");
JLabel lblNewLabel_7 = new JLabel("<html>Date de création du fichier transmis <br>aux étudiants.</html>");
lblNewLabel_7.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(lblNewLabel_7, "cell 0 8,alignx left");
textFieldDateCreation = new JTextField();
textFieldDateCreation.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(textFieldDateCreation, "cell 1 8,growx");
textFieldDateCreation.setColumns(10);
if(commandes.sujet.getAttributs().get("creationDate")!=null){
textFieldDateCreation.setText(commandes.sujet.getAttributs().get("creationDate"));
}
btnAideDateCreation = new JButton("");
btnAideDateCreation.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JOptionPane.showInternalMessageDialog(null, "<html>Ne modifier pas cette date.<br>"
+ "Sauf, si vous avez remis aux étudiants un nouveau fichier.</html>");
}
});
btnAideDateCreation.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
contentPane.add(btnAideDateCreation, "cell 2 8");
lblNewLabel_8 = new JLabel("<html>La date de création dans les fichers des étudiants doit être le même que celui du fichier fourni.</html>");
lblNewLabel_8.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(lblNewLabel_8, "cell 0 9,alignx trailing");
comboBoxcontroleDateCreation = new JComboBox<String>();
comboBoxcontroleDateCreation.setModel(new DefaultComboBoxModel<String>(new String[] {"false", "true"}));
comboBoxcontroleDateCreation.setFont(new Font("Tahoma", Font.BOLD, 12));
contentPane.add(comboBoxcontroleDateCreation, "cell 1 9,growx,aligny top");
if(commandes.sujet.getAttributs().get("controleDateCreation")!=null){
comboBoxcontroleDateCreation.setSelectedItem(commandes.sujet.getAttributs().get("controleDateCreation").toLowerCase());
}
btnAideControleDateCreation = new JButton("");
btnAideControleDateCreation.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JOptionPane.showInternalMessageDialog(null, "<html>Si VRAI alors la date de création du fichier de l'étudiant doit être identique à celle-ci.<br>"
+ "Si ce n'est pas le cas alors l'étudiant aura une note nulle.<br><br>"
+ "L'étudiant doit utiliser le fichier remis par l'enseignant.<br><br>"
+ "Cette technique peut être utilisée durant les contrôles.<br>"
+ "Elle permettra de rechercher les fichiers réïnitialisés pour effacer l'historique.</html>");
}
});
btnAideControleDateCreation.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
contentPane.add(btnAideControleDateCreation, "cell 2 9,aligny top");
lblNewLabel_9 = new JLabel("Auteur du fichier fourni aux étudiants.");
lblNewLabel_9.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(lblNewLabel_9, "cell 0 10,alignx left");
textFieldInitial_Creator = new JTextField();
textFieldInitial_Creator.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(textFieldInitial_Creator, "cell 1 10,growx");
textFieldInitial_Creator.setColumns(10);
if(commandes.sujet.getAttributs().get("Initial_Creator")!=null){
textFieldInitial_Creator.setText(commandes.sujet.getAttributs().get("Initial_Creator"));
}
btnAideInitial_Creator = new JButton("");
btnAideInitial_Creator.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JOptionPane.showInternalMessageDialog(null, "<html>Le premier auteur du fichier (créateur).<br>"
+ "Ne modifier pas, sauf si vous avez fourni un nouveau fichier aux étudiants avec un autre créateur.<html>");
}
});
btnAideInitial_Creator.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
contentPane.add(btnAideInitial_Creator, "cell 2 10");
lblNewLabel_10 = new JLabel("<html>L'auteur des fichiers des étudiants doit être celui du fichier fourni.</html>");
lblNewLabel_10.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(lblNewLabel_10, "cell 0 11,alignx trailing");
comboBoxcontrole_Initial_Creator = new JComboBox<String>();
comboBoxcontrole_Initial_Creator.setModel(new DefaultComboBoxModel<String>(new String[] {"false", "true"}));
comboBoxcontrole_Initial_Creator.setFont(new Font("Tahoma", Font.BOLD, 12));
contentPane.add(comboBoxcontrole_Initial_Creator, "cell 1 11,growx,aligny top");
if(commandes.sujet.getAttributs().get("controle_Initial_Creator")!=null){
comboBoxcontrole_Initial_Creator.setSelectedItem(commandes.sujet.getAttributs().get("controle_Initial_Creator").toLowerCase());
}
btnAidecontrole_Initial_Creator = new JButton("");
btnAidecontrole_Initial_Creator.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JOptionPane.showInternalMessageDialog(null, "<html>Si vrai alors le créateur du fichier des étudiants doit correspondre avec cet auteur.<br>"
+ "Si ce n'est pas le cas, l'étudiant aura une note nulle.<br><br>"
+ "Cette technique peut être utilisée pour les contrôles.<html>");
}
});
btnAidecontrole_Initial_Creator.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
contentPane.add(btnAidecontrole_Initial_Creator, "cell 2 11");
lblNewLabel_14 = new JLabel("<html>La date et heure du début du contrôle.<br>C'est la date qui doit être<br>la plus ancienne dans le fichier des étudiant.</html>");
lblNewLabel_14.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(lblNewLabel_14, "cell 0 12,alignx left");
textField_dateModificationMini = new JTextField();
textField_dateModificationMini.setFont(new Font("Tahoma", Font.PLAIN, 12));
if(commandes.sujet.getAttributs().get("modificationDateMini")!=null){
textField_dateModificationMini.setText(commandes.sujet.getAttributs().get("modificationDateMini"));
}
contentPane.add(textField_dateModificationMini, "cell 1 12,growx");
textField_dateModificationMini.setColumns(10);
btnAidecontrole_dateModificationMini = new JButton("");
btnAidecontrole_dateModificationMini.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JOptionPane.showInternalMessageDialog(null, "<html>Si vous indiquez une date, alors toutes les dates"
+ "<br>de modification dans un fichier doivent être postérieures à la date indiquée.<html>");
}
});
btnAidecontrole_dateModificationMini.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
contentPane.add(btnAidecontrole_dateModificationMini, "cell 2 12");
lblNewLabel_15 = new JLabel("<html>La date des modifications doit être<br>postérieures à la date du début du contrôle.</html>");
lblNewLabel_15 = new JLabel("<html>La date des modifications doit être postérieures à la date du début du contrôle.</html>");
lblNewLabel_15.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(lblNewLabel_15, "cell 0 13,alignx left");
comboBoxcontrole_modificationDateMini = new JComboBox<String>();
comboBoxcontrole_modificationDateMini.setModel(new DefaultComboBoxModel<String>(new String[] {"false", "true"}));
comboBoxcontrole_modificationDateMini.setFont(new Font("Tahoma", Font.BOLD, 12));
contentPane.add(comboBoxcontrole_modificationDateMini, "cell 1 13,growx");
contentPane.add(lblNewLabel_15, "cell 4 6,alignx left");
if(commandes.sujet.getAttributs().get("controleDateModificationMini")!=null){
comboBoxcontrole_modificationDateMini.setSelectedItem(commandes.sujet.getAttributs().get("controleDateModificationMini").toLowerCase());
}
comboBoxcontrole_modificationDateMini = new JComboBox<String>();
comboBoxcontrole_modificationDateMini.setModel(new DefaultComboBoxModel<String>(new String[] {"false", "true"}));
comboBoxcontrole_modificationDateMini.setFont(new Font("Tahoma", Font.BOLD, 12));
contentPane.add(comboBoxcontrole_modificationDateMini, "cell 5 6,growx");
btnAidecontrole_dateModificationMini = new JButton("");
btnAidecontrole_dateModificationMini.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JOptionPane.showInternalMessageDialog(null, "<html>Si vrai alors les dates"
+ "<br>de modification dans un fichier doivent être postérieures à la date indiquée.<html>");
JOptionPane.showInternalMessageDialog(null, "<html>Si vrai, alors les dates"
+ "des modifications dans un fichier<br>doivent être postérieures à la date indiquée.<html>");
}
});
btnAidecontrole_dateModificationMini.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
contentPane.add(btnAidecontrole_dateModificationMini, "cell 2 13");
contentPane.add(btnAidecontrole_dateModificationMini, "cell 6 6");
lblNewLabel_11 = new JLabel("Lien URL de l'aide");
lblNewLabel_11.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(lblNewLabel_11, "cell 0 14,alignx left");
contentPane.add(lblNewLabel_11, "cell 0 8,alignx left");
textFieldlink_help = new JTextField();
textFieldlink_help.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(textFieldlink_help, "cell 1 8,growx");
textFieldlink_help.setColumns(10);
btnAidecontrole_URLAide = new JButton("");
btnAidecontrole_URLAide.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
@ -437,18 +438,7 @@ public final class proprieteFichierAnalyse extends JFrame {
}
});
btnAidecontrole_URLAide.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
contentPane.add(btnAidecontrole_URLAide, "cell 2 14");
// URL Aide
lblNewLabel_12 = new JLabel("Lien URL du sujet");
lblNewLabel_12.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(lblNewLabel_12, "cell 0 15,alignx left");
textFieldlink_help = new JTextField();
textFieldlink_help.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(textFieldlink_help, "cell 1 14,growx");
textFieldlink_help.setColumns(10);
contentPane.add(btnAidecontrole_URLAide, "cell 2 8");
if(commandes.sujet.getAttributs().get("link_help")!=null){
textFieldlink_help.setText(commandes.sujet.getAttributs().get("link_help"));
}
@ -465,11 +455,18 @@ public final class proprieteFichierAnalyse extends JFrame {
});
btnVoirBaremeABC.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/voirmini.png")));
contentPane.add(btnVoirBaremeABC, "cell 2 4");
// URL Aide
lblNewLabel_12 = new JLabel("Lien URL du sujet");
lblNewLabel_12.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(lblNewLabel_12, "cell 0 9,alignx left");
// URL Sujet Ligne 13
textFieldlink_sujet = new JTextField();
contentPane.add(textFieldlink_sujet, "cell 1 15,growx");
contentPane.add(textFieldlink_sujet, "cell 1 9,growx");
textFieldlink_sujet.setColumns(10);
if(commandes.sujet.getAttributs().get("link_sujet")!=null){
textFieldlink_sujet.setText(commandes.sujet.getAttributs().get("link_sujet"));
@ -482,30 +479,22 @@ public final class proprieteFichierAnalyse extends JFrame {
}
});
btnAidecontrole_URLSujet.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
contentPane.add(btnAidecontrole_URLSujet, "cell 2 15");
contentPane.add(btnAidecontrole_URLSujet, "cell 2 9");
// Commentaire exercice Ligne 14
lblNewLabel_13 = new JLabel("Commentaire sur l'exercice");
lblNewLabel_13.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(lblNewLabel_13, "cell 0 16,alignx left");
contentPane.add(lblNewLabel_13, "cell 0 11,alignx left");
textAreaCommentaire = new JTextArea();
textAreaCommentaire.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(textAreaCommentaire, "cell 1 16,grow");
contentPane.add(textAreaCommentaire, "cell 1 11,grow");
if(!commandes.sujet.getContenu().isEmpty()) {
if(commandes.sujet.getContenu().get(0)!=null) {
String textCommentaire = commandes.sujet.getContenu().get(0).replace("-NewLine-", "\n");
textAreaCommentaire.setText(textCommentaire);
}
}
btnAidecontrole_Commentaire = new JButton("");
btnAidecontrole_Commentaire.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JOptionPane.showInternalMessageDialog(null, "<html>Si vous tapez un commentaire, "
+ "il apparaîtra dans les feedbacks des étudiants.<html>");
}
});
btnAidecontrole_Commentaire.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
contentPane.add(btnAidecontrole_Commentaire, "cell 2 16");
// Bouton de calcul de la base numérique
@ -520,12 +509,21 @@ public final class proprieteFichierAnalyse extends JFrame {
});
btnVoirBaremeNumeric.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/voirmini.png")));
contentPane.add(btnVoirBaremeNumeric, "cell 2 5");
btnAidecontrole_Commentaire = new JButton("");
btnAidecontrole_Commentaire.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JOptionPane.showInternalMessageDialog(null, "<html>Si vous tapez un commentaire, "
+ "il apparaîtra dans les feedbacks des étudiants.<html>");
}
});
btnAidecontrole_Commentaire.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
contentPane.add(btnAidecontrole_Commentaire, "cell 2 11");
// Bouton pour validation
JButton btnNewButton = new JButton("Valider");
btnNewButton.setFont(new Font("Tahoma", Font.BOLD, 14));
contentPane.add(btnNewButton, "cell 1 17,grow");
contentPane.add(btnNewButton, "cell 5 11,grow");
btnNewButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {

View File

@ -1,26 +1,9 @@
package fenetres;
import java.awt.BorderLayout;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.filechooser.FileNameExtensionFilter;
import MEPTL.commandes;
import cXML.Run;
import cXML.node;
import javax.swing.JTabbedPane;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.SwingConstants;
import java.awt.Color;
import java.awt.Font;
import javax.swing.JComboBox;
import javax.swing.JFileChooser;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JTextField;
import javax.swing.JButton;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.BufferedReader;
import java.io.File;
@ -29,9 +12,25 @@ import java.io.IOException;
import java.io.InputStreamReader;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.awt.event.ActionEvent;
import java.awt.GridLayout;
import java.awt.Color;
import javax.swing.DefaultComboBoxModel;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
import javax.swing.border.EmptyBorder;
import javax.swing.filechooser.FileNameExtensionFilter;
import MEPTL.commandes;
import cXML.Run;
import cXML.node;
public final class setting extends JFrame {