mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
Merge branch 'MDL-35538' of git://github.com/stronk7/moodle
This commit is contained in:
commit
67d5121d9b
@ -7005,27 +7005,6 @@ function forum_get_post_actions() {
|
||||
return array('add discussion','add post','delete discussion','delete post','move discussion','prune post','update post');
|
||||
}
|
||||
|
||||
/**
|
||||
* this function returns all the separate forum ids, given a courseid
|
||||
*
|
||||
* @global object
|
||||
* @global object
|
||||
* @param int $courseid
|
||||
* @return array
|
||||
*/
|
||||
function forum_get_separate_modules($courseid) {
|
||||
|
||||
global $CFG,$DB;
|
||||
$forummodule = $DB->get_record("modules", array("name" => "forum"));
|
||||
|
||||
$sql = 'SELECT f.id, f.id FROM {forum} f, {course_modules} cm WHERE
|
||||
f.id = cm.instance AND cm.module =? AND cm.visible = 1 AND cm.course = ?
|
||||
AND cm.groupmode ='.SEPARATEGROUPS;
|
||||
|
||||
return $DB->get_records_sql($sql, array($forummodule->id, $courseid));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @global object
|
||||
* @global object
|
||||
|
Loading…
x
Reference in New Issue
Block a user