Skip to content

Implement 47

Ghost User requested to merge implement_47 into staging

Implement feature of issue #47 (closed) .

Add a function on the server to serve a zip containing the pdfs (both exam pdf and, when available, solution pdf) of a given list of exams. The zip is generated on the fly by pulling the relevant pdfs from minio to a temporary directory, deleted immediately after.

That function is served on route "/api/zip/" with POST, with parameter of the form filenames: [fn1, fn2, ...] giving the list of requested exams.

Add input tags to category.tsx on the frontend to allow using that function: checkboxes for each exam, select/deselect all exams by exam-type.

The following authorizations checks have been (manually) tested: a pdf is included in the zip only if

  • it's not hidden
  • for oral exams, the user must have paid
  • for solution pdfs, it's not printonly
  • (if the user has admin rights on the category, these checks are overriden)

For printonly exam pdfs, I'm a bit confused as to how it works so I'm not certain, but a priori it's also checked.

Merge request reports