Can't get gradebook publishing to work on Moodle 3.1.2

Can't get gradebook publishing to work on Moodle 3.1.2

by Gerald Grow -
Number of replies: 2

I have used the Publishing option with several versions of Moodle, but I can't get it to work on the new server running Moodle 3.1.2. 

Instead of downloading the course gradebook, I get this error message: "A required parameter (itemids) was missing".

I'm talking about the grade export function that requires you to Enable Publishing in Site Administration / Grades / General Settings, then, with the gradebook open, choose Export Plain Text, create a user key, and export. It produces a long URL that, on other servers, downloads the gradebook when you click it. This is a highly useful function that enables me to download 40+ gradebooks by opening one folder of urls. 

I speculate that this problem is caused by a setting on the new server I am using (linux). Does anybody have any idea where I should start looking?  Here's what the debugging shows:

Debug info:
Error code: missingparam
Stack trace:
  • line 496 of /lib/setuplib.php: moodle_exception thrown
  • line 552 of /lib/moodlelib.php: call to print_error()
  • line 24 of /grade/export/txt/dump.php: call to required_param()
Thanks for any help you can offer.

I'll continue testing and report if I find anything. 

In reply to Gerald Grow

Re: Can't get gradebook publishing to work on Moodle 3.1.2

by Gerald Grow -

I have some details on this problem.

(1) I set up identical Moodle 3.1.2+ installs, one on the old server and one one the new server. On the old server, I can publish/export the gradebooks the way I'd expect to.

On the new server, I get the error message mentioned.

(2) If I publish/export only a portion of the gradebook (it is a large gradebook, with around 250 columns), I succeed with up to about 130 columns. Above that, the error happens. I can choose any 130 grades and it works. The graded items themselves do not seem to be causing the problem.

(3) I suspect the large gradebook is overloading some parameter on the new server, which needs to be enlarged. 

Does anybody have a guess as to what that could be? All the obvious settings are identical between the two servers -- especially php.ini in Moodle and on the server itself. 

The new server does have opcache installed, which the old, working server does not.

In reply to Gerald Grow

Re: Can't get gradebook publishing to work on Moodle 3.1.2

by Gerald Grow -

Here's the SOLUTION so far:

Tech support at LiquidWeb (our webhost) found that by disabling the PHP extension Suhosin, Grade Publishing worked.

I do not know if disabling Suhosin could cause other problems.

The server that was giving the problem with Grade Publishing had these specs:

CentOS 7, 4GB RAM, PHP 5.6.25, MySQL 5.6.33. It contained all the PHP extensions recommended in the Moodle installation.