click here for details... Sakai Executive Director Position Search now open
Issue Details (XML | Word | Printable)

Key: SAK-4548
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Owen McGrath
Reporter: Stephen Marquard
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Sakai

Displayed average of scores entered is incorrect

Created: 08-May-2006 05:05   Updated: 23-Oct-2008 11:28
Component/s: Assignments, Gradebook
Affects Version/s: 2.1.2
Fix Version/s: 2.2.0

Time Tracking:
Not Specified

File Attachments: 1. Microsoft Word SAK-4548_replicate_attempt_OM.doc (62 kB)

Image Attachments:

1. gradebook-average.jpg
(173 kB)

2. screenshot-1.jpg
(111 kB)

3. screenshot-1.jpg
(102 kB)
Environment: Linux, mysql

2.6.x Status: None
2.5.x Status: None
2.4.x Status: None


 Description  « Hide
An assignment in Assignments has been added to Gradebook. There are 161 students. The Assignment is graded out of 10 points. Only 4 students have grades assignment, of 10, 7, 3 and 0. The other students are ungraded for this assignment.

Gradebook correctly shows all of the data, but displays:

Class average for scores entered 2%

whereas the class average should be (10 + 7 + 3 + 0) / (10 * 4) = 0.5 = 50%


 All   Comments   Work Log   Change History   Subversion Commits   git Commits      Sort Order: Ascending order - Click to sort in descending order
Owen McGrath added a comment - 09-May-2006 16:49
Hi, Stephen. Any chance you could attach a screenshot?

Stephen Marquard added a comment - 10-May-2006 02:11
Screenshot with student names blanked out.

Owen McGrath added a comment - 17-May-2006 16:14
Not yet able to replicate the problem. Need to get more details from Stephen.

Owen McGrath added a comment - 17-May-2006 16:36
Wasn't paying attention to branches on nightly. For accuracy, here's my replication attempt on the 2.1 maintenance branch. Still not replicating the problem. Will seek more information from Stephen.

Ray Davis added a comment - 18-May-2006 12:08
I added Assignments to the components list since the problem seems to be triggered by the combination of the two programs.

Ray Davis added a comment - 18-May-2006 12:30
Stephen sent an SQL dump of the Gradebook data and I'm working on it from that.

Ray Davis added a comment - 18-May-2006 13:08
Gradebook bug for sure. It's amazing that this one hasn't been caught before.

Null scores aren't counted -- they're basically considered the same as "unscored" -- and the stats calculation skips them. But the stats calculation wasn't reducing the number of students considered to match the reduced number of scores! What triggered this in your case was that Assignments sends a record for all students to the Gradebook, whether they were graded or not. Result: Lots of null scores and a calculated mean that was drastically off.

I'm working on the fix now and will talk to Lance and Peter about getting a patch for 2.1.2.

Ray Davis added a comment - 18-May-2006 14:20
Checked in Gradebook fix as revision 9670.

This is an extremely localized change -- one method in one class -- and would make a good candidate for the 2.1.x maintenance branch or a patch.

Owen, you can test it by entering scores for a bunch of students and then deleting them all. That will result in grade records with null scores, which is the trigger for the bug.

Owen McGrath added a comment - 18-May-2006 15:05
Hi, Peter. Since Stephen's original problem was in 2.1.2 and since the trunks on nightly seem to be getting rebuilt only sporadically right now, seems like putting this in the 2.1.x. maintenance branch would be helpful. Then I can test tomorrow morning. Thanks.

Peter A. Knoop added a comment - 20-May-2006 12:23
Owen, you'll want to contact the Release Manager, currenlty Lance, regarding including any particular fixes to include in a release.

John Leasia added a comment - 21-Jun-2006 08:18
The calculation is correct now in 005 (only appropriate values are considered for the average). There is a related bug about rounding down in SAK-5262.