Saltbox / wordpress-lti-consumer

Use Wordpress as an LTI Consumer to launch remote learning content
GNU General Public License v3.0
17 stars 11 forks source link

Setting a waxlrs configuration_url produces an "HTTP request failed" error #9

Closed pascallaliberte closed 10 years ago

pascallaliberte commented 10 years ago

In the shortcode, adding a configuration_url pointing to a waxlrs XML returns an error.

[lti-launch consumer_key=yourconsumerkey secret_key=yoursecretkey display=iframe
configuration_url=https://uomedtest.waxlrs.com/lti?u=https://uomedtest.waxlrs.com/embed/mostpopular
resource_link_id=testcourseplacement1]

This problem isn't so much with the wordpress-lti-consumer code, though. The problem seems to be that waxlrs returns a 404 Not Found if the Accept: application/xml HTTP header is being sent.

This gist isolates just the part of the code making the file_get_contents call to the waxlrs, reproducing the problem: https://gist.github.com/pascallaliberte/21d3eb14ec6e5a8dec9a

This gist, however, has the Accept: application/xml removed, which works. https://gist.github.com/pascallaliberte/542212dbcc6562eeaf6c

fugu13 commented 10 years ago

Newest update to Wax fixes this, verified using problem gist.