File Upload¶
Answer type: file
The student uploads a file — scanned working, a spreadsheet, a plot.
The minimum¶
Common Control:
$answer = "Upload your working as a single PDF."
Options¶
| Variable | Effect |
|---|---|
$answer |
the reference or instruction shown afterwards |
$answerformat |
comma-separated extensions or MIME types for the file picker's filter, e.g. ".pdf"; "images" and "canpreview" are shortcuts. It is a browser hint only: the server does not enforce it |
$scoremethod |
"takeanything" gives full credit for any uploaded file; "takeanythingorblank" gives full credit even when no file is uploaded; "filesize" gives full credit when the file's size in bytes equals $answer and otherwise leaves it for manual grading (it also hides $answer). Unset, or any other value including the Essay-only "nomanual", leaves the upload for manual grading |
$ansprompt |
text before the upload control |
Practical notes¶
- Say what format you want, in
qtext. The upload control does not announce accepted types to the student, so an unstated expectation becomes a marking dispute. - Uploads are marked by hand unless
$scoremethodauto-scores them (see Options). The same release-of-scores consequence applies as for Essay. - Give an alternative where the work could be typed. Requiring a photograph of handwriting excludes students who cannot produce one.
Example¶
Question Text:
<p>Solve the system by hand, showing every row operation:</p>
<p>`x + y = 1`<br>`2x - y = 5`</p>
<p>Upload your working as a single PDF.</p>
A file question shows only an upload control, so it cannot offer a typed alternative on its own. To give one, build a Multipart question with a file part and an essay part.
Common Control:
$answer = "Row-reduce to [[1,0,2],[0,1,-1]]; the solution is (2, -1)."
$ansprompt = "Your working: "