Installation¶
1. Installing the plugin¶
Copy (or clone) this repository’s contents to
<moodle_root>/admin/tool/painelava/.Visit Site administration in Moodle — the database upgrade runs automatically (it runs
db/install.php, which creates thetool_painelava_loggingtable and the Painel AVA category course custom fields — see Custom data and fields).
2. Configuring the plugin¶
In Site administration → Plugins → Admin tools → Painel AVA
(admin/tool/painelava/settings.php), configure:
Setting |
Internal key |
Description |
|---|---|---|
Auth token |
|
Token that the Painel AVA must send in the |
Painel AVA URL |
|
Base URL of the Painel AVA (default |
Course custom field: Sala Tipo |
|
Described on the settings screen as the field used to identify the course’s room type
(default |
Warning
settings.php/adminlib.php only expose these three settings in the admin interface.
However, much of the code in classes/external/get_user_courses.php reads additional
settings that do not exist on any screen — coursetypefield, enablelogging,
prefix_fic, prefix_coordenacao, prefix_laboratorio, prefix_modelo and
prefix_diario (see Web service API). Without a UI to set them, these settings only
take effect if manually inserted into Moodle’s config_plugins table
(plugin = 'tool_painelava'); otherwise the code uses the built-in default values (for
example, coursetypefield falls back to 'tipo_curso' — note that this name does not
match the course_custom_field_sala_tipo key exposed on the screen, meaning the setting
visible in the admin interface is not, in fact, the one consulted by the custom-field
classification).
3. Capabilities¶
Capability |
Default roles |
Purpose |
|---|---|---|
|
|
Access to the Painel AVA administrative area in Moodle. |
|
|
Allows querying, via |
Grant tool/painelava:viewothercourses only to strictly necessary roles — see also
SECURITY.md in the repository.
4. Testing access¶
The web service function
tool_painelava_get_user_coursesis available to any enabled web service that includes it (it is registered, among others, in Moodle’s official mobile service — see Web service API).The HTTP endpoints in
api/require theAuthentication: Token <configured auth_token>header on every call — see the example inrequests.httpand the details in HTTP API.
Note
Unlike authentication plugins (such as auth_suap), tool_painelava does not define a
login screen or an OAuth2 flow — all integration happens via HTTP calls made by the Painel
AVA (external application) to Moodle.