Affects Version/s: 2.2.2
Fix Version/s: None
Component/s: External Tool (IMS-LTI)
When using the grade reporting feature of IMS-LTI on a non-Apache server environment, there is an issue with the use of the getallheaders() function. When attmepting to use outcome functionality with the test tool provider located at http://www.imsglobal.org/developers/LTI/test/v1p1/tool.php
an error occurs in mod/lti/service.php.
According to http://us2.php.net/manual/en/function.getallheaders.php the getallheaders function, which service.php uses, is only supported on Apache.
A workaround was defining the function if it doesn't already exist.
Steps to reproduce:
- Install Moodle on IIS (though any non-Apache server would also likely cause this)
- Create a new external tool activity linking to http://www.imsglobal.org/developers/LTI/test/v1p1/tool.php
- Save and display the activity
- Navigate to the LIS/LTI Outcome Service
- Attempt any of the functions - service.php will error out (or no result is returned)
Added the following to servicelib.php (solution found in comments on php documentation):