I'm getting an unexpected error in each Moodle course, if I'm trying to get the access to the Scales section under Course administration -> Grades.
This is the message:
Fatal error: Using $this when not in object context in D:\inetpub\wwwroot\moodle\mod\dataform\field\ratingmdl\classes\ratingmdl.php on line 620
This error appears even in courses in which I'm not using the dataform activity. I have tried to comment this line to avoid it, but this is for sure not the best solution.
Which Moodle version and Dataform version?
Moodle 2.6.2, Dataform release 2.6.3, version 2014051300
Can you post the detailed trace? The line indicated in the error notice doesn't seem to be related to the stated error.
Hi Itamar,
I have noticed the same issue on Moodle 2.7.1 which seems to be connected with the dataform plugin. I have updated my Moodle test server to the latest Moodle version 2.7.1. Likewise I have made an update of the dataform plugin, to the latest stable version.
At the time when I access the Scales section under Grades (it doesn't matter) in which course, I'm getting the following error:
"Comparisons of text column conditions are not allowed. Please use sql_compare_text() in your query."
But if I will disable the dataform plugin, then I can access the Scales section without any problem. Is this not connected with the sql function which is used to compare the fields on the database level?
The scale is not yet covered by the testing and core api seems to have been changed there. So, it is possible that there is an issue there. I'll look into that.
Reproduced and fixed. I'll push the fix to git later today and release an update in a couple of days. Please open a tracker issue so that you can track the fix.
Great! Thank you very much for this fix!