xAPI-vle / moodle-logstore_xapi

A Moodle plugin to send xAPI statements to an LRS using events in the Moodle logstore.
GNU General Public License v3.0
75 stars 84 forks source link

Plugin never sends out any API Requests to LRS #843

Closed maxju closed 1 year ago

maxju commented 1 year ago

Description

Version

Steps to reproduce the bug

  1. Setup Plugin Config
  2. Trigger Events to be sent to LRS

Expected behaviour

Actual behaviour

Server information

Client information

Additional information The obvious: Is this a problem with the Moodle version being more recent than what the plugin is specified to support?

First I needed to make sure my moodle-container (moodle-apache-php) can talk to the endpoint. In the terminal of the moodle container I can curl the endpoint and get the expected response (HTML with "Cannot GET /data/xAPI") that I also get in my browser. When I do this, nginx registers a http request. Then I go to the plugin config and type the exact same URL into the endpoint field. Whenever the cronjob executes it tells me "X event(s) have failed to send to the LRS." yet nginx does not register requests, not even bad/failed ones. I tried to understand some of the source code of the plugin and saw it basically also just makes a request using curl Thanks for any help

maxju commented 1 year ago

I found out there is a default curl blocked hosts list in moodle. Also only ports 80 and 443 are allowed by default. This took me wayy too long to figure out.