Skip to content

Commit

Permalink
Merge pull request #559 from correctexam/515-migrate-comments-when-ch…
Browse files Browse the repository at this point in the history
…anging-grading-scale

correct bug in cache for student view
  • Loading branch information
barais authored Oct 4, 2024
2 parents f16d9e1 + e06ce26 commit f6175d5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
"webapp:build": "npm run clean-www && npm run webapp:build:dev",
"webapp:build:dev": "ng build --configuration development",
"webapp:build:prod": "ng build --configuration production",
"webapp:build:prodgithubpage": "FRONT_URL=https://correctexam.github.io/corrigeExamFront/ SERVER_API_URL=https://api.gradescope.barais.fr/ ng build --configuration production --base-href=/corrigeExamFront/",
"webapp:build:prodlocal": "FRONT_URL=/ SERVER_API_URL=/ ng build --configuration production",
"webapp:build:prodnetlify": "FRONT_URL=https://correctexam.netlify.app/ SERVER_API_URL=https://api.gradescope.barais.fr/ ng build --configuration production --base-href=/",
"webapp:build:prodcloudfare": "FRONT_URL=https://correctexam.pages.dev/ SERVER_API_URL=https://api.gradescope.barais.fr/ ng build --configuration production --base-href=/",
"webapp:build:prodgithubpage": "npm run clean-www && FRONT_URL=https://correctexam.github.io/corrigeExamFront/ SERVER_API_URL=https://api.gradescope.barais.fr/ ng build --configuration production --base-href=/corrigeExamFront/",
"webapp:build:prodlocal": "npm run clean-www && FRONT_URL=/ SERVER_API_URL=/ ng build --configuration production",
"webapp:build:prodnetlify": "npm run clean-www && FRONT_URL=https://correctexam.netlify.app/ SERVER_API_URL=https://api.gradescope.barais.fr/ ng build --configuration production --base-href=/",
"webapp:build:prodcloudfare": "npm run clean-www && FRONT_URL=https://correctexam.pages.dev/ SERVER_API_URL=https://api.gradescope.barais.fr/ ng build --configuration production --base-href=/",
"webapp:dev": "FRONT_URL=/ SERVER_API_URL=/ ng serve",
"webapp:dev-ssl": "ng serve --ssl",
"webapp:dev-verbose": "ng serve --verbose",
Expand Down
4 changes: 4 additions & 0 deletions src/main/webapp/app/qcm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ function analyseStudentSheet(casesExamTemplate: any, templateimage: any, student
casesExamTemplate.cases.forEach((case1: any, k: number) => {
const diff = diffCouleurAvecCaseBlanche(decoupe(thresh, getPosition(case1), getDimensions(case1)));
imgs_templatediffblank.set(k, diff);
console.error(diff, k);
});
gray.delete();
thresh.delete();
Expand All @@ -520,6 +521,9 @@ function analyseStudentSheet(casesExamTemplate: any, templateimage: any, student
const diff1 = diffCouleurAvecCaseBlanche(img_case_eleve);
// img_case_eleve.delete();
const diff = diff1 - imgs_templatediffblank.get(k)!;

console.error(diff1, imgs_templatediffblank.get(k), k);

// console.error('diff',k,diff1-imgs_templatediffblank.get(k)!,diff1, imgs_templatediffblank.get(k));
if (diff > preference.qcm_differences_avec_case_blanche) {
infos_cases.set(k, { verdict: true, prediction: diff });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,9 @@ export class CorrigequestionComponent implements OnInit, AfterViewInit {

updateTitle(): void {
this.activatedRoute.data.subscribe(e => {
console.error('title', this.exam);
// console.error('title', this.exam);
this.translateService.get(e['pageTitle'], { examName: this.exam?.name, courseName: this.exam?.courseName }).subscribe(e1 => {
console.error('settitle', e1);
// console.error('settitle', e1);
this.titleService.setTitle(e1);
});
});
Expand Down
4 changes: 2 additions & 2 deletions src/main/webapp/app/scanexam/db/dbstudent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,11 @@ export class AppDB extends Dexie {
}

async countNonAlignWithPageNumber(examId: number, pageInscan: number) {
return await this.nonAlignImages.where({ examId: examId, pageInscan }).count();
return await this.nonAlignImages.where({ examId: examId, pageNumber: pageInscan }).count();
}

async countAlignWithPageNumber(examId: number, pageInscan: number) {
return await this.alignImages.where({ examId: examId, pageInscan }).count();
return await this.alignImages.where({ examId: examId, pageNumber: pageInscan }).count();
}
}

Expand Down

0 comments on commit f6175d5

Please sign in to comment.