Browse Source

Fix: creating new object

MOODLE_20_STABLE
bdaloukas 12 years ago
parent
commit
4da1b966e8
  1. 1
      lib.php

1
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)); $numattempts = $DB->count_records('game_attempts', array('gameid'=> $game->id, 'preview'=>0));
if ($numattempts || $returnzero) { if ($numattempts || $returnzero) {
if (groups_get_activity_groupmode($cm)) { if (groups_get_activity_groupmode($cm)) {
$a = new stdClass();
$a->total = $numattempts; $a->total = $numattempts;
if ($currentgroup) { if ($currentgroup) {
$a->group = $DB->count_records_sql('SELECT count(1) FROM ' . $a->group = $DB->count_records_sql('SELECT count(1) FROM ' .

Loading…
Cancel
Save