Assignment

 
 
Jon
Problem Viewing/Grading Submissions
Group Particularly helpful Moodlers

This issue is about the new assignment type (using versions 2.3 & 2.4.1).

This is only happening in one course where there are 90+ students enrolled.

When the teacher clicks on the View/grade submissions link it takes quite a long time to load the page (it will not load for her at all). When the page does finally load it is just text and does not have all of the expected functionality.

 

I am unable to view all of the students on that page, nor can I navigate to other pages. It takes about 4-5 minutes to get even that far.

It was happing in just one assignment previously and now it's come up again and is causing some issues for the teacher/students.

I've tried eliminative items that would appear in that column by shutting off submission comments & files.

It is only accepting online text submissions and allowing teacher comments.

Any ideas?

All I get from debugging is this:

Fatal error: Maximum execution time of 600 seconds exceeded in /var/www/moodle/lib/htmlpurifier/HTMLPurifier/Strategy/MakeWellFormed.php on line 493

 
Average of ratings: -
Picture of Marcus Green
Re: Problem Viewing/Grading Submissions
Group Particularly helpful Moodlers

If you load it in Chrome or Firefox, once the page is loaded click Crtl-Shift-J and you may see some error messages. These may indicate missing files or CSS components. If so please paste the output here.

 
Average of ratings: -
Jon
Re: Problem Viewing/Grading Submissions
Group Particularly helpful Moodlers

I'm still trying to find errors in Chrome, but in FireFox I get no errors, just a bunch of warnings that look like this:

Timestamp: 2/11/13 1:44:40 PM
Warning: Unknown property '-moz-border-radius'. Declaration dropped.
Source File: http://siteurl/theme/styles.php/nimble/1359578420/all
Line: 3657

Timestamp: 2/11/13 1:44:40 PM
Warning: ReferenceError: assignment to undeclared variable YUI_config
Source File: http://siteurl/mod/assign/view.php?id=32309
Line: 15

Timestamp: 2/11/13 1:44:40 PM
Warning: SyntaxError: mistyped ; after conditional?
Source File: http://siteurl/lib/javascript.php/1359578420/lib/javascript-static.js
Line: 1, Column: 60
Source Code:
urElement=document.activeElement;if(curElement=='undefined');else if(curElement.tagName=='INPUT')return;if(username.get(

Timestamp: 2/11/13 1:44:40 PM
Warning: SyntaxError: test for equality (==) mistyped as assignment (=)?
Source File: http://siteurl/lib/javascript.php/1359578420/lib/javascript-static.js
Line: 13, Column: 60
Source Code:
mn_width(colName){if(column=document.getElementById(colName)){if(!column.offsetWidth){setTimeout("fix_column_width('"+co

And a few hundred more. There's no good way to select them so I can copy/paste them all.

I've tried using different Themes to view the course but that didn't affect anything. They were assignments that were created using the Upgrade Assignments tool. Might that have anything to do with it?

 
Average of ratings: -
Jon
Re: Problem Viewing/Grading Submissions
Group Particularly helpful Moodlers

I might be getting warmer. When I alter the Options to view 10 assignments per page instead of All or even 20 the first page loads as expected. 

Now when I try to click on page 9 for submissions I'm having the same trouble.

Even when I try to sort the submissions by group Moodle must be trying to sort all of the students in that course. Could it be that 90 students is too much for this new assignment type to handle without changing a database setting?

Any ideas on which settings I might change? Is this one of those input_max_vars type settings?

 
Average of ratings: -
Jon
Re: Problem Viewing/Grading Submissions
Group Particularly helpful Moodlers

I went ahead and increased the max_input_vars PHP setting from 1000 to 4000 and things appear to be working as expected now.

 
Average of ratings:Useful (1)
Picture of Bob Puffer
Re: Problem Viewing/Grading Submissions
Group Particularly helpful Moodlers

If you use the gradebook at all and have wide gradebooks or large rosters you'll need a larger number than 4,000.  We set ours to 20,000.  Each grade cell counts as two input vars and quick feedback adds two input vars per cell.

 
Average of ratings:Useful (1)
Picture of Ugljesa Mrnjacevic
Re: Problem Viewing/Grading Submissions
 

Where/How do you change this?

 
Average of ratings: -
Picture of Bob Puffer
Re: Problem Viewing/Grading Submissions
Group Particularly helpful Moodlers

"I went ahead and increased the max_input_vars PHP setting from 1000 to 4000 and things appear to be working as expected now."

(previous post in the thread)

 
Average of ratings: -
Me!
Re: Problem Viewing/Grading Submissions
Group DevelopersGroup Moodle HQGroup Particularly helpful MoodlersGroup Testers

Yes the gradebook has special handling for this so it prevents you from seeing so many rows that you would hit this php limit - the assignment module does not have this. 

 
Average of ratings: -
Just wondering . . .
Re: Problem Viewing/Grading Submissions
Group Particularly helpful Moodlers

A year and five days later.

Is this still the case?  ie is the assignment still requiring a huge setting in the PHP?

We have just done the 4000 thing, but it's still faulting.

Are there any tracker items for this?

-Derek

 

 
Average of ratings: -
Picture of Randy Morrow
Re: Problem Viewing/Grading Submissions
 

The max_input_vars didn't work for us.  I had to go in and change the value for their options and then tell them to not go above a certain number of records.  I may try to alter the code to remove that drop down for number of records until there is a real fix.

In the Moodle database:

SELECT * FROM mdl_user_preferences where name='assign_perpage';

It's different depending on the number of records.  For one instructor I had to make it 20 for another I had to make it 10.

You will need to know the instructor's user id number.  In this case it was 3.

UPDATE mdl_user_preferences SET value=10 WHERE userid=3 AND name="assign_perpage"

I know it's not the real fix but it helped us for now.

 
Average of ratings: -
Picture of Emma Richardson
Re: Problem Viewing/Grading Submissions
Group Particularly helpful Moodlers

What did you change max_input_vars to and did you restart apache?  It makes no sense that that would not work but cutting down number of students would.

 
Average of ratings: -
Picture of Randy Morrow
Re: Problem Viewing/Grading Submissions
 

I changed it a few times (4000, 400000, and 400000) and I restarted apache after each change.

I never said it made sense, but it fixes it.  I would be grateful for a real fix, but this does for now.

 
Average of ratings: -
Picture of Emma Richardson
Re: Problem Viewing/Grading Submissions
Group Particularly helpful Moodlers

That is just so strange because basically the error occurs because the "grid" is too big.  What you are doing is shrinking the grid and the max_input_vars increases the allowed size of the grid so if one works, both should work.  I have mine set to 20000 and have never had an issue through multiple Moodle versions.  I just wonder if the setting did not take or if a caching issue was still give trouble.  You might check your php info and see if the setting came through.  

 
Average of ratings: -
Picture of Randy Morrow
Re: Problem Viewing/Grading Submissions
 

So I got it working. 

The max_input_vars variable is the fix but my PHP script memory was not high enough to allow it.  So I changed the memory_limit variable.  The default is 128M and when I set it to 256M the assignment page worked.

I should have realized this at the beginning, but it's up now.

 
Average of ratings: -