MAJ V4.4.3
This commit is contained in:
parent
4ddc6c5c61
commit
e89e51b8e6
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,7 +1,8 @@
|
||||
package MEPTL;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.text.ParseException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
|
||||
import cXML.Run;
|
||||
import cXML.node;
|
||||
@ -28,14 +29,13 @@ public class ecritureSujet {
|
||||
* @throws CloneNotSupportedException
|
||||
*/
|
||||
public static node nodePourEcritureSujet(node nod, Run a, Integer i) throws CloneNotSupportedException {
|
||||
LocalDateTime aujourdhui = LocalDateTime.now();
|
||||
Date aujourdhui = new Date();
|
||||
|
||||
// fichier
|
||||
nod.getAttributs().put("evaluer", "true");
|
||||
nod.getAttributs().put("progression", "1");
|
||||
nod.getAttributs().put("notefrom", "20");
|
||||
nod.getAttributs().put("baremeABC", "false");
|
||||
nod.getAttributs().put("date", String.valueOf(aujourdhui));
|
||||
nod.getAttributs().put("version", commandes.version);
|
||||
nod.getAttributs().put("titre", "Le titre de l'exercice");
|
||||
nod.getAttributs().put("link_sujet", "https://moodle.univ-artois.fr/cours/");
|
||||
@ -43,7 +43,12 @@ public class ecritureSujet {
|
||||
nod.getAttributs().put("historiquePresent", "false");
|
||||
nod.getAttributs().put("controleDateCreation", "false");
|
||||
nod.getAttributs().put("controleDateModificationMini", "false");
|
||||
nod.getAttributs().put("modificationDateMini", String.valueOf(aujourdhui));
|
||||
try {
|
||||
nod.getAttributs().put("date", calcul.formatDateWriter.DateLibreOffice(aujourdhui));
|
||||
nod.getAttributs().put("modificationDateMini", calcul.formatDateWriter.DateLibreOffice(aujourdhui));
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
nod.getAttributs().put("controle_Initial_Creator", "false");
|
||||
nod.getAttributs().put("presenceMetaSujet", "false");
|
||||
node b = a.retourneName(nod.retourneFirstEnfantsByName("office:meta"),"meta:user-defined","meta:name","Sujet");
|
||||
|
@ -19,7 +19,9 @@ public class formatDateWriter {
|
||||
Pattern p = Pattern.compile("^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}$");
|
||||
Matcher m = p.matcher(date);
|
||||
if(m.find()) return true;
|
||||
if(!date.isBlank())JOptionPane.showMessageDialog(null, "Le format de la date "+ date +" n'est pas correct.");
|
||||
if(!date.isBlank()) {
|
||||
JOptionPane.showMessageDialog(null, "Le format de la date "+ date +" n'est pas correct.");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user