The combined_document class for the assignfeedback_editpdf plugin.
More...
|
const | STATUS_COMPLETE = 2 |
| Status value representing a successful conversion.
|
|
const | STATUS_FAILED = -1 |
| Status value representing a permanent error.
|
|
const | STATUS_PENDING_INPUT = 0 |
| Status value representing a conversion waiting to start.
|
|
const | STATUS_READY = 1 |
| Status value representing all documents ready to be combined.
|
|
const | STATUS_READY_PARTIAL = 3 |
| Status value representing all documents are ready to be combined as are supported.
|
|
|
| $combinationstatus = null |
| The combination status.
|
|
| $combinedfile |
| The resultant combined file.
|
|
| $pagecount = 0 |
| The number of pages in the combined PDF.
|
|
| $sourcefiles = [] |
| The list of files which make this document.
|
|
◆ add_source_file()
assignfeedback_editpdf\combined_document::add_source_file |
( |
| $file | ) |
|
Add an additional source file to the end of the existing list.
- Parameters
-
stored_file | conversion | $file | The file to add to the end of the list. |
- Return values
-
◆ combine_files()
assignfeedback_editpdf\combined_document::combine_files |
( |
| $contextid, |
|
|
| $itemid ) |
Combine all source files into a single PDF and store it in the file_storage API using the supplied contextid and itemid.
- Parameters
-
int | $contextid | The contextid for the file to be stored under |
int | $itemid | The itemid for the file to be stored under |
- Return values
-
◆ get_combined_file()
assignfeedback_editpdf\combined_document::get_combined_file |
( |
| ) |
|
Retrieve the completed combined file.
- Return values
-
◆ get_document_count()
assignfeedback_editpdf\combined_document::get_document_count |
( |
| ) |
|
Get the total number of documents to be combined.
- Return values
-
◆ get_page_count()
assignfeedback_editpdf\combined_document::get_page_count |
( |
| ) |
|
Get the total number of pages in the combined document.
If there are no pages, or it is not yet possible to count them a value of 0 is returned.
- Return values
-
◆ get_source_files()
assignfeedback_editpdf\combined_document::get_source_files |
( |
| ) |
|
Retrieve the complete list of source files.
- Return values
-
◆ get_status()
assignfeedback_editpdf\combined_document::get_status |
( |
| ) |
|
Check the current status of the document combination.
Note that the combined document may not contain all the source files if some of the source files were not able to be converted. An example is an audio file with a pdf cover sheet. Only the cover sheet will be included in the combined document.
- Return values
-
◆ get_stored_file_record()
assignfeedback_editpdf\combined_document::get_stored_file_record |
( |
| $contextid, |
|
|
| $itemid, |
|
|
| $partial = false ) |
|
protected |
Helper to fetch the stored_file record.
- Parameters
-
int | $contextid | The contextid for the file to be stored under |
int | $itemid | The itemid for the file to be stored under |
boolean | $partial | The combined file contains only some of the source files. |
- Return values
-
◆ is_partial_conversion()
assignfeedback_editpdf\combined_document::is_partial_conversion |
( |
| ) |
|
Return true of the combined file contained only some of the submission files.
- Return values
-
◆ mark_combination_failed()
assignfeedback_editpdf\combined_document::mark_combination_failed |
( |
| ) |
|
|
protected |
Mark the combination attempt as having encountered a permanent failure.
- Return values
-
◆ refresh_files()
assignfeedback_editpdf\combined_document::refresh_files |
( |
| ) |
|
Refresh the files.
This includes polling any pending conversions to see if they are complete.
- Return values
-
◆ set_combined_file()
assignfeedback_editpdf\combined_document::set_combined_file |
( |
| $file | ) |
|
Set the completed combined file.
- Parameters
-
stored_file | $file | The completed document for all files to be combined. |
- Return values
-
◆ set_source_files()
assignfeedback_editpdf\combined_document::set_source_files |
( |
| $files | ) |
|
Set all source files which are to be combined.
- Parameters
-
stored_file | conversion[] | $files | The complete list of all source files to be combined. |
- Return values
-
◆ store_combined_file()
assignfeedback_editpdf\combined_document::store_combined_file |
( |
| $tmpfile, |
|
|
| $contextid, |
|
|
| $itemid, |
|
|
| $partial = false ) |
|
protected |
Store the combined file in the file_storage API.
- Parameters
-
string | $tmpfile | The path to the file on disk to be stored. |
int | $contextid | The contextid for the file to be stored under |
int | $itemid | The itemid for the file to be stored under |
boolean | $partial | The combined pdf contains only some of the source files. |
- Return values
-
◆ store_empty_document()
assignfeedback_editpdf\combined_document::store_empty_document |
( |
| $contextid, |
|
|
| $itemid ) |
|
protected |
Store the empty document file in the file_storage API.
- Parameters
-
int | $contextid | The contextid for the file to be stored under |
int | $itemid | The itemid for the file to be stored under |
- Return values
-
The documentation for this class was generated from the following file:
- mod/assign/feedback/editpdf/classes/combined_document.php