Cache for reading annotation

This commit is contained in:
sebastien committed 2026-10-24 10:22:41 +02:00
1 parent 55d5cf16c9
commit ff7496b113
12 files changed
+466 -13

No files matched your search

+22 -5
View File
@@ -261,8 +261,21 @@ Scores incorporate review checkbox changes and, when requested, existing score
overrides via `read-grouped --update-score` (or `read-annotations --update-score`
for `Bnot`). Editing the JSON alone does not update the rendered scores. Overrides
are read from the annotation source folder: a return symlink points there, but
an independent fallback copy does not. After regeneration, rerun `giving-names`
to refresh copied return files.
an independent fallback copy does not. Successful annotation rereads automatically
refresh individual `answers/` images in existing return folders, matching their
trailing copy ID and preserving manual names and other return files. This also
applies the selected supplementary-material options. Copies whose regeneration
fails retain their existing exports. Rerun `giving-names` to refresh other copied
return files.
With `--update-score`, both readers save a small content fingerprint per copy
after successful regeneration and answer publication. Subsequent runs skip
unchanged copies before scanning or rendering PDFs. A single edited `score.json`
therefore rebuilds only its copy. Changed shared documents or grouped annotation
inputs conservatively invalidate all copies; changed export options also trigger
regeneration. Missing generated files and failed runs are retried. The first run
establishes the fingerprints. Reads without `--update-score` always regenerate;
selective `--refaire` reads do not use this optimization.
`update-ods` reads these return JSON files; empty values become `NT` in the normal
per-question export. Its `--sum` option sums numeric values and skips nonnumeric
@@ -280,9 +293,13 @@ ones. Weighting and the final overall mark belong to the separate grading flow.
outputs whose source is now absent, including broken symlinks.
- `add-final-score` writes to `FINAL_SCORE_OUTPUT_DIR/<evaluation>/`. It stamps
the overall mark from the configured ODS in red at the JPEG's upper right,
rounded down to one decimal place. It copies PDFs unchanged and does not export
either JSON file or the `answers/` directory. It does not add that mark to the
files inside `A Rendre`.
rounded down to one decimal place. It copies PDFs unchanged, together with
`score.json`, `info.json` and the optional `answers/` directory. Alongside the
student folders it writes `stat.json`, averaging each label across the current
`A Rendre/*/score.json` files and rounding upward to one decimal place, stored
as strings like the original scores (for example `"2.7"`). Blank
and missing scores are excluded; labels without numeric scores retain `""`.
It does not add the overall mark to the files inside `A Rendre`.
- The `clean` command retains return images (including individual answers), PDFs,
`score.json` and `info.json`, materializing
retained symlinks before deleting their sources.
+11
View File
@@ -439,6 +439,17 @@ réponse.
Le mode **Régénérer avec les nouveaux énoncés/corrigés et les
score.json** sert à mettre à jour les scores sur les images finales à
partir d'une modification manuelle des fichiers `score.json`.
Après une lecture réussie, les images `answers` des dossiers déjà présents dans
**A Rendre** sont également régénérées, avec les compléments sélectionnés.
Les dossiers sont identifiés par leur numéro de copie final entre parenthèses ;
leurs noms personnalisés et les autres fichiers sont conservés.
Dans ce mode, les copies dont les fichiers et options sont inchangés sont
ignorées avant la lecture des PDF et la génération des images. Le premier
passage établit une empreinte par copie ; modifier un seul `score.json` ne
régénère ensuite que cette copie. Une modification des documents partagés
(énoncés, corrigés, annotations groupées) peut relancer plusieurs copies.
La lecture sans cette option force une régénération ; le mode refaire conserve
son fonctionnement habituel.
### Modifier les réponses annotées