Differences Between: [Versions 310 and 400] [Versions 39 and 400] [Versions 400 and 402] [Versions 400 and 403]
Functions and classes for comments management
Copyright: | 2010 Dongsheng Cai {@link http://dongsheng.org} |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 269 lines (10 kb) |
Included or required: | 0 times |
Referenced: | 1 time |
Includes or requires: | 0 files |
comment_manager:: (8 methods):
__construct()
get_comments()
setup_course()
setup_plugin()
print_comments()
delete_comment()
delete_comments()
get_component_comments_since()
Class: comment_manager - X-Ref
comment_manager is helper class to manage moodle comments in admin page (Reports->Comments)__construct() X-Ref |
Constructs the comment_manage object |
get_comments($page) X-Ref |
Return comments by pages return: array An array of comments param: int $page |
setup_course($courseid) X-Ref |
Records the course object param: int $courseid |
setup_plugin($comment) X-Ref |
Sets up the module or block information for a comment return: bool param: stdClass $comment |
print_comments($page = 0) X-Ref |
Print comments return: bool return false if no comments available param: int $page |
delete_comment($commentid) X-Ref |
Delete a comment return: bool param: int $commentid |
delete_comments($list) X-Ref |
Delete comments return: bool param: string $list A list of comment ids separated by hyphens |
get_component_comments_since($course, $context, $component, $since, $cm = null) X-Ref |
Get comments created since a given time. return: array list of comments db records since the given timelimit param: stdClass $course course object param: stdClass $context context object param: string $component component name param: int $since the time to check param: stdClass $cm course module object |