mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
Merge branch 'wip-MDL-53443-fix' of git://github.com/marinaglancy/moodle
This commit is contained in:
commit
27cec47220
1 changed files with 1 additions and 5 deletions
|
@ -110,11 +110,7 @@ if (is_array($items)) {
|
|||
}
|
||||
|
||||
if ($courseitemfilter > 0) {
|
||||
$avgvalue = 'avg(value)';
|
||||
if ($DB->get_dbfamily() == 'postgres') { // TODO: this should be moved to standard sql DML function ;-)
|
||||
$avgvalue = 'avg(cast (value as integer))';
|
||||
}
|
||||
|
||||
$avgvalue = 'avg(' . $DB->sql_cast_char2int('value', true) . ')';
|
||||
$sql = "SELECT fv.course_id, c.shortname, $avgvalue AS avgvalue
|
||||
FROM {feedback_value} fv, {course} c, {feedback_item} fi
|
||||
WHERE fv.course_id = c.id AND fi.id = fv.item AND fi.typ = ? AND fv.item = ?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue