Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
|
This class performs crud operations on comments and annotations from a page of a response. More...
Static Public Member Functions | |
static | add_annotation (annotation $annotation) |
Add a annotation to a page. | |
static | add_comment (comment $comment) |
Add a comment to a page. | |
static | copy_drafts_from_to ($assignment, $grade, $sourceuserid) |
Copy annotations, comments, pages, and other required content from the source user to the current group member being procssed when using applytoall. | |
static | delete_draft_content ($gradeid) |
Delete the draft annotations and comments. | |
static | get_annotation ($annotationid) |
Get a single annotation by id. | |
static | get_annotations ($gradeid, $pageno, $draft) |
Get all annotations for a page. | |
static | get_comment ($commentid) |
Get a single comment by id. | |
static | get_comments ($gradeid, $pageno, $draft) |
Get all comments for a page. | |
static | get_page_rotation ($gradeid, $pageno) |
Get Page Rotation Value. | |
static | has_annotations_or_comments ($gradeid, $includedraft) |
Has annotations or comments. | |
static | release_drafts ($gradeid) |
Release the draft comments and annotations to students. | |
static | remove_annotation ($annotationid) |
Remove a annotation from a page. | |
static | remove_comment ($commentid) |
Remove a comment from a page. | |
static | replace_files_from_to ($fs, $contextid, $sourceitemid, $itemid, $area, $includesubdirs=false) |
Replace the area files in the specified area with those in the source item id. | |
static | revert_drafts ($gradeid) |
Aborts all draft annotations and reverts to the last version released to students. | |
static | set_annotations ($gradeid, $pageno, $annotations) |
Set all annotations for a page. | |
static | set_comments ($gradeid, $pageno, $comments) |
Set all comments for a page. | |
static | set_page_rotation ($gradeid, $pageno, $isrotated, $pathnamehash, $degree=0) |
Set page rotation value. | |
static | unrelease_drafts ($gradeid) |
Unrelease drafts. | |
This class performs crud operations on comments and annotations from a page of a response.
No capability checks are done - they should be done by the calling class.
|
static |
Add a annotation to a page.
annotation | $annotation |
bool |
|
static |
Add a comment to a page.
comment | $comment |
bool |
|
static |
Copy annotations, comments, pages, and other required content from the source user to the current group member being procssed when using applytoall.
int | assign | $assignment | |
stdClass | $grade | |
int | $sourceuserid |
bool |
|
static |
Delete the draft annotations and comments.
This is intended to be used when the version of the PDF has changed and the annotations might not be relevant any more, therefore we should delete them.
int | $gradeid | The grade ID. |
bool |
|
static |
Get a single annotation by id.
int | $annotationid |
annotation | or false |
|
static |
Get all annotations for a page.
int | $gradeid | |
int | $pageno | |
bool | $draft |
annotation[] |
|
static |
Get a single comment by id.
int | $commentid |
comment | or false |
|
static |
Get all comments for a page.
int | $gradeid | |
int | $pageno | |
bool | $draft |
comment[] |
|
static |
Get Page Rotation Value.
int | $gradeid | grade id. |
int | $pageno | page number. |
mixed |
dml_exception |
|
static |
Has annotations or comments.
int | $gradeid |
bool |
|
static |
Release the draft comments and annotations to students.
int | $gradeid |
bool |
|
static |
Remove a annotation from a page.
int | $annotationid |
bool |
|
static |
Remove a comment from a page.
int | $commentid |
bool |
|
static |
Replace the area files in the specified area with those in the source item id.
file_storage | $fs | The file storage class |
int | $contextid | The ID of the context for the assignment. |
int | $sourceitemid | The itemid to copy from - typically the source grade id. |
int | $itemid | The itemid to copy to - typically the target grade id. |
string | $area | The file storage area. |
bool | $includesubdirs | Whether to copy the content of sub-directories too. |
|
static |
Aborts all draft annotations and reverts to the last version released to students.
int | $gradeid |
bool |
|
static |
Set all annotations for a page.
int | $gradeid | |
int | $pageno | |
annotation[] | $annotations |
int | - the number of annotations. |
|
static |
Set all comments for a page.
int | $gradeid | |
int | $pageno | |
comment[] | $comments |
int | - the number of comments. |
|
static |
Set page rotation value.
int | $gradeid | grade id. |
int | $pageno | page number. |
bool | $isrotated | whether the page is rotated or not. |
string | $pathnamehash | path name hash |
int | $degree | rotation degree. |
dml_exception |
|
static |
Unrelease drafts.
int | $gradeid |
bool |