MWY5YjFkYTU1MWM1OTJhYjViMGFmZTdkZTM5NGI3ZjIzZDEzYTU4N2EyNzFhM2RjZjIyN2ViNmQzNWNkZDU0Mg.msfhd9c7.eyJ1cmwiOiIvcGwvY291cnNlX2luc3RhbmNlLzIvaW5zdGFuY2VfcXVlc3Rpb24vMTg2LyIsImF1dGhuX3VzZXJfaWQiOiIxIn0
Skip to main content Accessibility guide
PrairieLearn Go home
  • XC 101, SectionA
  • Assessments
  • Gradebook
  • C4
Load from disk
  • Dev User student
    View type
    ✓ Staff view staff ✓ Student view student ✓ Student view without access restrictions student
    Effective user
    Customize…
    Course Requests Settings Log out

Regenerate assessment instance

Warning: Regenerating the assessment instance will select a new set of questions from this assessment. Any progress on the current assessment instance will be lost.

Are you sure you want to regenerate the assessment instance?

Course staff: Regenerate your assessment instance to pick up changes to the assessment or to get a fresh set of questions.

C4.22. 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

Collection 4

Assessment overview
Total points: 0/360
Score:
0%

Question C4.22

Total points: — /2
Manually-graded question

This form is only for reporting errors in the question itself. Do not use this form if you just don't know how to answer the question.

Previous question Next question

 Personal Notes

No attached notes

Attached files will be saved here for your reference. These files act as personal notes and can be used for your own review purposes. They are not used for grading.

Max file size: 10 MB

Attached personal notes will be saved here for your reference. These notes can be used for your own review purposes. They are not used for grading.

Staff information

Student details

Dev User
dev@example.com

Question

QID:
element/fileUpload
Title:
Element pl-file-upload: upload a file

Variant

Started at:
2026-08-04 16:38:07 (CDT)
Duration:
0s
Show/Hide answer
{}

Assessment instance

Assessment:
gallery/elements
Started at:
2026-08-04 16:37:17 (CDT)
Duration:
0s
View log
This box is not visible to students.