by Jake Dallimore.
Thanks, Brian. Unfortunately, at this point, the only sure-fire way to know what's causing this is to debug the code handling the creation of lineitems, which requires stepping through the code. The point where the 401 is thrown is almost certainly this piece of code, however, there are a good number of checks being conducted inside that 'check_tool' method, any of which could result in the 401. Perhaps Turnitin would have an idea of what's causing the problem. Presumably they've verified their tool works with Moodle installs. Sorry I can't be of more help.
Jake
Jake