{"id":18457506,"url":"https://github.com/moodlebox/moodle-tool_moodlebox","last_synced_at":"2025-04-08T05:33:27.974Z","repository":{"id":10337979,"uuid":"58201827","full_name":"moodlebox/moodle-tool_moodlebox","owner":"moodlebox","description":"A Moodle plugin providing a GUI to the administration of a MoodleBox","archived":false,"fork":false,"pushed_at":"2025-01-13T19:09:30.000Z","size":4922,"stargazers_count":14,"open_issues_count":5,"forks_count":5,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-23T06:41:34.989Z","etag":null,"topics":["administration","moodle","moodle-plugin","moodlebox","raspberry","raspberry-pi","raspberrypi"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moodlebox.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":["https://moodlebox.net/give/","https://www.paypal.me/moodlebox/50"]}},"created_at":"2016-05-06T11:10:59.000Z","updated_at":"2025-01-13T19:04:50.000Z","dependencies_parsed_at":"2024-08-11T21:25:12.626Z","dependency_job_id":"73ab72bc-2154-4f83-a566-079729b57391","html_url":"https://github.com/moodlebox/moodle-tool_moodlebox","commit_stats":null,"previous_names":[],"tags_count":67,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moodlebox%2Fmoodle-tool_moodlebox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moodlebox%2Fmoodle-tool_moodlebox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moodlebox%2Fmoodle-tool_moodlebox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moodlebox%2Fmoodle-tool_moodlebox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moodlebox","download_url":"https://codeload.github.com/moodlebox/moodle-tool_moodlebox/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247785909,"owners_count":20995641,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["administration","moodle","moodle-plugin","moodlebox","raspberry","raspberry-pi","raspberrypi"],"created_at":"2024-11-06T08:14:33.732Z","updated_at":"2025-04-08T05:33:27.942Z","avatar_url":"https://github.com/moodlebox.png","language":"PHP","funding_links":["https://moodlebox.net/give/","https://www.paypal.me/moodlebox/50"],"categories":[],"sub_categories":[],"readme":"# MoodleBox Moodle plugin\n\n[![Build Status](https://github.com/moodlebox/moodlebox/workflows/CI/badge.svg)](https://github.com/moodlebox/moodle-tool_moodlebox/actions?query=workflow%3ACI)\n[![GitHub release](https://img.shields.io/github/release/moodlebox/moodle-tool_moodlebox.svg)](https://github.com/moodlebox/moodle-tool_moodlebox/releases/latest)\n[![GitHub Release Date](https://img.shields.io/github/release-date/moodlebox/moodle-tool_moodlebox.svg)](https://github.com/moodlebox/moodle-tool_moodlebox/releases/latest)\n[![GitHub last commit](https://img.shields.io/github/last-commit/moodlebox/moodle-tool_moodlebox.svg)](https://github.com/moodlebox/moodle-tool_moodlebox/commits/)\n\nA Moodle administration plugin providing a GUI to some settings and management of a [MoodleBox](https://moodlebox.net/), a Moodle server installed on a [Raspberry Pi](https://www.raspberrypi.org/).\n\nThis plugin enables a Moodle administrator to monitor some hardware settings, to set the date of the MoodleBox, to allow restart and shutdown of the MoodleBox and changing Raspberry Pi passwords using a GUI. After the installation in Moodle, some steps are required to complete on the Raspberry Pi (see below).\n\nAdministrators and users with manager role can moreover restart and shutdown the MoodleBox with buttons in the footer of each Moodle page.\n\nThe plugin is compatible with Moodle 3.6 or later. A Raspberry Pi model Zero 2 W, 3A+, 3B, 3B+, 4B or 5 is recommended.\n\n## Installation\n\nThe MoodleBox plugin must be installed in the Moodle tree of the MoodleBox, in the _tool_ folder. Once installed, an new option _MoodleBox_ will be available in Moodle, under _Site administration \u003e Server_ in the _Administration_ block.\n\nTo complete the installation, you have to configure some `direvent` jobs on the MoodleBox.\n\n1. Install `direvent` package:\n    ```bash\n    sudo apt-get install direvent\n    ```\n\n1. Add following lines to file `/etc/direvent.conf`:\n    ```bash\n    # This is the configuration file for direvent. Read\n    # direvent.conf(5) for more information about how to\n    # fill this file.\n\n    debug 0;\n\n    watcher {\n      path /var/www/moodle/admin/tool/moodlebox/;\n      file .reboot-server;\n      event CLOSE_WRITE;\n      command \"/sbin/shutdown -r now\";\n    }\n\n    watcher {\n      path /var/www/moodle/admin/tool/moodlebox/;\n      file .shutdown-server;\n      event CLOSE_WRITE;\n      command \"/sbin/shutdown -h now\";\n    }\n\n    watcher {\n      path /var/www/moodle/admin/tool/moodlebox/;\n      file .set-server-datetime;\n      event CLOSE_WRITE;\n      command \"/bin/bash /var/www/moodle/admin/tool/moodlebox/.set-server-datetime\";\n    }\n\n    watcher {\n      path /var/www/moodle/admin/tool/moodlebox/;\n      file .newpassword;\n      event CLOSE_WRITE;\n      command \"/bin/bash /var/www/moodle/admin/tool/moodlebox/bin/changepassword.sh\";\n    }\n\n    watcher {\n      path /var/www/moodle/admin/tool/moodlebox/;\n      file .wifisettings;\n      event CLOSE_WRITE;\n      command \"/usr/bin/python3 /var/www/moodle/admin/tool/moodlebox/bin/changewifisettings.py\";\n    }\n\n    watcher {\n      path /var/www/moodle/admin/tool/moodlebox/;\n      file .resize-partition;\n      event CLOSE_WRITE;\n      command \"/bin/bash /var/www/moodle/admin/tool/moodlebox/bin/resizepartition.sh\";\n    }\n    ```\n\n1. Copy the following line at the end of file `/etc/sudoers.d/020_www-data-nopasswd` (create it if it's not here):\n    ```bash\n    www-data ALL=(ALL) NOPASSWD:/sbin/parted /dev/mmcblk0 unit MB print free\n    www-data ALL=(ALL) NOPASSWD:/usr/bin/vcgencmd\n    ```\n\n1. If you use the [PiJuice module](https://github.com/PiSupply/PiJuice), you need to install the packages related\n    ```bash\n    sudo apt-get install pijuice-base\n    ```\n   then allow www-data to access I2C:\n    ```bash\n    sudo adduser www-data i2c\n    ```\n   and reboot.\n\n## Features\n\n- Info about the MoodleBox (kernel version, Raspberry Pi OS version, free space on SD card, CPU load, CPU temperature, CPU frequency, uptime, DHCP clients and more).\n- Warning when under voltage detected.\n- GUI to set the MoodleBox date and time.\n- GUI to set the MoodleBox password.\n- GUI to set the MoodleBox Wi-Fi settings: SSID and its visibility, regulatory country, channel, password (or remove password) and fixed IP address.\n- GUI to resize the partition of the SD card of the MoodleBox, when needed.\n- GUI to restart and shutdown the MoodleBox.\n\n## Availability\n\nThe code is available at [https://github.com/moodlebox/moodle-tool_moodlebox](https://github.com/moodlebox/moodle-tool_moodlebox).\n\n### Release notes\n\nSee [Release notes](https://github.com/moodlebox/moodle-tool_moodlebox/blob/master/CHANGELOG.md).\n\n## Thanks\n\n- To Patrick Lemaire (@patlemaire), for the migration of legacy libphp callbacks to Moodle hooks.\n- To Marcus Green (@marcusgreen), for helping implementing RPi 5 16GB support.\n- To Adrian Perez (@adpe), for the first implementation of restart and shutdown buttons in footer.\n- To Vincent Widmer (@smallhacks), for the implementation of PiJuice support.\n- To Visvanath Ratnaweera (@ratnavis), who kindly donated a Raspberry Pi 3A+ and loaned a Raspberry Pi 4 8GB, enabling support of these Raspberry Pi models.\n\n## License\n\nCopyright © 2016 onwards, Nicolas Martignoni \u003cnicolas@martignoni.net\u003e\n\n- All the source code is licensed under GPL 3 or any later version\n\nThis program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoodlebox%2Fmoodle-tool_moodlebox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoodlebox%2Fmoodle-tool_moodlebox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoodlebox%2Fmoodle-tool_moodlebox/lists"}