I've gotten the patch to work well before, but now it's giving me problems. We use 1.9.5+ on Postgres
. I've installed the files from the latest 1.9 zip file and successfully created/modified the appropriate tables in the DB. The global teacher account is correctly created and allows login to the Turnitin site via the link on the admin page. As a teacher I can create a new single file upload assignment and have the Tii options available to me. As a student I can submit to the Tii assignment. However, when cron runs (with full debugging on) SimpleXMLElement dies and does a stack trace as a result of Tii returning an error document. Here's the stack trace:
Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /var/www/moodle-test/lib/turnitinlib.php:200
#0 /var/www/moodle-test/lib/turnitinlib.php(200): SimpleXMLElement->__construct('???...')
#1 /var/www/moodle-test/lib/turnitinlib.php(220): tii_post_data(Array, '/var/www/moodle...')
#2 /var/www/moodle-test/lib/turnitinlib.php(423): tii_post_to_api(Array, 51, 'POST', Object(stdClass))
#3 /var/www/moodle-test/admin/cron.php(141): tii_send_files()
Here's what cron outputs:
sending Turnitin files
Success getting user, Class and assignment
(Then the HTML error document is dumped. Nothing of which is really enlightening IMHO
The submission in question is just a test Word doc. The data in the mdl_tii_files DB table following the above failed cron run is:
id | course | module | instance | userid | filename | tii | tiicode | tiiscore
1 | 1351 | 1 | 5932 | 14060 | Lent_One_2009.doc | | 31 | 0
It seems to me like it was successful according to the error code, but some other API call seems to fail and cause the integration code to panic.
Any thoughts Dan? I'm completely stumped. Anything I failed to note?