diff --git a/blog/lib.php b/blog/lib.php index 87a4e156037..6805978f954 100755 --- a/blog/lib.php +++ b/blog/lib.php @@ -680,4 +680,18 @@ $filtertype.'&filterselect='.$filterselect.'&'; } + + /** + * Returns a list of all user ids who have used blogs in the site + * Used in backup of site courses. + */ + function blog_get_participants() { + + global $CFG; + + return get_records_sql("SELECT userid as id + FROM {$CFG->prefix}post + WHERE module = 'blog' + AND courseid = 0"); + } ?>