Skip to main content

Show exam documents on the graded submission

Problem

On the digital graded copy, neither the instructor nor the student can view the exam materials (PDFs, audio, video) linked to the sections and exercises. To grade or review an answer that relies on an attachment, you must return to the editor.

Solution

  • On the graded copy, the documents for a section or exercise appear as tiles. Clicking on one opens a drawer on the right that displays all the documents for that exercise in tabs, just like the exam drawer, using the same player (PDF, audio, video, with no playback limits).
  • For instructors: the drawer is the one from the layout, in place of the chat, with a download button. The documents are always visible.
  • Student view: drawer on the right side of the page, without a download option, just like during the exam.
  • New option in Share > Answer Key Viewable “After Submission”: Documents Viewable (quizzes.correction_documents_visible_to_students, disabled by default). It is set to false when the answer key is no longer viewable after submission, and is copied along with the settings when the course is duplicated.

Student access rule

  • Never before starting the exam.
  • During the exam: normal access.
  • After the exam: only if the graded copy is viewable and the “Viewable documents” option is enabled.

This rule is enforced on the server side in Quizzes::DocumentPolicy (file and metadata) and Quizzes::InstancePolicy::Fields (quiz_assets), via Quiz#graded_submission_documents_visible?.

Outside the scope; to be handled separately

  • Api::V1::Quizzes::DocumentsController#create has no authorization: any logged-in user can add a file to any exam.
  • DocumentsController#index is accessible to any teacher from any school (document names and IDs).
  • The S3 URL returned by ` file ` remains valid for 25 hours: a document accessed during the exam remains downloadable immediately afterward.

PR: evalmee/evalmee-app#6982

Status: Completed

Log in to comment and vote

No comments yet

Be the first to share your thoughts.