[ Index ]

PHP Cross Reference of moodle-2.8

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: 377 lines (13 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

page_editor:: (16 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()
  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
This function copies annotations and comments from the source user
to the current group member being processed when using applytoall.

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

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: Fri Nov 28 20:29:05 2014 Cross-referenced by PHPXref 0.7.1