Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
|
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. More... | |
static | add_comment (comment $comment) |
Add a comment to a page. More... | |
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. More... | |
static | delete_draft_content ($gradeid) |
Delete the draft annotations and comments. More... | |
static | get_annotation ($annotationid) |
Get a single annotation by id. More... | |
static | get_annotations ($gradeid, $pageno, $draft) |
Get all annotations for a page. More... | |
static | get_comment ($commentid) |
Get a single comment by id. More... | |
static | get_comments ($gradeid, $pageno, $draft) |
Get all comments for a page. More... | |
static | get_page_rotation ($gradeid, $pageno) |
Get Page Rotation Value. More... | |
static | has_annotations_or_comments ($gradeid, $includedraft) |
Has annotations or comments. More... | |
static | release_drafts ($gradeid) |
Release the draft comments and annotations to students. More... | |
static | remove_annotation ($annotationid) |
Remove a annotation from a page. More... | |
static | remove_comment ($commentid) |
Remove a comment from a page. More... | |
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. More... | |
static | revert_drafts ($gradeid) |
Aborts all draft annotations and reverts to the last version released to students. More... | |
static | set_annotations ($gradeid, $pageno, $annotations) |
Set all annotations for a page. More... | |
static | set_comments ($gradeid, $pageno, $comments) |
Set all comments for a page. More... | |
static | set_page_rotation ($gradeid, $pageno, $isrotated, $pathnamehash, $degree=0) |
Set page rotation value. More... | |
static | unrelease_drafts ($gradeid) |
Unrelease drafts. More... | |
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 |