|
Moodle PHP Documentation 4.4
Moodle 4.4.9+ (Build: 20250711) (4ea86454947)
|
This class is the mirror image of question_file_saver. More...
Public Member Functions | |
| __construct (question_attempt_step $step, $name, $value, $contextid) | |
| Constuctor. | |
| __toString () | |
| get_files () | |
| Get the files that were submitted. | |
| get_question_file_saver () | |
| Copy these files into a draft area, and return the corresponding question_file_saver that can save them again. | |
Protected Attributes | |
| int | $contextid |
| the context id that the files belong to. | |
| string | $name |
| the field name for these files - which is used to construct the file area name. | |
| question_attempt_step | $step |
| the step that these files belong to. | |
| string | $value |
| the value to stored in the question_attempt_step_data to represent these files. | |
This class is the mirror image of question_file_saver.
It allows files to be accessed again later (e.g. when re-grading) using that same API as when doing the original grading.
| question_file_loader::__construct | ( | question_attempt_step | $step, |
| $name, | |||
| $value, | |||
| $contextid ) |
Constuctor.
| question_attempt_step | $step | the step that these files belong to. |
| string | $name | string the field name for these files - which is used to construct the file area name. |
| string | $value | the value to stored in the question_attempt_step_data to represent these files. |
| int | $contextid | the context id that the files belong to. |
| question_file_loader::get_files | ( | ) |
Get the files that were submitted.
| array | of stored_files objects. |
Implements question_response_files.
| question_file_loader::get_question_file_saver | ( | ) |
Copy these files into a draft area, and return the corresponding question_file_saver that can save them again.
This is used by question_attempt::start_based_on(), which is used (for example) by the quizzes 'Each attempt builds on last' feature.
| question_file_saver | that can re-save these files again. |