mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 09:56:38 +02:00
"MDL-19037, use getremoteaddr to get remote ip address"
This commit is contained in:
parent
224eccbfe2
commit
b8aa76c1a4
5 changed files with 5 additions and 5 deletions
|
@ -58,7 +58,7 @@
|
|||
if (!hotpot_is_visible($cm)) {
|
||||
$error = get_string("activityiscurrentlyhidden");
|
||||
// check network address
|
||||
} else if ($hotpot->subnet && !address_in_subnet($_SERVER['REMOTE_ADDR'], $hotpot->subnet)) {
|
||||
} else if ($hotpot->subnet && !address_in_subnet(getremoteaddr(), $hotpot->subnet)) {
|
||||
$error = get_string("subneterror", "quiz");
|
||||
// check number of attempts
|
||||
} else if ($hotpot->attempts && $hotpot->attempts <= $DB->count_records_select('hotpot_attempts', 'hotpot=? AND userid=?', array($hotpot->id, $USER->id), 'COUNT(DISTINCT clickreportid)')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue