Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-13328 correct the counting of attempts when clickreporting has be…

…en enabled
  • Loading branch information...
commit d37502617edc8a12d333ef813a29dc1505c6f49f 1 parent a22772f
gbateson authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  mod/hotpot/view.php
View
2  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)) {
Please sign in to comment.
Something went wrong with that request. Please try again.