diff --git a/src/main/webapp/app/scanexam/resultatstudentcourse/resultatstudentcourse.component.html b/src/main/webapp/app/scanexam/resultatstudentcourse/resultatstudentcourse.component.html
index dd3a2b84..935e904b 100644
--- a/src/main/webapp/app/scanexam/resultatstudentcourse/resultatstudentcourse.component.html
+++ b/src/main/webapp/app/scanexam/resultatstudentcourse/resultatstudentcourse.component.html
@@ -199,6 +199,7 @@
LIEN
LIEN
Envoi Mail
+ ABI/ABJ
@@ -207,8 +208,8 @@ {{ student.note }}
- 0
+ {{ student.note }}
+ 0">0
ABI
-
+ ABI
+ ABJ
+
ABI
-
+ ABI
+ ABJ
+
ABI
+ ABI
+ ABJ
-
+ 0">
+
+ 0">
+
+
diff --git a/src/main/webapp/app/scanexam/resultatstudentcourse/resultatstudentcourse.component.ts b/src/main/webapp/app/scanexam/resultatstudentcourse/resultatstudentcourse.component.ts
index 0f5ab4d8..b9e77d43 100644
--- a/src/main/webapp/app/scanexam/resultatstudentcourse/resultatstudentcourse.component.ts
+++ b/src/main/webapp/app/scanexam/resultatstudentcourse/resultatstudentcourse.component.ts
@@ -162,6 +162,7 @@ export class ResultatStudentcourseComponent implements OnInit {
this.http.get(this.applicationConfigService.getEndpointFor('api/showResult/' + this.examid)).subscribe(s => {
// eslint-disable-next-line no-console
this.studentsresult = s as any;
+
this.blocked = false;
});
}
@@ -174,10 +175,12 @@ export class ResultatStudentcourseComponent implements OnInit {
}
exportExcel(): void {
+ const studentsresult: any[] = JSON.parse(JSON.stringify(this.studentsresult));
+
this.loadLibelle().then(() => {
import('xlsx').then(xlsx => {
let maxQuestion = 0;
- this.studentsresult.forEach(res => {
+ studentsresult.forEach(res => {
// eslint-disable-next-line no-console
for (const key in res.notequestions) {
// eslint-disable-next-line no-prototype-builtins
@@ -188,7 +191,7 @@ export class ResultatStudentcourseComponent implements OnInit {
}
}
});
- this.studentsresult.forEach(res => {
+ studentsresult.forEach(res => {
for (let i = 1; i <= maxQuestion; i++) {
if (this.libelles[i] !== undefined && this.libelles[i] !== '') {
res['Q' + i + ' (' + this.libelles[i] + ')'] = undefined;
@@ -198,12 +201,18 @@ export class ResultatStudentcourseComponent implements OnInit {
}
});
- this.studentsresult.forEach(res => {
+ studentsresult.forEach(res => {
if (res['note'] !== undefined && (typeof res['note'] === 'string' || res['note'] instanceof String)) {
res['note'] = parseFloat((res['note'] as any).replaceAll(',', '.'));
}
if (res['abi'] !== undefined) {
- res['abi'] = !!res['abi'];
+ if (res['abi'] === 1) {
+ res['abi'] = 'ABI';
+ } else if (res['abi'] === 2) {
+ res['abi'] = 'ABJ';
+ } else {
+ res['abi'] = false;
+ }
}
for (const key in res.notequestions) {
// eslint-disable-next-line no-prototype-builtins
@@ -216,7 +225,10 @@ export class ResultatStudentcourseComponent implements OnInit {
}
}
});
- const worksheet = xlsx.utils.json_to_sheet(this.studentsresult);
+ studentsresult.forEach((e: any) => delete e.notequestions);
+ studentsresult.forEach((e: any) => delete e.id);
+
+ const worksheet = xlsx.utils.json_to_sheet(studentsresult);
const workbook = { Sheets: { data: worksheet }, SheetNames: ['data'] };
const excelBuffer: any = xlsx.write(workbook, { bookType: 'xlsx', type: 'array' });
let filename = 'students';
@@ -241,8 +253,8 @@ export class ResultatStudentcourseComponent implements OnInit {
exportCSV(): void {
this.loadLibelle().then(() => {
let maxQuestion = 0;
-
- this.studentsresult.forEach(res => {
+ const studentsresult: any[] = JSON.parse(JSON.stringify(this.studentsresult));
+ studentsresult.forEach(res => {
// eslint-disable-next-line no-console
for (const key in res.notequestions) {
// eslint-disable-next-line no-prototype-builtins
@@ -253,7 +265,7 @@ export class ResultatStudentcourseComponent implements OnInit {
}
}
});
- this.studentsresult.forEach(res => {
+ studentsresult.forEach(res => {
for (let i = 1; i <= maxQuestion; i++) {
if (this.libelles[i] !== undefined && this.libelles[i] !== '') {
res['Q' + i + ' (' + this.libelles[i] + ')'] = undefined;
@@ -263,12 +275,18 @@ export class ResultatStudentcourseComponent implements OnInit {
}
});
- this.studentsresult.forEach(res => {
+ studentsresult.forEach(res => {
if (res['note'] !== undefined && (typeof res['note'] === 'string' || res['note'] instanceof String)) {
res['note'] = parseFloat((res['note'] as any).replaceAll(',', '.'));
}
if (res['abi'] !== undefined) {
- res['abi'] = !!res['abi'];
+ if (res['abi'] === 1) {
+ res['abi'] = 'ABI';
+ } else if (res['abi'] === 2) {
+ res['abi'] = 'ABJ';
+ } else {
+ res['abi'] = false;
+ }
}
for (const key in res.notequestions) {
// eslint-disable-next-line no-prototype-builtins
@@ -281,8 +299,8 @@ export class ResultatStudentcourseComponent implements OnInit {
}
}
});
- const studentsresult = JSON.parse(JSON.stringify(this.studentsresult));
studentsresult.forEach((e: any) => delete e.notequestions);
+ studentsresult.forEach((e: any) => delete e.id);
// delete this.studentsresult.notequestions
const csv = generateCsv(csvConfig)(studentsresult);
if (this.exam?.name) {
@@ -292,6 +310,17 @@ export class ResultatStudentcourseComponent implements OnInit {
download(csvConfig)(csv);
});
}
+
+ updateStudentABJ(student: any): void {
+ if (student.id) {
+ firstValueFrom(
+ this.http.put(
+ this.applicationConfigService.getEndpointFor('api/toggleAsAbJ/' + student.id + '/' + this.examid + '/' + student.abi),
+ undefined,
+ ),
+ );
+ }
+ }
}
function formatDate(date: Date): string {
diff --git a/src/main/webapp/app/scanexam/statsexam/statsexam.component.ts b/src/main/webapp/app/scanexam/statsexam/statsexam.component.ts
index a013f06e..8f580751 100644
--- a/src/main/webapp/app/scanexam/statsexam/statsexam.component.ts
+++ b/src/main/webapp/app/scanexam/statsexam/statsexam.component.ts
@@ -233,7 +233,7 @@ export class StatsExamComponent implements OnInit {
this.infosStudents
.filter(s => s.ine !== '')
.forEach(s => {
- if (s.abi) {
+ if (s.abi > 0) {
this.nbStdABI++;
} else {
for (const key in s.notequestions) {
@@ -763,7 +763,7 @@ interface StudentRes {
mail: string;
nom: string;
prenom: string;
- abi: boolean;
+ abi: number;
note?: string;
notequestions: { [key: string]: string };
studentNumber?: string;
diff --git a/src/main/webapp/app/scanexam/voircopie/voircopie.component.html b/src/main/webapp/app/scanexam/voircopie/voircopie.component.html
index a152e802..f168c437 100644
--- a/src/main/webapp/app/scanexam/voircopie/voircopie.component.html
+++ b/src/main/webapp/app/scanexam/voircopie/voircopie.component.html
@@ -191,11 +191,11 @@ {{ comment.text }}
{{ comment.text }}
{{ comment.description }}
- = 0"> + {{ comment.grade }}
+ = 0"> + {{ comment.grade }}
pt %
1">
- = 0"> +
+ = 0"> +
{{ (comment.grade! * comment.stepValue!) / comment.step! | number: '0.0-2' }} pt
%
diff --git a/src/main/webapp/i18n/en/scanexammodule.json b/src/main/webapp/i18n/en/scanexammodule.json
index d676de04..a0420f41 100644
--- a/src/main/webapp/i18n/en/scanexammodule.json
+++ b/src/main/webapp/i18n/en/scanexammodule.json
@@ -457,6 +457,7 @@
"contourLength": "Contour length",
"contourLengthAndNbreContour": "Length and number of contours",
"contourLengthTooltip": "One-dimensional Kmeans based on contour length",
- "contourLengthAndNbreContourTooltip": "Two-dimensional Kmeans based on the length of contours and the number of contours with more than three pixels"
+ "contourLengthAndNbreContourTooltip": "Two-dimensional Kmeans based on the length of contours and the number of contours with more than three pixels",
+ "abiabj": "Excused absence"
}
}
diff --git a/src/main/webapp/i18n/fr/scanexammodule.json b/src/main/webapp/i18n/fr/scanexammodule.json
index 3bc13cd7..f97b5d58 100644
--- a/src/main/webapp/i18n/fr/scanexammodule.json
+++ b/src/main/webapp/i18n/fr/scanexammodule.json
@@ -461,6 +461,7 @@
"contourLength": "Longueur des contours",
"contourLengthAndNbreContour": "Longueur et nombre de contours",
"contourLengthTooltip": "Kmeans à une dimension fondé sur la longueur des contours",
- "contourLengthAndNbreContourTooltip": "Kmeans à deux dimensions fondé sur la longueur des contours et le nombre de contours de plus de trois pixels"
+ "contourLengthAndNbreContourTooltip": "Kmeans à deux dimensions fondé sur la longueur des contours et le nombre de contours de plus de trois pixels",
+ "abiabj": "Absence justifiée"
}
}