Supporting each other

Community forums

Welcome, Guest
Username: Password: Remember me
Questions on getting Xerte Toolkits installed on your server and questions about authentication and user logins.
  • Page:
  • 1

TOPIC:

Getting Moodle integration working 3 years 8 months ago #7258

  • robb
  • robb's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 54
  • Thank you received: 3
I have read similar topics in these forums, but it's still unclear for me how to configure the Moodle integration.
Let me give a description of my install:
I am running Moodle 3.4 with an mariadb database on a CentOS7 (NethServer) server.
Moodle is installed in /var/www/moodle/
Moodle is reachable at domain.tld/moodle
This makes the path to moodle: /var/www/moodle/config.php
Moodle gets it's users from Samba4 AD accountprovider running in a linux container. This works fine: I can log into Moodle with any Samba4 account.

On the same server I have installed Xerte 3.9 in /var/www/xerte/
Xerte is reachable under domain.tld/xerte
domain.tld has a valid LE certificate so https is working ok too.
When I set the authentication to guest, all works fine.
When I set authentication to Db and create a user in the xerte mariadb, this works fine too.

If I want to use Moodle auth, what do I have to set where exactly?
I put the path to moodle config.php in management page, save and refresh, I don't get a Moodle login screen.

Since I use Samba4 users, would it make any difference if I just use Samba4 authentication? Do I lose any integration options with Moodle?

After I hit save to use Moodle auth, and refresh I get a: Error: Database connection failed
I probably miss an essential step.

Any pointer is highly appreciated

/edit: What /where can I edit something to revert to Db auth? If this is a commandline option, can you please give an example? (I have root SSH access)

Please Log in or Create an account to join the conversation.

Last edit: by robb.

Getting Moodle integration working 3 years 8 months ago #7260

  • tom
  • tom's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 1283
  • Thank you received: 323
The best way to set up Moodle Integration, involves 3 steps

1. Install xerte within the moodle file structure (optional, but strongly recommended). This is needed to be automatically redirected to the Moodle login page
2. Set the moodle config path in the management page (Server settings->The integration config path is)
3. Set authentication to Moodle in management.php (Authentication)

In your case you could also choose to use LDAP authentication to the Samba AD directly. There will be no difference in the integration.
The following user(s) said Thank You: robb

Please Log in or Create an account to join the conversation.

Getting Moodle integration working 3 years 8 months ago #7261

  • robb
  • robb's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 54
  • Thank you received: 3
@tom thanks you for the directions. I chose to use LDAP authentication which works flawlessly.
For anyone that needs the settings:
Note: these are settigns for Samba4 AD accountprovider. They probably work for Windows AD too. Maybe you need sAMAccountName as mainfilter.
Log in management.php ([yourxerte url]/management.php) with your xerte admin account.
find LDAP settings and click 'show' button
ldap host: ldap;//[uri to your ldap server] or ldaps://[uri to your ldap server] uri is probably something like ad.domain.tld
ldap port: 389 (if you have set ldap to listen on another port, check your ldap config)
ldap password: [password of your ldap bind account]
ldap base: dc=[domain],dc=[tld] (start level that is used to query the ldap tree)
ldapbind: account in ldap that is used for ldap queries (probably something like: cn=ldapservice,cn=Users,dc=ad,dc=domain,dc=tld )
ldap main filter is: cn (if you want to log in with username only) or userPrincipalName (if you want to log in with This email address is being protected from spambots. You need JavaScript enabled to view it.)
ldap second filter is: I filled in cn (@Tom is this used in any way?)
Save the settings.
Now find authentication settigns and click 'show' button
set the dropdown menu to LDAP and click SAVE (top left)
Now log out management.php and you will be redirected to your xerte login.
Log in with an LDAP user to check if everything works as expected.

@tom: can you explain a bit the status of the different branches on github? Is the develop branch the latest stable? or do I need a different branch?
I ask because I would like to be able to access the source using curl or wget directly. IMO the need of being logged in the xerte website to be able to download the zip is creating too big of a hurdle.

Please Log in or Create an account to join the conversation.

Last edit: by robb.
  • Page:
  • 1
Time to create page: 0.048 seconds
Copyright © 2024 The Xerte Project.
Xerte logo Apereo logo OSI Logo

Search