Hi there,
(Sorry if this post has ended up in the wrong place, I am not sure whether my question is mostly Activity, Plugin or Moodle system relevant...)
I am using Moodle 3.7.1 in a setup with other web-driven services, running on nginx served by a Debian 9 Linux.
Historically we have been deploying all the related services on the same piece of hardware, including a mediawiki, a physics simulation engine etc. served such that
- https://servername/moodle served our Moodle courses
- https://servername/wiki served our Mediawiki
- https://servername/sim served our simulation service
Moodle has generally been the anchor point, i.e. where we would use the URL activity (and other methods) to link to the other external resources.
Going forward, these services may end up on separate web hosts, and it would be good to have a way to define say
$CFG->wikihost;
$CFG->simhost;
that could be referred to from the URL activity, allowing to change these centrally rather than specifying a FQDN with http(s) prefix in every case.
My question is two-fold:
1) When entering the URL's how can one bypass the test done to require a prefix of http(s):// ? (The below image shows that an 'Enter a URL' warning/error is raised when clicking to save a URL not starting with http(s)://, i.e. /wiki)
2) Is there a way to refer to centrally-defined variables such as $CFG->wwwroot from the URL activity / plugin?
Best,
Peter Willendrup