mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 10:26:40 +02:00
Merge branch 'MDL-30677' of git://github.com/timhunt/moodle
This commit is contained in:
commit
746e7c4a5e
1 changed files with 2 additions and 2 deletions
|
@ -1447,7 +1447,7 @@ function quiz_num_attempt_summary($quiz, $cm, $returnzero = false, $currentgroup
|
|||
if (groups_get_activity_groupmode($cm)) {
|
||||
$a->total = $numattempts;
|
||||
if ($currentgroup) {
|
||||
$a->group = $DB->count_records_sql('SELECT count(1) FROM ' .
|
||||
$a->group = $DB->count_records_sql('SELECT COUNT(DISTINCT qa.id) FROM ' .
|
||||
'{quiz_attempts} qa JOIN ' .
|
||||
'{groups_members} gm ON qa.userid = gm.userid ' .
|
||||
'WHERE quiz = ? AND preview = 0 AND groupid = ?',
|
||||
|
@ -1455,7 +1455,7 @@ function quiz_num_attempt_summary($quiz, $cm, $returnzero = false, $currentgroup
|
|||
return get_string('attemptsnumthisgroup', 'quiz', $a);
|
||||
} else if ($groups = groups_get_all_groups($cm->course, $USER->id, $cm->groupingid)) {
|
||||
list($usql, $params) = $DB->get_in_or_equal(array_keys($groups));
|
||||
$a->group = $DB->count_records_sql('SELECT count(1) FROM ' .
|
||||
$a->group = $DB->count_records_sql('SELECT COUNT(DISTINCT qa.id) FROM ' .
|
||||
'{quiz_attempts} qa JOIN ' .
|
||||
'{groups_members} gm ON qa.userid = gm.userid ' .
|
||||
'WHERE quiz = ? AND preview = 0 AND ' .
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue