Moodle PHP Documentation 4.1
Moodle 4.1.11 (Build: 20240610) (c8c84b4af18)
comment_manager Class Reference

comment_manager is helper class to manage moodle comments in admin page (Reports->Comments) More...

Public Member Functions

 __construct ()
 Constructs the comment_manage object.
 
 delete_comment ($commentid)
 Delete a comment.
 
 delete_comments ($list)
 Delete comments.
 
moodle_database get_comments ($page)
 Return comments by pages.
 
 get_component_comments_since ($course, $context, $component, $since, $cm=null)
 Get comments created since a given time.
 
 print_comments ($page=0)
 Print comments.
 

Detailed Description

comment_manager is helper class to manage moodle comments in admin page (Reports->Comments)

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ delete_comment()

comment_manager::delete_comment ( $commentid)

Delete a comment.

Parameters
int$commentid
Return values
bool

◆ delete_comments()

comment_manager::delete_comments ( $list)

Delete comments.

Parameters
string$listA list of comment ids separated by hyphens
Return values
bool

◆ get_comments()

moodle_database comment_manager::get_comments ( $page)

Return comments by pages.

$DB

Parameters
int$page
Return values
arrayAn array of comments

◆ get_component_comments_since()

comment_manager::get_component_comments_since ( $course,
$context,
$component,
$since,
$cm = null )

Get comments created since a given time.

Parameters
stdClass$coursecourse object
stdClass$contextcontext object
string$componentcomponent name
int$sincethe time to check
stdClass$cmcourse module object
Return values
arraylist of comments db records since the given timelimit
Since
Moodle 3.2

◆ print_comments()

comment_manager::print_comments ( $page = 0)

Print comments.

Parameters
int$page
Return values
boolreturn false if no comments available

The documentation for this class was generated from the following file: