mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Fix for bug 2793: Unfinished quiz attempts no longer shown in the overview table.
This commit is contained in:
parent
45daee10f3
commit
c2bf38fd9b
@ -161,7 +161,7 @@ class quiz_report extends quiz_default_report {
|
||||
$sql = 'FROM '.$CFG->prefix.'user u '.
|
||||
'LEFT JOIN '.$CFG->prefix.'quiz_attempts qa ON u.id = qa.userid '.
|
||||
'LEFT JOIN '.$CFG->prefix.'quiz_responses qr ON qr.attempt = qa.id '.
|
||||
'WHERE '.$where.'u.id IN ('.implode(',', array_keys($users)).') AND ('.($noattempts ? sql_isnull('qa.quiz').' OR ' : '') . 'qa.quiz = '.$quiz->id.') ';
|
||||
'WHERE '.$where.'u.id IN ('.implode(',', array_keys($users)).') AND qa.timefinish != 0 AND ('.($noattempts ? sql_isnull('qa.quiz').' OR ' : '') . 'qa.quiz = '.$quiz->id.') ';
|
||||
|
||||
$total = count_records_sql('SELECT COUNT(DISTINCT('.$db->Concat('u.id', '\'#\'', $db->IfNull('qa.attempt', '0')).')) '.$sql);
|
||||
$table->pagesize(10, $total);
|
||||
|
Loading…
x
Reference in New Issue
Block a user