mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Merge branch 'MDL-65993_master' of git://github.com/dmonllao/moodle
This commit is contained in:
commit
2b29298f92
@ -50,12 +50,11 @@ abstract class by_course extends base {
|
|||||||
if (!empty($this->options['filter'])) {
|
if (!empty($this->options['filter'])) {
|
||||||
$courses = array();
|
$courses = array();
|
||||||
foreach ($this->options['filter'] as $courseid) {
|
foreach ($this->options['filter'] as $courseid) {
|
||||||
$courses[$courseid] = new \stdClass();
|
$courses[$courseid] = intval($courseid);
|
||||||
$courses[$courseid]->id = $courseid;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
list($coursesql, $courseparams) = $DB->get_in_or_equal($courses, SQL_PARAMS_NAMED);
|
list($coursesql, $courseparams) = $DB->get_in_or_equal($courses, SQL_PARAMS_NAMED);
|
||||||
$sql .= " AND c.id IN $coursesql";
|
$sql .= " AND c.id $coursesql";
|
||||||
$params = $params + $courseparams;
|
$params = $params + $courseparams;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user