[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/mod/assign/feedback/editpdf/classes/ -> page_editor.php (summary)

This file contains the editor class for the assignfeedback_editpdf plugin

Copyright: 2012 Davo Smith
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 398 lines (14 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

page_editor:: (17 methods):
  get_comments()
  set_comments()
  get_comment()
  add_comment()
  remove_comment()
  get_annotations()
  set_annotations()
  get_annotation()
  unrelease_drafts()
  release_drafts()
  has_annotations_or_comments()
  revert_drafts()
  add_annotation()
  remove_annotation()
  copy_drafts_from_to()
  replace_files_from_to()
  delete_draft_content()


Class: page_editor  - X-Ref

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.

get_comments($gradeid, $pageno, $draft)   X-Ref
Get all comments for a page.

param: int $gradeid
param: int $pageno
param: bool $draft
return: comment[]

set_comments($gradeid, $pageno, $comments)   X-Ref
Set all comments for a page.

param: int $gradeid
param: int $pageno
param: comment[] $comments
return: int - the number of comments.

get_comment($commentid)   X-Ref
Get a single comment by id.

param: int $commentid
return: comment or false

add_comment(comment $comment)   X-Ref
Add a comment to a page.

param: comment $comment
return: bool

remove_comment($commentid)   X-Ref
Remove a comment from a page.

param: int $commentid
return: bool

get_annotations($gradeid, $pageno, $draft)   X-Ref
Get all annotations for a page.

param: int $gradeid
param: int $pageno
param: bool $draft
return: annotation[]

set_annotations($gradeid, $pageno, $annotations)   X-Ref
Set all annotations for a page.

param: int $gradeid
param: int $pageno
param: annotation[] $annotations
return: int - the number of annotations.

get_annotation($annotationid)   X-Ref
Get a single annotation by id.

param: int $annotationid
return: annotation or false

unrelease_drafts($gradeid)   X-Ref
Unrelease drafts

param: int $gradeid
return: bool

release_drafts($gradeid)   X-Ref
Release the draft comments and annotations to students.

param: int $gradeid
return: bool

has_annotations_or_comments($gradeid, $includedraft)   X-Ref
Has annotations or comments.

param: int $gradeid
return: bool

revert_drafts($gradeid)   X-Ref
Aborts all draft annotations and reverts to the last version released to students.

param: int $gradeid
return: bool

add_annotation(annotation $annotation)   X-Ref
Add a annotation to a page.

param: annotation $annotation
return: bool

remove_annotation($annotationid)   X-Ref
Remove a annotation from a page.

param: int $annotationid
return: bool

copy_drafts_from_to($assignment, $grade, $sourceuserid)   X-Ref
Copy annotations, comments, pages, and other required content from the source user to the current group member
being procssed when using applytoall.

param: int|\assign $assignment
param: stdClass $grade
param: int $sourceuserid
return: bool

replace_files_from_to($fs, $contextid, $sourceitemid, $itemid, $area, $includesubdirs = false)   X-Ref
Replace the area files in the specified area with those in the source item id.

param: \file_storage $fs The file storage class
param: int $contextid The ID of the context for the assignment.
param: int $sourceitemid The itemid to copy from - typically the source grade id.
param: int $itemid The itemid to copy to - typically the target grade id.
param: string $area The file storage area.
param: bool $includesubdirs Whether to copy the content of sub-directories too.

delete_draft_content($gradeid)   X-Ref
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.

param: int $gradeid The grade ID.
return: bool



Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1