|
Moodle
2.2.1
http://www.collinsharper.com
|
Public Member Functions | |
| __construct ($draftitemid, $component, $filearea, $text=null) | |
| __toString () | |
| save_files ($itemid, $context) | |
Protected Member Functions | |
| compute_value ($draftitemid, $text) | |
Protected Attributes | |
| $draftitemid | |
| $component | |
| $filearea | |
| $value = null | |
This class represents the promise to save some files from a particular draft file area into a particular file area. It is used beause the necessary information about what to save is to hand in the question_attempt::process_response_files() method, but we don't know if this question attempt will actually be saved in the database until later, when the question_engine_unit_of_work is saved, if it is.
Definition at line 1228 of file datalib.php.
| __construct | ( | $ | draftitemid, |
| $ | component, | ||
| $ | filearea, | ||
| $ | text = null |
||
| ) |
Constuctor.
| int | $draftitemid | the draft area to save the files from. |
| string | $component | the component for the file area to save into. |
| string | $filearea | the name of the file area to save into. |
Definition at line 1248 of file datalib.php.

| __toString | ( | ) |
Definition at line 1296 of file datalib.php.
| compute_value | ( | $ | draftitemid, |
| $ | text | ||
| ) | [protected] |
Compute the value that should be stored in the question_attempt_step_data table. Contains a hash that (almost) uniquely encodes all the files.
| int | $draftitemid | the draft file area itemid. |
| string | $text | optional content containing file links. |
Definition at line 1261 of file datalib.php.


| save_files | ( | $ | itemid, |
| $ | context | ||
| ) |
Actually save the files.
| integer | $itemid | the item id for the file area to save into. |
Definition at line 1304 of file datalib.php.

$component [protected] |
Definition at line 1232 of file datalib.php.
$draftitemid [protected] |
Definition at line 1230 of file datalib.php.
$filearea [protected] |
Definition at line 1234 of file datalib.php.
$value = null [protected] |
Definition at line 1240 of file datalib.php.