Moodle Plugins directory: WebUntis Integration | Moodle.org

WebUntis Integration
local_webuntis
This plugins allows a connection between Moodle and WebUntis Instances of https://webuntis.com.
About this plugin
This plugin allows an integration of Moodle with WebUntis. The core features are:
- User mapping
- User creation based on WebUntis profile data *)
- Mapping of courses for particular links inside WebUntis (main menu and lesson pages)
- Automatic user enrolment to courses (can be disabled in sitewide in Moodle administration or for particular courses)
- For admins: List of user mappings
Using this plugin
To use this plugin, you need at least on WebUntis instance and a running Moodle site.
At first, login to your WebUntis instance as Administrator and add the Moodle "platform". As soon as you save the platform, oAuth credentials are transferred from WebUntis to your Moodle-Instance in the background. You can check these in the Website-Configuration of local_webuntis under the page "tenants". Also, if for any reason the automatic creation of the tenant does not work, you can create the tenant manually on this page.
Follow the required steps within WebUntis to add the platform to the various navigation nodes in WebUntis for each user role. When you're done, links to your Moodle site are shown in the main menu of WebUntis and on each lesson page. When a user clicks on such link for the first time, a mapping of user accounts is required (also for the WebUntis-Administrator!)
User mapping
Users can now choose to map an existing Moodle account, or create a new one*). Once this user map has been created, the user is automatically logged in each time. This user mapping can be disconnected by the user using the Button "Disconnect from webuntis" in the Moodle main menu.Attention: When external login systems like oAuth are used, the login procedure opens in a new tab. This is due to the reason, that these don't allow to be embedded in an iframe. Due to technical reasons, the browser must not be run in private mode! After the user was mapped, everything runs fine within the iframe.
Tenant specific administration
Using the link to the Moodle on the main menu of WebUntis, the WebUntis-Administrator can choose a target course, and open particular settings regarding the behavior of the sync between WebUntis and Moodle. Using the trigger "Enrolment" it can be decided, if users are automatically enrolled to the course(s), when they open the link in WebUntis. Attention: this feature can be disabled globally using the Moodle site administration.
At the "settings" page the WebUntis-Administrator can configure options regarding the particular Webuntis tenant. The option regarding the creation of user accounts based on WebUntis profile data must be enabled in the Moodle Website-Administration and on this page too for each WebUntis tenant. This ensures that the consent was given by the Moodle Administrator and the WebUntis Administrator as well. The mapping of user roles as shown on the following screenshot only applies to Moodle sites that use the "eduvidual"-Plugin. This plugin allows to manage several organisations within one Moodle site with separated managements. The user role of WebUntis can be mapped to each organization individually. Moodle sites that don't use eduvidual, simply do not show this option.
Lastly, the WebUntis Administrator can view a list of actual user mappings.
Future versions of this plugin may provide an option for user synchronisation, management of the user mapping by the Administrator, or bulk creation of user accounts.
Lesson specific configuration
The target course of lesson pages can be selected by Teachers and Administrators. The functionality is the same as with the main menu link. Using the trigger "Enrolment" it can be decided, if users are automatically enrolled to the course(s), when they open the link in WebUntis. Attention: this feature can be disabled globally using the Moodle site administration.
------------------------------------
*) Can be disabled in the Moodle Website-Administration, and requires sufficient profile data in WebUntis!
das plugin klingt ja sehr interessant!
Ich habe das plugin in unserem schulmoodle installiert und der webuntis Kollege hat dann den entsprechenden link zum moodle konfiguriert.
Allerdings passiert nichts.
Wir sehen glaube ich gerade den Wald vor lauter Bäumen nicht.
Muss man irgendwas noch in moodle konfigurieren oder könnte etwas in moodle verstellt sein?
was genau bedeutet "der webuntis kollege hat dann den entsprechenden Link zum Moodle konfiguriert"? Man muss Moodle in WebUntis als Plattform hinzufügen. Dabei werden credentials an Moodle übermittelt. Man sollte in der Website-Administration unter Plugins / Lokale Plugins / WebUntis / Tenants eine Liste aufrufen können, in der diese Credentials zu sehen sind.
LG
Vielen Dank für die schnelle Rückmeldung!
Also ein Kollege zuständig für webuntis und ich für moodle. Also der webuntis Kollege hat die Anleitung befolgt die es in der untis Hilfe dazu gibt.
Er hat also Moodle in webuntis als Plattform hinzugefügt.
Aber in moodle kann ich unter
Plugins / Lokale Plugins / WebUntis / Tenants
Keine Zeile finden. Es klappt also nicht mit der Übergabe der credentials?
Die Pfade in moodle sollten passen.
Liegt in /var/www/moodle/local/webuntis/credentials.php
Die Rechte auf die Files sind 644. Muss da was angepasst werden oder sonst was in moodle aktiviert werden damit das klappt?
Es etwas schwierig mit der Abstimmung gerade da ich im Krankenstand bin...
Aber ich hoffte auf einen guten Hinweis was man da falsch machen kann ;)
In den logs hab ich jetzt mal folgendes gefunden:
...
213.208.138.146 - - [14/Jul/2022:21:11:05 +0200] "POST
/local/webuntis/credentials.php HTTP/1.1" 428 5879 "-"
"Apache-HttpClient/4.5.13 (Java/11.0.13)"
213.208.138.146 - - [14/Jul/2022:21:11:14 +0200] "POST
/login/index.php/local/webuntis/credentials.php HTTP/1.1" 200 10583
"-" "Apache-HttpClient/4.5.13 (
Java/11.0.13)"
95.117.83.155 - - [14/Jul/2022:21:11:31 +0200] "GET
/login/index.php/local/webuntis/index.php?tenant_id=xxxxxxxx&school=sbs-fachinformatik
HTTP/1.1" 200 10
257 "https://ajax.webuntis.com/" "Mozilla/5.0 (Windows NT 10.0; Win64;
x64; rv:102.0) Gecko/20100101 Firefox/102.0"
...
Ich bin mir nicht sicher was genau ich da jetzt sehe... Das eine ist die webuntis IP, aber da gibt es zwei POST versuche, einer mit Code 428 error und der andere mit 200 OK .
Die andere IP ist scheinbar irgendeine dynamische Telefonica IP. Da werden ja scheinbar wirklich credentials übergeben (die id habe ich mal mit xxxxxxx ersetzt), aber in moodle wird nichts eingetragen unter tenants.
Noch irgendwelche Tipps?
[Thu Jul 14 17:38:09.024438 2022] [php7:notice] [pid 17268] [client 213.208.138.146:46485] Verification of signature failed using public key of production
[Thu Jul 14 17:38:09.024554 2022] [php7:notice] [pid 17268] [client 213.208.138.146:46485] Verification of signature failed using public key of integration
Tiptop!
Also das war jetzt auch das einzige wo ich mir noch ein Problem vorstellen konnte. Hatte auch extra die Keys dem Kollegen geschickt zum Abgleichen...müssen wir wohl nochmal genau hinsehen.
Vielen Dank erstmal für die tolle Hilfe!
gibt es eine Möglichkeit die beiden public keys für Integration und Produktion selbst herauszufinden?
Es gibt scheinbar diese beiden Environments dafür...
https://help.untis.at/hc/de/articles/4403351094034
---
Environments
Stage WebUntis (WU_URL) External API Provider (EAP_URL)
Integration https://tom.integration.webuntis.dev/ https://api.integration.webuntis.dev/
Production https://{host}.webuntis.com/ https://api.webuntis.com/
---
Wenn ich von dort die Keys auslese und mit den in moodle hinterlegten vergleiche, passen keine zueinander!?
Wenn man allerdings die Datei /local/webuntis/classes/usermap.php editiert, kommt man einen Schritt weiter:
if (substr($_SERVER['PHP_SELF'],-31) != '/local/webuntis/landinguser.php')
Sollte gehen...
We use the Webuntis plugin in Moodle 4.4.3 and receive the following error message. Callback before_standard_html_head in local_webuntis component should be migrated to new hook callback for core\hook\output\before_standard_head_html_generation.
Is there a plan to update the plugin to Moodle 4.4?
Best regards
Friedhelm
currently there are no plans for further development of this plugin.
Best regards