MDL-64588 comment: Return whether the user can post in a comments area
This commit is contained in:
committed by
Jake Dallimore
parent
9528b1ff5b
commit
2234b6c9dc
@@ -131,6 +131,7 @@ class core_comment_external extends external_api {
|
||||
'comments' => $comments,
|
||||
'count' => $commentobject->count(),
|
||||
'perpage' => (!empty($CFG->commentsperpage)) ? $CFG->commentsperpage : 15,
|
||||
'canpost' => $commentobject->can_post(),
|
||||
'warnings' => $warnings
|
||||
);
|
||||
return $results;
|
||||
@@ -164,6 +165,7 @@ class core_comment_external extends external_api {
|
||||
),
|
||||
'count' => new external_value(PARAM_INT, 'Total number of comments.', VALUE_OPTIONAL),
|
||||
'perpage' => new external_value(PARAM_INT, 'Number of comments per page.', VALUE_OPTIONAL),
|
||||
'canpost' => new external_value(PARAM_BOOL, 'Whether the user can post in this comment area.', VALUE_OPTIONAL),
|
||||
'warnings' => new external_warnings()
|
||||
)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user