This commit is contained in:
pablo rodriguez 2022-04-25 18:46:58 +02:00
parent 8c8089ddf2
commit 8b5eb9fe6b
9 changed files with 36 additions and 11 deletions

View File

@ -3,6 +3,6 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="lib" path="C:/Users/pabr6/eclipse-workspace/zip4j-1.2.7.jar"/>
<classpathentry kind="lib" path="C:/Users/pabr6/eclipse-workspace/cXML.jar" sourcepath="/cXML"/>
<classpathentry kind="lib" path="C:/Users/pabr6/eclipse-workspace/cXML.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@ -1 +0,0 @@
pablo rodriguez,LAPTOP-G5TBC6N3/pabr6,LAPTOP-G5TBC6N3,25.04.2022 14:56,file:///C:/Users/pabr6/AppData/Roaming/LibreOffice/4;

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -35,6 +35,7 @@ public class commandes {
public static boolean newLogo=false; // un nouveau logo dans le feedback
public static boolean licence = false; // affiche la licence
public static boolean zipfeedback = false; // Les feedback dans une archive ZIP
public static boolean fichierStudentMoodle = false; // Les fichiers étudiants sont directement dans le dossier courant de l'application.
static cXML.Run.UserStatus Profil = cXML.Run.UserStatus.TEACHER ; //Le profil TEACHER permet de lire dans les dossiers contenus dans le répertoire courant de l'application. Le profil STUDENT permet de lire au niveau du répertoire courant de l'application.
public static boolean fourniDossierDestination = false; //répertoire de destination des feedbacks et CSV;
public static String nameCSV = ""; //le nom du fichier contenant la liste des étudiants
@ -68,10 +69,13 @@ public class commandes {
public commandes(String[] args, String path) throws IOException, InterruptedException {
commandes.path = path;
for(int i = 0 ; i < args.length ; i++) {
Command = Command + " " +args[i];
}
try {
if(args.length==0) {badCommand=true; System.out.println("There must be at least one command.");System.out.println("You can type the -help command to get help.");}
for(int i = 0 ; i < args.length ; i++) {
Command = Command + " " +args[i];
if(args[i].equals("-use")) if((i+1)<args.length) { if(!args[i+1].contains(".xml")) {badCommand=true; System.out.println("The -use command must be followed by the name of analyze file.");}}else {badCommand=true; System.out.println("The -use command must be followed by the name of analyze file.");}
if(args[i].contains(".xml")) {
Matcher m = Pattern.compile("{1,}.xml$").matcher(args[i]);
@ -152,10 +156,18 @@ public class commandes {
noNote=true;
}
if(args[i].equals("-zipfeedback")) {
if(!analyse) {badCommand=true;System.out.println("You must type the command -use, then the name of analysis file, then the command -zipfeedback.");}
if(!analyse) {badCommand=true;System.out.println("You must type the command -use, then the name of analysis file, then the command -zipfeedback.");}
if(sansFeeback) {badCommand=true;System.out.println("It is not possible to run the -nofeedback and -zipfeedback commands at the same time.");}
zipfeedback=true;
}
if(args[i].equals("-d")) {
if(Command.contains(" -f ")) {badCommand=true;System.out.println("The -d and -f commands cannot be executed together.");}
fichierStudentMoodle=false;
}
if(args[i].equals("-f")) {
if(Command.contains(" -d ")) {badCommand=true;System.out.println("The -f and -d commands cannot be executed together.");}
fichierStudentMoodle=true;
}
if(args[i].equals("-dest")) if((i+1)<args.length) {
Matcher m = Pattern.compile("^\\./.{1,}/$").matcher(args[i+1]);
if(m.find()) {
@ -182,7 +194,7 @@ public class commandes {
if(!args[i].equals("-use")&&!args[i].equals("-write")&&!args[i].equals("-csv")&&!args[i].equals("-verif")&&!args[i].equals("-verifcsv")
&&!args[i].contains(".csv")&&!args[i].contains(".svg")&&!args[i].contains(".xml")&&!args[i].contains("-nofeedback")&&!args[i].contains("-help")&&!args[i].equals("-aide")
&&!args[i].equals("-about")&&!args[i].equals("-nonote") &&!args[i].equals("-dest")&&!args[i].equals("-sujet")&&!args[i].equals("-nologo")
&&!args[i].equals("-licence")&&!args[i].equals("-zipfeedback")&&!args[i].equals("-newLogo")&&!m.find()) {
&&!args[i].equals("-licence")&&!args[i].equals("-zipfeedback")&&!args[i].equals("-newLogo")&&!args[i].equals("-f")&&!args[i].equals("-d")&&!m.find()) {
badCommand=true; System.out.println("the command " + args[i] + " is unknown.");System.out.println("You can type the -help command to get help.");
}
}
@ -203,6 +215,7 @@ public class commandes {
System.out.println();
System.out.println("Analysis of student files = " + analyse);
System.out.println("The name of the analysis file is = " + nameSujet);
System.out.println("Student's file in the current directory = " + fichierStudentMoodle);
System.out.println("Zip feedback = " + zipfeedback);
System.out.println("No feedback = " + sansFeeback);
System.out.println("No logo = " + noLogo);
@ -249,6 +262,12 @@ public class commandes {
System.out.println(" : \t Les fichiers des étudiants doivent être au format ODF avec l'extension .odt.");
System.out.println();
System.out.println(" -f : \t Permet d'indiquer que tous les fichiers des étudiants");
System.out.println(" : \t sont directement dans le dossier courant de l'application.");
System.out.println(" : \t Par défaut les fichiers des étudiants sont dans des dossiers nominatifs.");
System.out.println(" : \t Les fichiers des étudiants doivent être au format ODF avec l'extension .odt.");
System.out.println();
System.out.println(" file.xml : \t Le fichier d'analyse au format XML.");
System.out.println(" : \t file.xml doit être placé juste après la commande -use.");
System.out.println(" : \t Le fchier file.xml doit se trouver dans le dossier courant*.");
@ -376,6 +395,11 @@ public class commandes {
System.out.println(" : \t This file must be manually modified to adapt it to your analysis.");
System.out.println();
System.out.println(" -f : \t Indicates that all student files are directly in the current folder.");
System.out.println(" : \t By default student files are in named folders.");
System.out.println(" : \t Student files must be in ODF format with the extension .odt.");
System.out.println();
System.out.println(" -verif : \t Allows you to compare all the modifications between the modification track logs.");
System.out.println(" : \t If this is the only command then there is no analysis, no rating, no feedback.");
System.out.println(" : \t This command does not depend on an analysis file (independent of subjects).");

View File

@ -72,8 +72,8 @@ public class meptl {
//** Nouveau node qui permet de convertir le fichier contenant la liste des étudiants en node.
node nodeCSV = null;
//** Lancement des lectures des dossiers
Run a = new Run(patch,commandes.Profil);
//** Lancement des lectures des dossiers ou fichiers
Run a = new Run(patch,commandes.Profil, commandes.fichierStudentMoodle);
if(!commandes.ecritCode && commandes.analyse) {
nodeSujet = chargementsujet(a, commandes.nameSujet);
@ -192,7 +192,7 @@ public class meptl {
node init = InitialisationAvantAnalyse(nodeSujet);
if(!Boolean.valueOf(init.getAttributs().get("erreur"))) {
node ana = analyse(nodStudent, nodeSujet, i, a);
// a.ecritureNodeEnXML(ana, "nodana"+ana.retourneFirstEnfantsByName("ouverture").getAttributs().get("dossier"),"",false); //écriture du node analyse de l'étudiant
// a.ecritureNodeEnXML(ana, "nodana"+ana.retourneFirstEnfantsByName("ouverture").getAttributs().get("dossier"),"",false,""); //écriture du node analyse de l'étudiant
//** Création des feedbacks avec des tailles définies
if(!commandes.sansFeeback) if(!commandes.zipfeedback) feedback(ana, verif); //classique directement dans le répertoire
@ -4288,7 +4288,8 @@ public class meptl {
}
/**
* Ecriture du fichier CSV avec vérification mais sans rechercher les identifiants des étudiants
* Ecriture du fichier CSV avec vérification.<br>
* Mais sans rechercher les identifiants des étudiants.
* @param ana
* @param verif
* @param a
@ -4353,7 +4354,8 @@ public class meptl {
/**
* Ecriture du fichier CSV avec ou sans vérification mais avec rechercher des identifiants des étudiants.<br>
* Ecriture du fichier CSV avec ou sans vérification.<br>
* Mais avec rechercher des identifiants des étudiants.<br>
* @param ana
* @param verif
* @param a
@ -4420,7 +4422,7 @@ public class meptl {
if(commandes.verifHisto2) verifStudent = a.retourneNodeByNameAttributValueAttributValueExact(verif, "fichier", "dossier", identification, "dateModification", dateModif);
String note = "";
// rechercher les correspondances avec le prénom et le nom de l'étudiant
//** rechercher les correspondances avec le prénom et le nom de l'étudiant
String[] ident = identification.split(" "); //séparateur entre le prénom et le nom par un espace
node A=null;
if(ident.length==2) {