Permalink
Browse files

optimzed SQL query in hotpot_get_participants to return only user ids…

… (not whole user record)
  • Loading branch information...
1 parent dbddead commit 1a4969431c754b1824ce012c156d51e873a2af3a gbateson committed Jan 14, 2006
Showing with 2 additions and 2 deletions.
  1. +2 −2 mod/hotpot/lib.php
View
@@ -1123,15 +1123,15 @@ function hotpot_get_precision(&$hotpot) {
}
function hotpot_get_participants($hotpotid) {
-//Must return an array of user records (all data) who are participants
+//Must return an array of user ids who are participants
//for a given instance of hotpot. Must include every user involved
//in the instance, independient of his role (student, teacher, admin...)
//See other modules as example.
global $CFG;
return get_records_sql("
SELECT DISTINCT
- u.*
+ u.id, u.id
FROM
{$CFG->prefix}user u,
{$CFG->prefix}hotpot_attempts a

0 comments on commit 1a49694

Please sign in to comment.