MDL-14216 "change query to work on Postgres." - some adjustments to make it work on mysql again too.

This commit is contained in:
jamiesensei 2008-07-24 16:10:26 +00:00
parent 1e98b864e5
commit daae98e118

View file

@ -601,7 +601,7 @@ class quiz_overview_report extends quiz_default_report {
if ($attemptids){ if ($attemptids){
//make sure we fetch all attempts for users to calculate grade. //make sure we fetch all attempts for users to calculate grade.
//not just those that have changed. //not just those that have changed.
$sql = "SELECT qa2.* FROM {quiz_attempts} qa2 WHERE qa2.userid IN (SELECT DISTINCT userid FROM {quiz_attempts} qa WHERE $attemptsql)"; $sql = "SELECT qa2.* FROM {quiz_attempts} qa2 WHERE qa2.userid IN (SELECT DISTINCT userid FROM {quiz_attempts} WHERE $attemptsql)";
} else { } else {
$sql = "SELECT * FROM {quiz_attempts} WHERE $attemptsql"; $sql = "SELECT * FROM {quiz_attempts} WHERE $attemptsql";
} }