]> git.mjollnir.org Git - moodle.git/commitdiff
Preparing for blogs backup. Helper function. MDL-9089 ; merged from 19_STABLE
authorstronk7 <stronk7>
Sun, 13 Apr 2008 01:17:30 +0000 (01:17 +0000)
committerstronk7 <stronk7>
Sun, 13 Apr 2008 01:17:30 +0000 (01:17 +0000)
blog/lib.php

index 87a4e156037e7282b9edfb751a9707ac68277e05..6805978f9545aef9cc38f990c73c78e5df3d80a3 100755 (executable)
                 $filtertype.'&amp;filterselect='.$filterselect.'&amp;';
 
     }
+
+    /**
+     * 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");
+    }
 ?>