From: stronk7 Date: Sun, 13 Apr 2008 01:17:30 +0000 (+0000) Subject: Preparing for blogs backup. Helper function. MDL-9089 ; merged from 19_STABLE X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=240075cd7f1189dcea1db782007dc41c53f8ed71;p=moodle.git Preparing for blogs backup. Helper function. MDL-9089 ; merged from 19_STABLE --- diff --git a/blog/lib.php b/blog/lib.php index 87a4e15603..6805978f95 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"); + } ?>