Merge branch 'MDL-65993_master' of git://github.com/dmonllao/moodle

This commit is contained in:
Jun Pataleta 2019-08-21 19:32:03 +08:00
commit 2b29298f92

View File

@ -50,12 +50,11 @@ abstract class by_course extends base {
if (!empty($this->options['filter'])) {
$courses = array();
foreach ($this->options['filter'] as $courseid) {
$courses[$courseid] = new \stdClass();
$courses[$courseid]->id = $courseid;
$courses[$courseid] = intval($courseid);
}
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;
}