Element pl-file-upload: upload a file

You can use the element pl-file-upload when you want to manually grade answers from students, or if you just want to have records of their solution process. By default, only file names listed in file-names can be uploaded and all files in the list must be provided.

Files

Besides mandatory file names, pl-file-upload supports 3 other attributes to customize which files students can upload in a more fine-grained way:

  • optional-file-names defines list of file names that students can (are not required to) upload.
  • file-patterns defines list of file names that can include wildcard patterns and therefore allow a range of different names. Exactly one file must be provided to match each pattern.
  • optional-file-patterns defines another list of wildcard patterns that can include wildcards. For each pattern, any number of files may be uploaded.
A single pl-file-upload element can use any combination of mandatory and optional file names and patterns. For example, the following element requires the upload of a Python file named "solution.py" and 2 additional Python files, and also allows an optional "explanation.txt" file and arbitrarily many additional Python files to be uploaded.
Files

Patterns can be repeated as shown above, but we strongly discourage the use of overlapping patterns in the same attribute. Please refer to the documentation for a more detailed explanation on how the different file lists interact.

Note that we use multiple pl-file-upload elements here for illustrative purposes, but that using more than one for real questions is not recommended.

Correct answer

Student view placeholder

In student views this area is used for assessment and score info.
Tools

Staff information

Question

Title:
Element pl-file-upload: upload a file

Variant

Started at:
2026-08-04 22:47:53 (CDT)
Duration:
0s
Show/Hide answer
{}
History
dec frac
rad deg