diff --git a/classes/local/utils.php b/classes/local/utils.php index 3a93eca..bf50ae4 100644 --- a/classes/local/utils.php +++ b/classes/local/utils.php @@ -375,8 +375,11 @@ public static function get_connected_ip_adresses($interface, $leasesfile) { // Find MAC and IP addresses in lease file, and get matching device name. if ($m = preg_grep('/^.*' . $macaddress . '\s' . $arpmacippairs[$macaddress] . '.*$/i', $leases)) { $name = explode(' ', reset($m))[3]; + if ( $name == '*') { + $name = get_string('hiddendhcpname', 'tool_moodlebox'); + } } else { - $name = '*'; + $name = get_string('unknowndhcpname', 'tool_moodlebox'); } $connecteddata[$macaddress] = [ 'ip' => $arpmacippairs[$macaddress], diff --git a/lang/en/tool_moodlebox.php b/lang/en/tool_moodlebox.php index 63af313..4f26c2b 100644 --- a/lang/en/tool_moodlebox.php +++ b/lang/en/tool_moodlebox.php @@ -39,7 +39,7 @@ $string['datetimesetmessage'] = 'The clock of the MoodleBox isn\'t on time. It\'s highly recommended to set the date and time to the current time.'; $string['datetimesetting'] = 'Date and time'; $string['defaultgateway'] = 'Default gateway'; -$string['dhcpclientinfo'] = 'Client IP and MAC addresses'; +$string['dhcpclientinfo'] = 'Client IP address, name and MAC address'; $string['dhcpclientnumber'] = 'number of clients'; $string['dhcpclients'] = 'DHCP clients'; $string['documentation'] = 'MoodleBox documentation'; @@ -50,6 +50,7 @@ $string['forum_desc'] = '

If you can\'t find an answer to your question in the MoodleBox documentation, search the MoodleBox support forum to see if your question has already been answered. Otherwise, feel free to open a new discussion.

'; $string['hardwareinfo'] = 'Hardware information'; $string['hidden'] = 'Hidden'; +$string['hiddendhcpname'] = ''; $string['infofileerror'] = 'Information not available'; $string['infoheading'] = 'MoodleBox support information'; $string['information'] = 'Information'; @@ -64,7 +65,7 @@ * Critical MoodleBox operation details, such as remaining disk space on the SD card and processor load, temperature and frequency * Current settings of Wi-Fi network supplied by the MoodleBox -* Number, IP and MAC addresses of all devices connected to the MoodleBox +* Number, IP address, name and MAC address of all devices connected to the MoodleBox * Raspberry Pi model and operating system * MoodleBox version and MoodleBox plugin version '; @@ -123,6 +124,7 @@ $string['systeminfo'] = 'System information'; $string['undervoltagedetected'] = '

Warning: under-voltage detected! The power supply of the MoodleBox is inadequate, which can cause various problems, for example a limitation of the number of Wi-Fi clients or even an unexpected shutdown of the device.

It is strongly recommended to change your power supply, giving preference to the official Raspberry Pi 12.5W Micro USB Power Supply for Raspberry Pi 3A+, 3B, 3B+ and Zero 2 W, or Raspberry Pi 15W USB-C Power Supply for Raspberry Pi 4B, or Raspberry Pi 27W USB-C Power Supply for Raspberry Pi 5.

'; $string['undervoltageoccurred'] = '

An under-voltage situation has occurred since last boot of the MoodleBox. This could indicate the power supply of the MoodleBox is inadequate, which can cause various problems, for example a limitation of the number of Wi-Fi clients or even an unexpected shutdown of the device.

It is strongly recommended to change your power supply, giving preference to the official Raspberry Pi 12.5W Micro USB Power Supply for Raspberry Pi 3A+, 3B, 3B+ and Zero 2 W, or Raspberry Pi 15W USB-C Power Supply for Raspberry Pi 4B, or Raspberry Pi 27W USB-C Power Supply for Raspberry Pi 5.

'; +$string['unknowndhcpname'] = ''; $string['unknownmodel'] = 'Unknown or unsupported Raspberry Pi model'; $string['unsupportedhardware'] = 'Unsupported server hardware detected! This plugin does only work on Raspberry Pi'; $string['uptime'] = 'System uptime';