German Version: Here
NOTE: In the current version, this plugin is only designed to work with the KIB3 Moodle Courses.
- Install the backend
- Clone this repository.
- Move the downloaded code into the following path relative to your Moodle server code top level directory:
./blocks/chatbot. I.e., the folder./blocks/chatbot/should contain the version information:version.php - Open your Moodle administration page in your web browser, this should trigger the plugin installation.
NOTE: for full assistant functionallity, we recommend also installing this plugin which allows searching through PDF content in the course using the assistant.
- Go to the administration settings, then navigate to
Plugins. - Click
Chatbot Pluginin the sectionBlocks. This should open the settings page (see screenshot below).
- Set
Server nameto the IP address or URL of the server hosting the Chatbot Backend Server. - If you are not running the Moodle Assistant as part of the docker setup, then set
Event Server Nameto the same value asServer name. Otherwise, ignore this setting - the default should work for the docker setup. - Only if you changed the default port of the
Chatbot Backend Serverin the python code, update theServer portsetting accordingly. Otherwise, leave at default value. - Leave
Chat Containerat the default value (if you run into problems with your theme later, you might want to change this setting). - Enable the Moodle Assistant for all Courses that you want it to appear in.
- Navigate to the administration settings, then navigate to
Server. - In the section
Web services, clickoverview. - Ensure that
Enable Web Servicesstatus isYes. - Ensure that
Enable protocolsstatus includesrest. - Click
Create a specific userwith the following attributes:Username:kib3_webservice, choose a password,First name:KIB3 Webservice,Last name:KIB3 Webservice, choose an email address and create the user.
- Navigate to the administration settings, then navigate to
Usersand in the sectionPermissions, clickDefine roles. - Click
Add a new role. - Select archetype:
MANAGERand continue. - Set
Short nametokib3webserviceandCustom full nametoKIB3 Webservice. Give a description. - Scroll down to the permissions, and allow
moodle/webservice:createtokenandwebservice/rest:use - Assign this role to the newly created user
kib3_webservice. - Navigate back to the webservices overview page.
- Click
Select a service. UnderneathCustom services, clickAdd. - Change
NameandShort Nametokib3_webservices. Make sure to tickEnabledandAuthorised users onlyand save.
- Navigate back to the webservices overview page, then click
Add functions. - Under the section
Custom services, click theFunctionslink in the row forkib3_webservices. - Click
Add functions, and add all functions starting withblock_chatbot_,block_booksearch_,mod_icecreamgame_(only if you installed the Icecreamgame Plugin ) and finally the 2 functionsmod_glossary_get_entries_by_searchandmod_glossary_get_glossaries_by_courses. - Navigate back to the webservices overview page, then click
Create a token for a user. - Select the
KIB3 Webserviceuser and thekib3_webservicesService, then save changes.
- Go to the frontpage of your Moodle site.
- Turn editing on
- Click "+ Add a block"
- Select
Chatbot - Once the block has been added, click the settings icon, and then
Configure. - Look for setting
Where this block appears, chooseAny Page. Don't worry, the assistant will only show up in courses selected in configuration step 7.
- Navigate to the KIB3 course in your moodle using your webbrowser.
- Make sure you are a student in the course.
- If the backend is running and everything is configured correctly, the chatbot window should show in the bottom right corner of the screen:
- If nothing shows up, check both the javascript console and the output of the chatbot backend server.


