From: gbateson Date: Thu, 7 Feb 2008 04:17:55 +0000 (+0000) Subject: MDL-13328 correct the counting of attempts when clickreporting has been enabled X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=2eb9cce68ebee9df4f0573c97a772598378498d0;p=moodle.git MDL-13328 correct the counting of attempts when clickreporting has been enabled --- diff --git a/mod/hotpot/view.php b/mod/hotpot/view.php index 84dd4f124c..c04afd7d93 100644 --- a/mod/hotpot/view.php +++ b/mod/hotpot/view.php @@ -61,7 +61,7 @@ } else if ($hotpot->subnet && !address_in_subnet($_SERVER['REMOTE_ADDR'], $hotpot->subnet)) { $error = get_string("subneterror", "quiz"); // check number of attempts - } else if ($hotpot->attempts && $hotpot->attempts <= count_records('hotpot_attempts', 'hotpot', $hotpot->id, 'userid', $USER->id)) { + } else if ($hotpot->attempts && $hotpot->attempts <= count_records_select('hotpot_attempts', 'hotpot='.$hotpot->id.' AND userid='.$USER->id, 'COUNT(DISTINCT clickreportid)')) { $error = get_string("nomoreattempts", "quiz"); // get password } else if ($hotpot->password && empty($hppassword)) {