Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-38753 tweak count SQL to make stupid Oracle happy

  • Loading branch information...
commit b795853f5b9efec1afbffaa46ca1f19fb20dbf16 1 parent bd11908
@skodak skodak authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  enrol/externallib.php
View
2  enrol/externallib.php
@@ -316,7 +316,7 @@ public static function get_users_courses($userid) {
}
list($enrolledsqlselect, $enrolledparams) = get_enrolled_sql($context);
- $enrolledsql = "SELECT COUNT(*) FROM ($enrolledsqlselect) AS enrolleduserids";
+ $enrolledsql = "SELECT COUNT('x') FROM ($enrolledsqlselect) enrolleduserids";
$enrolledusercount = $DB->count_records_sql($enrolledsql, $enrolledparams);
$result[] = array('id'=>$course->id, 'shortname'=>$course->shortname, 'fullname'=>$course->fullname, 'idnumber'=>$course->idnumber,'visible'=>$course->visible, 'enrolledusercount'=>$enrolledusercount);
Please sign in to comment.
Something went wrong with that request. Please try again.