-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Moodle PROXY setting not used #84
Comments
Thanks @nadavkav 👍 |
You are right @nadavkav. |
@brianjmiller (of RusticiSofware) was quick enough to come up with a fix on their side.
|
@garemoko @brianjmiller @nadavkav |
Hi @nadavkav, thanks for that snippet, but we cannot allow Moodle specific code inside the xAPI recipe emitter, because it is used by other plugins outside of Moodle. Therefore, I would recommend the following adjustment to the "classes/log/store.php" file. /**
* Creates a connection the xAPI store.
* @return xapi_repository
*/
private function connect_xapi_repository() {
global $CFG;
$remote_lrs = new tincan_remote_lrs(
$this->get_config('endpoint', ''),
'1.0.1',
$this->get_config('username', ''),
$this->get_config('password', '')
);
if (!empty($CFG->proxyhost)) {
$remote_lrs->setProxy($CFG->proxyhost.':'.$CFG->proxyport);
}
return new xapi_repository($remote_lrs);
} I'd recommend trying out that change, then submitting a pull request to this repo. |
@ryansmith94 @nadavkav , |
@ryansmith94 you are right. I thought It was a Moodle specific plugin. |
@deedey feel free to make a PR so that other people have it too 👍 |
This is fixed in v1.2.0 |
It seems that the RusticiSoftware/TinCanPHP library that is used in this project did not implement proxy support when initiating the remotelrs class (and obviously, when sending the xAPI staements to the remote LRS)
An issue report and a workaround can be found here:
RusticiSoftware/TinCanPHP#63
I have temporarily worked around it, as our campus is behind a reverse proxy (firewall).
But a fix need to be applied first in RusticiSoftware/TinCanPHP before we can implement a permanent solution on our end. (this project)
Please help raise priority of this issue on the RusticiSoftware/TinCanPHP project (above link) as we are depending on them.
The text was updated successfully, but these errors were encountered: