Assignment grading undefined error

Assignment grading undefined error

by Marcus Green -
Number of replies: 4
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

I am getting a peculiar error when I attempt to view assignments for grading on a Windows (wamp) installation of Moodle 3.1. When I click the grade button I get the error screen attached and I cannot work out where the error might be coming from. I have debugging turned up to developer but I am not sure if it is rally a javascript or a PHP thing at heart. Can anyone give me any clues/suggestions. I suspect it is some type of PHP or file system wierdness because I can reproduce this on other installs on the same machine.  The version of php is 5.6.16.:..

UPDATE:

Yes it was something to do with the PHP version, it works fine with PHP7

Attachment undefined2.png
Average of ratings: -
In reply to Marcus Green

Re: Assignment grading undefined error

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

You can fix in 5.6 in the PHP configuration, the php.log file hints at this with the error:

PHP Deprecated:  Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0

thus the solution is to have the setting and value:

always_populate_raw_post_data = -1

in the php.ini file.  This is also stated on: PHP#HTTP_RAW_POST_DATA_errors.

Thus really useful if you need to develop on older versions of Moodle that do not support PHP 7 and develop on newer versions at the same time.

In reply to Gareth J Barnard

Re: Assignment grading undefined error

by Premi Sivanesan -

I recently started getting this error on Assignment grading as well. Hosting the Moodle on a hosting domain so dont know where to find the file and change the coding.

Any advise would be greatly appreciated.


In reply to Marcus Green

Trả lời: Assignment grading undefined error

by Xuân Thảo Hoàng -

You need uncomment "always_populate_raw_post_data = -1" in php.ini at XAMPP

In reply to Marcus Green

Re: Assignment grading undefined error

by Connor Giles -

Hi All, 

Just fixed an issue regarding this error on a Moodle 3.2 setup.

It turned out to be permissions (of all things!) on some unused theme files - They were set to root. 

Upon resetting permissions for the whole /theme directory to apache it instantly stopped the undefined error.

Hopefully this helps!

- Connor