();
while(key.hasMoreElements()) {
@@ -201,11 +205,6 @@ public class afficheText extends JEditorPane {
if(Lesattributsdunode.get(i).equals("evalPiedPageActive") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) {
sb.append(""+imagePiedPageActive + " " + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"");
}
- if(Lesattributsdunode.get(i).equals("pointOuMax")) {
- sb.append(""+imageOU+ " " + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"");
- }
-
-
// sb.append("" + Lesattributsdunode.get(i) + "=\"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"");
}
diff --git a/src/fenetres/create_act/actNewFichierAnalyse.java b/src/fenetres/create_act/actNewFichierAnalyse.java
index 589da0f..64950e9 100644
--- a/src/fenetres/create_act/actNewFichierAnalyse.java
+++ b/src/fenetres/create_act/actNewFichierAnalyse.java
@@ -1,5 +1,8 @@
package fenetres.create_act;
+import java.awt.Component;
+import java.awt.HeadlessException;
+import java.awt.Image;
import java.awt.event.ActionEvent;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
@@ -8,6 +11,7 @@ import java.io.IOException;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.ImageIcon;
+import javax.swing.JDialog;
import javax.swing.JFileChooser;
import javax.swing.KeyStroke;
import javax.swing.filechooser.FileNameExtensionFilter;
@@ -38,7 +42,18 @@ public class actNewFichierAnalyse extends AbstractAction{
}
@Override
public void actionPerformed(ActionEvent e) {
- JFileChooser chooser = new JFileChooser();
+ JFileChooser chooser = new JFileChooser(){
+ private static final long serialVersionUID = 1L;
+ @Override
+ protected JDialog createDialog( Component parent ) throws HeadlessException {
+ JDialog dialog = super.createDialog( parent );
+ Image img = new ImageIcon(getClass().getResource("/evalwriter.png") ).getImage();
+ dialog.setIconImage(img);
+ return dialog;
+ }
+ };
+
+
chooser.setDialogTitle("Choisir un fichier ODF");
chooser.setCurrentDirectory(new java.io.File(commandes.path));
@@ -64,11 +79,11 @@ public class actNewFichierAnalyse extends AbstractAction{
//Supprime l'historique des modifications
commandes.sujet.supprimeTousLesNodesEnfantWithThisName("text:tracked-changes");
- commandes.sujet.supprimeTousLesNodesEnfantWithThisName("text:deletion");
- commandes.sujet.supprimeTousLesNodesEnfantWithThisName("text:change-start");
- commandes.sujet.supprimeTousLesNodesEnfantWithThisName("text:change-end");
- commandes.sujet.supprimeTousLesNodesEnfantWithThisName("text:tracked-changes");
- commandes.sujet.supprimeTousLesNodesEnfantWithThisName("text:change");
+// commandes.sujet.supprimeTousLesNodesEnfantWithThisName("text:deletion");
+// commandes.sujet.supprimeTousLesNodesEnfantWithThisName("text:change-start");
+// commandes.sujet.supprimeTousLesNodesEnfantWithThisName("text:change-end");
+// commandes.sujet.supprimeTousLesNodesEnfantWithThisName("text:tracked-changes");
+// commandes.sujet.supprimeTousLesNodesEnfantWithThisName("text:change");
commandes.sujet = meptl.LectureFichierEtudiantSousFormeDeNode(commandes.sujet,b,0);
diff --git a/src/fenetres/create_act/actOu.java b/src/fenetres/create_act/actOu.java
index afa6adb..7967048 100644
--- a/src/fenetres/create_act/actOu.java
+++ b/src/fenetres/create_act/actOu.java
@@ -31,7 +31,6 @@ public class actOu extends AbstractAction{
nodeOu.setNomElt("OU");
nodeOu.setLevel(nod.getLevel()+1);
nodeOu.setParent(nod);
- nodeOu.getAttributs().put("pointOuMax","1");
nodeOu.getAttributs().put("evaluer","true");
nodeOu.setClose(true);
nod.getNodes().add(nodeOu);
diff --git a/src/fenetres/evaluate.java b/src/fenetres/evaluate.java
index c56244b..2174fc4 100644
--- a/src/fenetres/evaluate.java
+++ b/src/fenetres/evaluate.java
@@ -1,10 +1,14 @@
package fenetres;
import java.awt.BorderLayout;
+import java.awt.Color;
import java.awt.Font;
import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.io.IOException;
+
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.ImageIcon;
@@ -13,29 +17,28 @@ import javax.swing.JCheckBox;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JLabel;
+import javax.swing.JMenu;
+import javax.swing.JMenuBar;
+import javax.swing.JOptionPane;
import javax.swing.JPanel;
+import javax.swing.JScrollPane;
import javax.swing.JToolBar;
import javax.swing.KeyStroke;
+import javax.swing.SwingConstants;
import javax.swing.border.EmptyBorder;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
import javax.swing.filechooser.FileNameExtensionFilter;
import javax.xml.parsers.ParserConfigurationException;
+
import org.xml.sax.SAXException;
+
import MEPTL.commandes;
import MEPTL.meptl;
import cXML.Run;
import cXML.node;
import fenetres.create_act.actAbout;
-import javax.swing.SwingConstants;
-import javax.swing.JScrollPane;
import net.miginfocom.swing.MigLayout;
-import java.awt.event.InputEvent;
-import javax.swing.JMenuBar;
-import javax.swing.JMenu;
-import javax.swing.JOptionPane;
-import java.awt.Color;
-import javax.swing.event.ChangeListener;
-import javax.swing.event.ChangeEvent;
-import java.awt.event.ActionListener;
public class evaluate extends JFrame {
@@ -936,9 +939,12 @@ public class evaluate extends JFrame {
}
@Override public void actionPerformed( ActionEvent e ) {
-
+
+
+
};
+
};
/**
diff --git a/src/fenetres/filechooserXML.java b/src/fenetres/filechooserXML.java
index 4ab9925..fed79ee 100644
--- a/src/fenetres/filechooserXML.java
+++ b/src/fenetres/filechooserXML.java
@@ -1,6 +1,9 @@
package fenetres;
+import java.awt.Component;
import java.awt.Dimension;
+import java.awt.HeadlessException;
+import java.awt.Image;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
@@ -8,6 +11,8 @@ import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
+import javax.swing.ImageIcon;
+import javax.swing.JDialog;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.filechooser.FileNameExtensionFilter;
@@ -26,6 +31,7 @@ public class filechooserXML extends JFileChooser {
public filechooserXML() {
+
setDialogTitle("Choisir un fichier d'analyse");
FileNameExtensionFilter filter = new FileNameExtensionFilter("Fichier d'analyse .XML", "xml");
@@ -54,6 +60,13 @@ public class filechooserXML extends JFileChooser {
}
}
+ @Override
+ protected JDialog createDialog( Component parent ) throws HeadlessException {
+ JDialog dialog = super.createDialog( parent );
+ Image img = new ImageIcon(getClass().getResource("/evalwriter.png") ).getImage();
+ dialog.setIconImage(img);
+ return dialog;
+ }
/**
diff --git a/src/fenetres/proprieteFichierAnalyse.java b/src/fenetres/proprieteFichierAnalyse.java
index 4f0546f..2a4b3e2 100644
--- a/src/fenetres/proprieteFichierAnalyse.java
+++ b/src/fenetres/proprieteFichierAnalyse.java
@@ -21,7 +21,6 @@ import javax.swing.DefaultComboBoxModel;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import net.miginfocom.swing.MigLayout;
-import java.awt.Toolkit;
import javax.swing.ImageIcon;
import javax.swing.JTextArea;
@@ -64,6 +63,9 @@ public final class proprieteFichierAnalyse extends JFrame {
private JButton btnAideControleDateCreation;
private JButton btnAideInitial_Creator;
private JButton btnAidecontrole_Initial_Creator;
+ private JButton btnAidecontrole_URLAide;
+ private JButton btnAidecontrole_URLSujet;
+ private JButton btnAidecontrole_Commentaire;
private JButton btnVoirBaremeABC;
private JButton btnVoirBaremeNumeric;
private static proprieteFichierAnalyse instance;
@@ -75,10 +77,14 @@ public final class proprieteFichierAnalyse extends JFrame {
* Create the frame.
*/
public proprieteFichierAnalyse() {
- setIconImage(Toolkit.getDefaultToolkit().getImage(proprieteFichierAnalyse.class.getResource("/resources/evalwriter.ico")));
- setBounds(0, 0, 630, 700);
+
+ ImageIcon img = new ImageIcon(getClass().getResource("/evalwriter.png") );
+ setTitle("Propriétés du fichier d'analyse - " + commandes.version + " " + commandes.branch);
+ setIconImage(img.getImage());
+
+ setBounds(0, 0, 630, 715);
setResizable(false);
- setTitle("Propriété du fichier d'analyse");
+
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
int screenWidth = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getWidth();
int screenHeight = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getHeight();
@@ -135,6 +141,7 @@ public final class proprieteFichierAnalyse extends JFrame {
lblNewLabel_2.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(lblNewLabel_2, "cell 0 2,alignx left,aligny center");
+ // Meta
textFieldMetaSujet = new JTextField();
textFieldMetaSujet.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(textFieldMetaSujet, "cell 1 2,grow");
@@ -142,7 +149,6 @@ public final class proprieteFichierAnalyse extends JFrame {
if(commandes.sujet.getAttributs().get("metaSujet")!=null){
textFieldMetaSujet.setText(commandes.sujet.getAttributs().get("metaSujet"));
}
-
btnAideMetaSujet = new JButton("");
btnAideMetaSujet.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
@@ -155,6 +161,7 @@ public final class proprieteFichierAnalyse extends JFrame {
btnAideMetaSujet.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
contentPane.add(btnAideMetaSujet, "cell 2 2");
+
JLabel lblNewLabel_3 = new JLabel("Propriété personnalisé Sujet obligatoire
dans les fichiers des étudiants.
" );
lblNewLabel_3.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(lblNewLabel_3, "cell 0 3,alignx left,aligny center");
@@ -375,7 +382,22 @@ public final class proprieteFichierAnalyse extends JFrame {
lblNewLabel_11 = new JLabel("Lien URL de l'aide");
lblNewLabel_11.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(lblNewLabel_11, "cell 0 12,alignx left");
+ btnAidecontrole_URLAide = new JButton("");
+ btnAidecontrole_URLAide.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ JOptionPane.showInternalMessageDialog(null, "Si vous indiquez une URL alors elle apparaîtra dans"
+ + "le feedback des étudiants.");
+ }
+ });
+ btnAidecontrole_URLAide.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
+ contentPane.add(btnAidecontrole_URLAide, "cell 2 12");
+
+ // 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 13,alignx left");
+
textFieldlink_help = new JTextField();
textFieldlink_help.setFont(new Font("Tahoma", Font.PLAIN, 12));
contentPane.add(textFieldlink_help, "cell 1 12,growx");
@@ -384,16 +406,7 @@ public final class proprieteFichierAnalyse extends JFrame {
textFieldlink_help.setText(commandes.sujet.getAttributs().get("link_help"));
}
- lblNewLabel_12 = new JLabel("Lien URL du sujet");
- lblNewLabel_12.setFont(new Font("Tahoma", Font.PLAIN, 12));
- contentPane.add(lblNewLabel_12, "cell 0 13,alignx left");
-
- textFieldlink_sujet = new JTextField();
- contentPane.add(textFieldlink_sujet, "cell 1 13,growx");
- textFieldlink_sujet.setColumns(10);
- if(commandes.sujet.getAttributs().get("link_sujet")!=null){
- textFieldlink_sujet.setText(commandes.sujet.getAttributs().get("link_sujet"));
- }
+
btnVoirBaremeABC = new JButton("");
btnVoirBaremeABC.addActionListener(new ActionListener() {
@@ -405,7 +418,50 @@ public final class proprieteFichierAnalyse extends JFrame {
});
btnVoirBaremeABC.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/voirmini.png")));
contentPane.add(btnVoirBaremeABC, "cell 2 4");
+
+ // URL Sujet Ligne 13
+ textFieldlink_sujet = new JTextField();
+ contentPane.add(textFieldlink_sujet, "cell 1 13,growx");
+ textFieldlink_sujet.setColumns(10);
+ if(commandes.sujet.getAttributs().get("link_sujet")!=null){
+ textFieldlink_sujet.setText(commandes.sujet.getAttributs().get("link_sujet"));
+ }
+ btnAidecontrole_URLSujet = new JButton("");
+ btnAidecontrole_URLSujet.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ JOptionPane.showInternalMessageDialog(null, "Si vous indiquez une URL alors elle apparaîtra dans"
+ + "le feedback des étudiants.");
+ }
+ });
+ btnAidecontrole_URLSujet.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
+ contentPane.add(btnAidecontrole_URLSujet, "cell 2 13");
+
+ // 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 14,alignx left");
+ textAreaCommentaire = new JTextArea();
+ textAreaCommentaire.setFont(new Font("Tahoma", Font.PLAIN, 12));
+ contentPane.add(textAreaCommentaire, "cell 1 14,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, "Si vous tapez un commentaire, "
+ + "il apparaîtra dans les feedbacks des étudiants.");
+ }
+ });
+ btnAidecontrole_Commentaire.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/whatmini.png")));
+ contentPane.add(btnAidecontrole_Commentaire, "cell 2 14");
+
+
+ // Bouton de calcul de la base numérique
btnVoirBaremeNumeric = new JButton("");
btnVoirBaremeNumeric.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
@@ -418,21 +474,8 @@ public final class proprieteFichierAnalyse extends JFrame {
btnVoirBaremeNumeric.setIcon(new ImageIcon(proprieteFichierAnalyse.class.getResource("/resources/voirmini.png")));
contentPane.add(btnVoirBaremeNumeric, "cell 2 5");
- lblNewLabel_13 = new JLabel("Commentaire sur l'exercice");
- lblNewLabel_13.setFont(new Font("Tahoma", Font.PLAIN, 12));
- contentPane.add(lblNewLabel_13, "cell 0 14,alignx left");
-
- textAreaCommentaire = new JTextArea();
- textAreaCommentaire.setFont(new Font("Tahoma", Font.PLAIN, 12));
- contentPane.add(textAreaCommentaire, "cell 1 14,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);
- }
- }
-
+ // Bouton pour validation
JButton btnNewButton = new JButton("Valider");
btnNewButton.setFont(new Font("Tahoma", Font.BOLD, 14));
contentPane.add(btnNewButton, "cell 1 15,grow");
diff --git a/src/fenetres/setting.java b/src/fenetres/setting.java
index 303eef4..9d7c9fc 100644
--- a/src/fenetres/setting.java
+++ b/src/fenetres/setting.java
@@ -92,7 +92,7 @@ public final class setting extends JFrame {
ImageIcon img = new ImageIcon(getClass().getResource("/evalwriter.png") );
setIconImage(img.getImage());
- setTitle(commandes.Titre + commandes.version + " - Les paramètres pour l'évaluation");
+ setTitle(commandes.Titre +" "+ commandes.version +" "+commandes.branch+" - Les paramètres pour l'évaluation");
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
int screenWidth = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getWidth();
int screenHeight = (int) java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().getHeight();
@@ -332,8 +332,7 @@ public final class setting extends JFrame {
textFieldNbrMiniModification.setText(nodTriche.getAttributs().get("mini_number_modification"));
panelPlagiarism.add(textFieldNbrMiniModification);
- JLabel lblNewLabel_2 = new JLabel("L'étudiants n'a pas réaliser assez de travaux.
"
- + "si valuer = -1 alors n'est pas pris en compte.");
+ JLabel lblNewLabel_2 = new JLabel("L'étudiants n'a pas réaliser assez de travaux.
si valeur = -1 alors n'est pas pris en compte.");
lblNewLabel_2.setFont(new Font("Tahoma", Font.PLAIN, 11));
lblNewLabel_2.setVerticalAlignment(SwingConstants.TOP);
lblNewLabel_2.setBounds(430, 297, 239, 41);
@@ -760,7 +759,7 @@ public final class setting extends JFrame {
nodImportMoodle.getAttributs().put("firstname","prenom");
nodImportMoodle.getAttributs().put("id","identification");
node nodZIP = commandes.sujet.retourneFirstEnfantsByName("zip");
- nodZIP.getAttributs().put("size","48000000");
+ nodZIP.getAttributs().put("size","50");
nodZIP.getAttributs().put("nameZip","feedbackMoodle");
node nodplagiarism = commandes.sujet.retourneFirstEnfantsByName("plagiarism");
nodplagiarism.getAttributs().put("number_match","2");
diff --git a/src/list/listeAttributsAnalyseWriter.java b/src/list/listeAttributsAnalyseWriter.java
index fe9845f..dd00f70 100644
--- a/src/list/listeAttributsAnalyseWriter.java
+++ b/src/list/listeAttributsAnalyseWriter.java
@@ -72,7 +72,6 @@ public class listeAttributsAnalyseWriter {
//Le node OU
if(attribut.equals("OU")) return true;
- if(attribut.equals("pointOuMax")) return true;
// if(attribut.equals("page_start:text_contenu_index")) return true;