diff --git a/lib.php b/lib.php index 94262d0..9aa9d28 100755 --- a/lib.php +++ b/lib.php @@ -733,6 +733,7 @@ function game_num_attempt_summary($game, $cm, $returnzero = false, $currentgroup $numattempts = $DB->count_records('game_attempts', array('gameid'=> $game->id, 'preview'=>0)); if ($numattempts || $returnzero) { if (groups_get_activity_groupmode($cm)) { + $a = new stdClass(); $a->total = $numattempts; if ($currentgroup) { $a->group = $DB->count_records_sql('SELECT count(1) FROM ' .