mirror of
https://github.com/LdesignMedia/moodle-availability_ipaddress.git
synced 2026-05-16 21:41:28 +02:00
Update #86c46bd0u - Add language string depending on _not_ setting
This commit is contained in:
@@ -163,7 +163,10 @@ class condition extends \core_availability\condition {
|
|||||||
* @return string Information string (for admin) about all restrictions on this item
|
* @return string Information string (for admin) about all restrictions on this item
|
||||||
*/
|
*/
|
||||||
public function get_description($full, $not, info $info): string {
|
public function get_description($full, $not, info $info): string {
|
||||||
return get_string('require_condition', 'availability_ipaddress', getremoteaddr());
|
|
||||||
|
$desc = $not ? 'require_condition_not' : 'require_condition';
|
||||||
|
|
||||||
|
return get_string($desc, 'availability_ipaddress', getremoteaddr());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -31,7 +31,8 @@
|
|||||||
$string['pluginname'] = 'IP address';
|
$string['pluginname'] = 'IP address';
|
||||||
$string['description'] = 'Restrict access by ip-address or subnet';
|
$string['description'] = 'Restrict access by ip-address or subnet';
|
||||||
$string['title'] = 'IP address';
|
$string['title'] = 'IP address';
|
||||||
$string['require_condition'] = 'Matching ip-address/subnet. (Your IP:{$a})';
|
$string['require_condition'] = 'ip-address/subnet is allowed (Your IP:{$a})';
|
||||||
|
$string['require_condition_not'] = 'ip-address/subnet is not blocked (Your IP:{$a})';
|
||||||
|
|
||||||
// Errors.
|
// Errors.
|
||||||
$string['error_ipaddress'] = 'Incorrect ip-address/subnet format';
|
$string['error_ipaddress'] = 'Incorrect ip-address/subnet format';
|
||||||
|
|||||||
Reference in New Issue
Block a user