Gradebook not saving entries

Gradebook not saving entries

by Alfred Weiss -
Number of replies: 16

Hello everyone,

We are running Moodle 2.0.3 and we have confirmed reports of Teachers entering grades into the gradebook, under the Grader Report, clicking Update, and not having the grades saved.  In our replicated cases, in a given course, a certain number of grades will be able to be submitted correctly, between 20 and 30, and then, all subsequent entries will not be saved.  Additionally, if the courses has more students than the default setting for students per page, the first 20-30 students on the following page are also saved correctly. 

Does anyone have any ideas about what might be going on? 

Thanks so much!

Al Weiss
Pacific University

In reply to Alfred Weiss

Re: Gradebook not saving entries

by Chris Megahan -
Picture of Core developers

This is the first I have heard of something like this.. is this a particular assignment type? Honestly my first step would be upgrade to the 2.0.4 and see if it still exists before you scratch your heard to much on this one. I don't see anything that appears related in the tracker.

In reply to Chris Megahan

Re: Gradebook not saving entries

by Alfred Weiss -

Thanks Christopher.  We've upgraded to 2.0.4 this morning and we're still seeing the behavior. 

This is not an assignment type--all columns in a given grade book behave the same, whether they were atuomotically created by an activity or if they were manually created.

A bit of additional information.  This only happens for grades entered via the "Quick grading" interface.  If grades are entered by clicking on the "edit grade" icon and then entering them on the new page, they save just fine.

I think I'm going to post this to the tracker, but if anyone has any insight about this I'd be grateful.

--Al Weiss

In reply to Alfred Weiss

Re: Gradebook not saving entries

by Jennie Lillis -

We're also on 2.0.3 and finding that quick grading doesn't allow us to save any grades (not even the 20-30 you mention).  Clicking the 'save all my feedback' button doesn't seem to do anything.

I can see that a bug report exists for the issue above but mine seems slightly different (not allowing any grades to be updated).  Any thoughts, anyone?

Regards

Jennie

In reply to Jennie Lillis

Re: Gradebook not saving entries

by Rob Bennett -

We are having a very similar problem with Moodle 1.9.11

Quick grading only allows the first 50% of the grades in a column to be saved. However, editing each individual student grade in the column allows all entries to be saved (enourmously time consuming).

The problem only seems to be for courses that have existing grade items in the gradebook when students are enrolled in the course.

For existing courses where the teachers have not previously used the gradebook the quick grading works for all students in a column when new grade items are added.

 Next experiment in to back-up a course with an existing gradebook - remove all gradeitems from the gradebook for that course and see if the problem is solved - not the solution we want but the info should help us with our troubleshooting.

Thank god it is the beginning of the semester.

Rob

 

In reply to Rob Bennett

Re: Gradebook not saving entries

by Rob Bennett -

I have narrowed my problem down a bit. If I backup and restore into a new course without the Activities quick grading works again. Must be something corrupt in my activities.

In reply to Alfred Weiss

Re: Gradebook not saving entries

by Jeanie Cole -

We are having the same issue when trying to enter grades in the Gradebook.  The participants listed further down in the list, past #20, won't have their grades saved when we click "Update."  The ones above that do save.  We found a work-around by viewing them in individual groups, and entering the grades that way.  Then they do save (we have groups of 6).

In reply to Jeanie Cole

Re: Gradebook not saving entries

by Bob Puffer -

Sounds to me like you're running into the Suhosin post max problem.  Check your php.ini file to see if you have a section that looks like this:

[suhosin]
suhosin.post.max_vars = 2000
suhosin.request.max_vars = 2000

Up the values of max_vars to accomodate 4 time the number of cells (rows times columns) of your largest gradebook.

In reply to Bob Puffer

Re: Gradebook not saving entries

by Anthony Basile -

We hit this on moodle 1.9.16 a few days ago after upgrading php from 5.3.8 to 5.3.9.  Some googling showed that the suhosin-like hardening has been migrated to 5.3.9, see their ChangeLog:  http://www.php.net/ChangeLog-5.php#5.3.9.  The option is called max_input_vars.  Setting max_input_vars = 5000 solved our problems.

In reply to Bob Puffer

Re: Gradebook not saving entries

by Aaron Spike -

I used the following query to determine the maximum gradebook size on our Moodle instance.

SELECT c.id, c.fullname, c.shortname, cols, rows, cols*rows AS total
FROM mdl_course c 
JOIN (
    SELECT courseid, count(courseid) cols
    FROM mdl_grade_items
    GROUP BY courseid
    ) AS qcols ON c.id = qcols.courseid
JOIN (
    SELECT c.id AS courseid, count(ra.userid) rows
    FROM mdl_course c
    JOIN mdl_context  ctx ON ctx.instanceid = c.id
    JOIN mdl_role_assignments ra ON ra.contextid = ctx.id
    -- roleid 5 is student
    WHERE ra.roleid = 5
    GROUP BY c.id
    ) AS qrows ON qcols.courseid = qrows.courseid
ORDER BY cols*rows DESC
LIMIT 100;


For me the calculation ends up something like this: 4 * (111 columns * 62 rows) + some padding ~= 30,000. Yikes.

In reply to Aaron Spike

Re: Gradebook not saving entries

by steve miley -

Aaron - thanks for the SQL,  I ran into this problem too last week after patching my redhat system.  My max is 34,500!   but I think I'll limit it to 

5000 and see what happens.

In reply to Aaron Spike

Re: Gradebook not saving entries

by Bob Puffer -

Important to note that '4' is needed if you're using quick feedback -- '2' would be used, if not.

In reply to Bob Puffer

Re: Gradebook not saving entries

by Todd McDougal -

We ran into this late last week. We run CentOS 6.x and a recent PHP update applied the security patch, CVE-2011-4885, adding the directive max_input_vars to PHP. I mention this, because in the RHEL/CentOS world, security patches are applied even when version numbers do not change. The most recently patched version of CentOS's PHP is 5.3.3, but the 'max_input_vars' patch has been applied.

Look for 'max_input_vars' in the Web server's error logs to see if this is the cause of your issue. The error should also tell you what the current setting is. The default is 1000.

In reply to Todd McDougal

Re: Gradebook not saving entries

by Jeanie Cole -

This is the fix that worked for us.

33Turns out, php on RedHat was updated recently to address a denial of service issue involving max_input type things - remotely exploitable.   This is when the problem started.  It re-set the max_input_vars to default.

Have added max_input_vars to 5000 (default without setting is 1000).

 

In reply to Jeanie Cole

Re: Gradebook not saving entries

by Sali Kaceli -

I am having the same issue. However, we are using PHP Version 5.3.6-13ubuntu3.6 and do not see (cannot find that entry) anywhere. Any ideas anyone? 

In reply to Sali Kaceli

Re: Gradebook not saving entries

by Sali Kaceli -

Figured it out. If the entry is not in the php.ini file which in our Ubuntu installation it is under: /etc/php5/apache2/php.ini, then you have to enter it manually simply adding the line 

; added 2012-Feb. 22 gradebook issue
max_input_vars = [something above 1000]

of course the first line above is a comment. Got the solution from here: http://dev.tcea.org/index.php/moodle-tips-mainmenu-35/139-have-recent-problem-with-gradebook-display