Permalink
Browse files

MDL-38753 tweak count SQL to make stupid Oracle happy

  • Loading branch information...
1 parent 7d253e0 commit 0dec3392117ff625833b679a66709f4223bfe87c @skodak skodak committed Apr 8, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 enrol/externallib.php
View
@@ -87,7 +87,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);

0 comments on commit 0dec339

Please sign in to comment.