I’ve pushed an initial commit to nethserver-moodle.git repository. I haven’t tested it yet but wanted you to see quickly what we already have. I am running the make-rpms command and am downloading the chroot tree that mock uses to build the rpm packages based on the tree pushed. It will take a while because I am using a slow Internet connection but as soon as I have any progress on testing the packages will notify you.
Suggestions and collaborations are welcome. This is my first attempt to build something to NethServer and might contain errors. The work is based on nethserver-nextcloud package.
I didn’t include the lines intentionally because those are dependencies of the moodle package not the nethserver-moodle package. Shouldn’t those dependencies be in the moodle spec?
A lot of moodle implementations don’t use ldap authentication. They are just online services where you need to create an account in the moodle database. Or they use some kind of open authentication, facebook or G+.
The upstream maintainer probable left php-ldap out since it is not always used ??
If it is not in the epel package, we sure need those php packages…
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.