Working on nethserver-moodle module

Welcome in the new world! :heart_eyes: Thanks for accepting my invite to jump into the action! :top:

I have only a blank page with this rpm, do I’m alone ???

got it in fact you must respect the url in /var/www/moodle/web/config.php

$CFG->wwwroot = ‘https://ns7dev2.mysomainname/moodle’;

this url wasn’t reachable on my network

$CFG->wwwroot = ‘https://$SystemName.$DomainName/moodle’;

1 Like

The default URL in /var/www/moodle/web/config.php was http://localhost/moodle and it didn’t work when I tried to access the application from a host other than localhost itself. So it was necessary to reconfigure the default URL to match the FQDN of the host which is accessible from remote hosts. In my testing infrastructure the HTTP service is accessible using the server FQDN from both red and green networks.

Another issue to note here is that the URL in config.php must be specified using https:// and not http://. Otherwise CSS and Javascripts aren’t loaded. In this case the application doesn’t work as expected. It seems the URL in config.php must match the schema used to call the application in first place. In our case, the one set by Moodle Box at NethServer Applications.

I guess the default Moodle configuration (as distributed by EPEL) was conceived to be prepared in localhost by the system administrator and later customized (by the system administrator as well) so it can be served in a public address when ready. Note the fact that, initially, the /etc/httpd/conf.d/moodle.conf file doesn’t allow access from hosts other than localhost and we had to change it in order to do so.

How can we handle to choose te url we want moodle to be avaikable on?. I think this should be possible to define during install of the module.
For instance, when clicking the install button for moodle in software center, you first get a prompt to choose an url in the form of subdomain.domain.tld/moodle
It would be nice if a DNS entry is created for that url. Then Moodle would be accessable on that url from the local LAN. If you need external access you need to set an A or CNAME record in your DNS settings of your domain privider and forward on your gateway.
I only don’t know if this is possible if the NS where you install Moodle on is not the DNS server for your network…
Alternatively you could manually create the DNS entry for you LAN.
Ideas?

an action can be launched to create a new db property in the host database, but I guess that you cannot change the default url given at the installation. The fact that the stylesheet is not displayed is maybe a symptom for me…

else we could imagine $CFG->wwwroot = ${moodle}{newurl} || $SystemName.$DomaineName and trigger an action to create the new dns entry

Can you elaborate on why you can’t change the default url during install? It would be highly limiting if this is not possible. Imo you should be able to use any url and install moodle in a vhost for apache. The only thing to do is tell the document root for the moodle install.

I recall something similar with wordpress (If i’m not wrong) where the url is stored in the database and you cannot change it once created. The only manner is to change it manually by the wordpress settings.

But it is the development game now, a lot of problems that you won’t have if you watched the TV, however it is fun.

What database are you talking now? The esmith or the moodle mysql database?

all is stored under the mysql database with moodle

Ok, clear. But if it is the mysql database, then entering a custom url shouldn’t be the hardest thing, or is it?

1 Like

some new of the front, thank to @areguera who find the bug I pushed with my commit :slight_smile:

The rpm is near to be ready to go out, now the big part is the authentication against Samba4/ldap

1 Like

Package update here:

nethserver-moodle-0.0.7-1.10.g39718c9.ns7.noarch.rpm

This package should do the following:

  • Correct the stylesheet issue
  • Force ssl redirection

If you can confirm this package does the expected, a new tag will be created for the related changes.

5 Likes

That’s a HUGE achievement Alain :slight_smile:
You should push your rpm on our testing repo @davidep will be happy to help you :wink:

1 Like

Wow already a (working) rpm for moodle. This is a huge step forward to make NS a kickass education platform.

2 Likes

alain, the rpm is not in a public repository, google drive asks me to be allowed :slight_smile:

Sorry for that. It must be publicly available now.

Check my suggestion above :point_up:
Working on nethserver-moodle module

Thank you very much @alefattorini. It isn’t possible without the efforts of @stephdl, @robb and @syntaxerrormmm.

That’s very exiting!!! :smiley: … I’m planning to merge some pull requests in nethserver-moodle.git repository now and later contacting @davidep to work in this direction of pushing rpms to NethServer testing repository.

By making the rpm in google drive publicly available I just wanted @stephdl, and others, to be able of downloading what was already published. The NethServer testing repository has no competition for NethServer testing packages :slight_smile:

6 Likes

How is it going? Is the package in testing yet?