Merge branch 'w14_MDL-38753_m25_ocicount' of git://github.com/skodak/moodle
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 9 Apr 2013 00:25:12 +0000 (02:25 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 9 Apr 2013 00:25:12 +0000 (02:25 +0200)
enrol/externallib.php

index 0a93c90..6a20279 100644 (file)
@@ -316,7 +316,7 @@ class core_enrol_external extends external_api {
             }
 
             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);