mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
MDL-13328 correct the counting of attempts when clickreporting has been enabled
This commit is contained in:
parent
8823667015
commit
c814ba2c1e
1 changed files with 1 additions and 1 deletions
|
@ -62,7 +62,7 @@
|
||||||
} else if ($hotpot->subnet && !address_in_subnet($_SERVER['REMOTE_ADDR'], $hotpot->subnet)) {
|
} else if ($hotpot->subnet && !address_in_subnet($_SERVER['REMOTE_ADDR'], $hotpot->subnet)) {
|
||||||
$error = get_string("subneterror", "quiz");
|
$error = get_string("subneterror", "quiz");
|
||||||
// check number of attempts
|
// 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");
|
$error = get_string("nomoreattempts", "quiz");
|
||||||
// get password
|
// get password
|
||||||
} else if ($hotpot->password && empty($hppassword)) {
|
} else if ($hotpot->password && empty($hppassword)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue