Closed thepurpleblob closed 3 years ago
We're getting the same error:
Exception - Argument 2 passed to has_capability() must be an instance of context, null given, called in [dirroot]/plagiarism/turnitin/ajax.php on line 163
This works on our live site, so appears to be a regression.
plagiarism_turnitin
plugin version: 2020113001mod_turnitintooltwo
plugin version: 2020111801This is happening when a student tries to view the rub using the following link:
They are presented with:
The cause seems to be that the cmid
query string parameter is empty when making the initial request to plagiarism/turnitin/ajax.php
:
Hi @jbriggscmet we appear to have fixed this here https://github.com/turnitin/moodle-plagiarism_turnitin/pull/554, are you using the version that includes this fix?
Hi @CharlotteSpinks we've retested this issue in our test environment and it is now working as expected when using plugin version 2020113001
. It looks like the Moodle CLI upgrade scripts did not clear the Moodle caches correctly, and an outdated version of the TurnItIn JavaScript files were being served to users.
@jbriggscmet That's great, thank you for letting us know 😄
Following error is shown....
Exception - Argument 2 passed to has_capability() must be an instance of context, null given, called in [dirroot]/plagiarism/turnitin/ajax.php on line 162 More information about this error × Debug info: Error code: generalexceptionmessage × Stack trace:
Undefined variable: cm in /var/www/html/moodle/plagiarism/turnitin/ajax.php on line 160
Notice: Trying to get property of non-object in /var/www/html/moodle/plagiarism/turnitin/ajax.php on line 160 Notice: Undefined variable: cm in /var/www/html/moodle/plagiarism/turnitin/ajax.php on line 161 Notice: Trying to get property of non-object in /var/www/html/moodle/plagiarism/turnitin/ajax.php on line 161 Notice: Undefined variable: cm in /var/www/html/moodle/plagiarism/turnitin/ajax.php on line 162 Notice: Trying to get property of non-object in /var/www/html/moodle/plagiarism/turnitin/ajax.php on line 162 Notice: Undefined variable: context in /var/www/html/moodle/plagiarism/turnitin/ajax.php on line 162