MDL-12829 Applied the sql fix

This commit is contained in:
nicolasconnault 2008-01-04 06:49:30 +00:00
parent bbc275c142
commit df270d4c74

View File

@ -269,9 +269,9 @@ function quiz_get_user_grades($quiz, $userid=0) {
$user = $userid ? "AND u.id = $userid" : "";
$sql = "SELECT u.id, u.id AS userid, g.grade AS rawgrade, g.timemodified AS dategraded, MAX(a.timefinish) AS datesubmitted
FROM {$CFG->prefix}user u, {$CFG->prefix}quiz_grades g, {$CFG->prefix}quiz_attempts a
FROM {$CFG->prefix}user u, {$CFG->prefix}quiz_grades g, {$CFG->prefix}quiz_attempts a
WHERE u.id = g.userid AND g.quiz = 8 AND u.id = a.userid AND a.quiz = {$quiz->id}
$user
$user
GROUP BY u.id, g.grade, g.timemodified";
return get_records_sql($sql);