mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
MDL-35538 forum: take rid of forum_get_separate_modules()
100% incorrect function and not used in codebase at all.
This commit is contained in:
parent
a3ab18c735
commit
ed4f7cccc3
@ -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