Non-core contributed modules

Grade Exception Calculation Error in Gradebook 2.17 for Moodle 1.8.3

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Won't Fix
  • Affects Version/s: 1.8.3
  • Fix Version/s: None
  • Component/s: Patch: Gradebook Plus
  • Labels:
    None
  • Environment:
    Linux CENTOS on Cpanel

    I am running Moodle 1.8.3 with gradebook Plus 2.17
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_18_STABLE

Description

There seems to be a new error in the most recent version of Gradebookplus in calculating averages in cases where there are exceptions.

I am running Moodle 1.8.3 with gradebook Plus 2.17

In cases where there is a category with one assignment grade in it, excepting a student from that assignment does not prevent a zero being averaged in for their average.

Before I upgraded from moodle 1.6 with gradebook plus for that version,this was calculated correctly and I have confirmed on another installation running 1.6 that the identical set of grades for the 1.8.3 installation is averaged differently.

Here is the simple example I used for the test:

Category A A1 A2
Category E E1

If a student is excepted from E1 they still get a zero averaged in for the E category.

Here are the exact same grades incorrectly averaged in 1.8.3 with gradebook plus 2.17

Temporary Admin as been excluded from assignment E

(See attached image)

Sort by Firstname A Stats E Stats Total Stats Student

Admin, Temporary 134 67% 0 0% 134 44.67% No grade letters set Admin, Temporary
Banach, David 181 90.5% 82 82% 263 87.67% No grade letters set Banach, David

Here are the grades from 1.6 which are correct:
(See attached image)

Sort by Firstname A Stats E Stats Total Stats Student
points(200) Percent points(100) Percent points(300)
Adminaccount, Temporary 134 67% 0 0% 134 67% No grade letters set Adminaccount, Temporary
Banach, David 181 90.5% 82 82% 263 87.67% No grade letters set Banach, David

Activity

Hide
Anthony Borrow added a comment -

David - After Easter I will have a week with no classes and I am hoping to dedicate some time to Moodle and in particular to patching up GBPv2 and the 1.8 Gradebook. I may need some help testing solutions. Could you attach a course backup with the above data that I could use to reproduce the problem and test possible solutions? That would save me some time and help to ensure we are dealing with the same issue(s). Peace - Anthony

Show
Anthony Borrow added a comment - David - After Easter I will have a week with no classes and I am hoping to dedicate some time to Moodle and in particular to patching up GBPv2 and the 1.8 Gradebook. I may need some help testing solutions. Could you attach a course backup with the above data that I could use to reproduce the problem and test possible solutions? That would save me some time and help to ensure we are dealing with the same issue(s). Peace - Anthony
Hide
David Banach added a comment -

This is the backup of the course with gradebook 2.17 in Moodle 1.8.3 that fails to calculate the the average correctly. The grade page from this course is displayed in the attached image.

Show
David Banach added a comment - This is the backup of the course with gradebook 2.17 in Moodle 1.8.3 that fails to calculate the the average correctly. The grade page from this course is displayed in the attached image.
Hide
David Banach added a comment -

Thanks Anthony!

If there is anything else I can do to help just let me know. I've attached the backup from the course in 1.8.3 that doesn't calculate the average correctly. I haven't attached the course from version 1.6 that does the calculation correctly. Let me know if you need it.

Thanks again!

David

Show
David Banach added a comment - Thanks Anthony! If there is anything else I can do to help just let me know. I've attached the backup from the course in 1.8.3 that doesn't calculate the average correctly. I haven't attached the course from version 1.6 that does the calculation correctly. Let me know if you need it. Thanks again! David
Hide
Anthony Borrow added a comment -

David - Thanks for the back and for the bug report. This will help me out a great deal. Peace - Anthony

Show
Anthony Borrow added a comment - David - Thanks for the back and for the bug report. This will help me out a great deal. Peace - Anthony
Hide
Anthony Borrow added a comment -

David - My apologies for the delay in getting to this. It is still on my radar. Peace - Anthony

Show
Anthony Borrow added a comment - David - My apologies for the delay in getting to this. It is still on my radar. Peace - Anthony
Hide
Anthony Borrow added a comment -

David - I've taken a look at this and do not agree that 1.6 was calculating this correctly. Unfortunately I do not think that 1.8 or GBPv2 are calculating this correctly either. I will say that the handling of the excluded grade makes sense to me. I'll have to go back and review the logic in the code but intuitively I think the goal of excluding an assignment is to not count that grade (if it exists) against the student. However, if it is the only grade in that category then that would mean that the whole category is excluded and the user should get full credit for that particular category. I'm not sure if this is desirable or not . In any case, here is how I think things should be calculated:

given that Category A is worth 60% of the grade and Category E is worth 40% of the grade -

Student 1 - A1: 96 A2: 38 ATotal=67% 67*.6=40.2 if you add full credit for the other 40% you would have 80.2. Not 67 which would be 134/200. The problem I see in the logic is that it is totaling the total number of earned points over the total number of possible points but this does not take into effect the category weights.

Student 2 (David) - A1: 89 A2: 92 ATotal=90.5% 90.5*.6=54.3%. E1: 82 ETotal=82% 82*.4=32.8% 54.3+32.8=87.1 (not 87.67 which again is the total points/total possible points and does not take into account the category weights).

Before I proceeded, I wanted to make sure that we agree on what the total score ought to be.

Peace - Anthony

Show
Anthony Borrow added a comment - David - I've taken a look at this and do not agree that 1.6 was calculating this correctly. Unfortunately I do not think that 1.8 or GBPv2 are calculating this correctly either. I will say that the handling of the excluded grade makes sense to me. I'll have to go back and review the logic in the code but intuitively I think the goal of excluding an assignment is to not count that grade (if it exists) against the student. However, if it is the only grade in that category then that would mean that the whole category is excluded and the user should get full credit for that particular category. I'm not sure if this is desirable or not . In any case, here is how I think things should be calculated: given that Category A is worth 60% of the grade and Category E is worth 40% of the grade - Student 1 - A1: 96 A2: 38 ATotal=67% 67*.6=40.2 if you add full credit for the other 40% you would have 80.2. Not 67 which would be 134/200. The problem I see in the logic is that it is totaling the total number of earned points over the total number of possible points but this does not take into effect the category weights. Student 2 (David) - A1: 89 A2: 92 ATotal=90.5% 90.5*.6=54.3%. E1: 82 ETotal=82% 82*.4=32.8% 54.3+32.8=87.1 (not 87.67 which again is the total points/total possible points and does not take into account the category weights). Before I proceeded, I wanted to make sure that we agree on what the total score ought to be. Peace - Anthony
Hide
David Banach added a comment -

Hi Anthony,

Thanks for replying on this.

I think the intuitive idea behind grade exceptions is to have excluded grades count neither for not against the student, so that current averages refelct only work the student has done and is held responsible for. The practical prupose is to let students know how they have been doing and give students a good idea of what their grade would be if they were to continue the same level of work. I would prefer that student not be given full credit for an excluded category, but that the entire category not count and that the weights be recaluclated on the basis of the non-excluded categories.

There are two types of averages can be displayed in both 1.6 and 1.8: the average and the weighted average. I didn't include the weighted averages in the screen shopts I provided. (In general weighted averages are not useful for iterim grades where work in all categories isn't represented.) The behavior you prefer for exceptions is already implemented in both 1.6 and 1.8 for weighted averages. it is just the calculation for percentage of total points in 1.8 that needs attention.

Here are the grades in example I used for both 1.6 and 1.8 including weighted averages:

http://dbanach.com/moodlegrades.htm

As you can see, 1.6 and 1.8 behave identically on the weighted average, and exactly as you suggest above. So i don't think that needs any change.
The only thing that needs attention is the calculation of normal percentages for 1.8 and, I assume GBP v2, so that categories all of whose grades are excluded are not added into the total available points. I think 1.6 does this calculation correctly.

Show
David Banach added a comment - Hi Anthony, Thanks for replying on this. I think the intuitive idea behind grade exceptions is to have excluded grades count neither for not against the student, so that current averages refelct only work the student has done and is held responsible for. The practical prupose is to let students know how they have been doing and give students a good idea of what their grade would be if they were to continue the same level of work. I would prefer that student not be given full credit for an excluded category, but that the entire category not count and that the weights be recaluclated on the basis of the non-excluded categories. There are two types of averages can be displayed in both 1.6 and 1.8: the average and the weighted average. I didn't include the weighted averages in the screen shopts I provided. (In general weighted averages are not useful for iterim grades where work in all categories isn't represented.) The behavior you prefer for exceptions is already implemented in both 1.6 and 1.8 for weighted averages. it is just the calculation for percentage of total points in 1.8 that needs attention. Here are the grades in example I used for both 1.6 and 1.8 including weighted averages: http://dbanach.com/moodlegrades.htm As you can see, 1.6 and 1.8 behave identically on the weighted average, and exactly as you suggest above. So i don't think that needs any change. The only thing that needs attention is the calculation of normal percentages for 1.8 and, I assume GBP v2, so that categories all of whose grades are excluded are not added into the total available points. I think 1.6 does this calculation correctly.
Hide
Anthony Borrow added a comment -

David - Thanks for clarifying that the weighted option seems to be working as expected. I think what you are describing makes sense to me now. You are looking for 132/200 points to be the percentage since the excluded 100 point score for E1 is excluded and should be removed from the total points. Intuitively, it sounds like we are on the same page with the overall objective. I always used the weighted option so if there is one excluded item from that they have 0 points for that category. Nevertheless, that is in my opinion how it should be and I think we are in agreement. I'll have to play with 1.6 and go back and look at what all changed in the code. But I think we have enough here to begin working toward a fix. I understand the problem and that is at least 90% of the battle. I'll play with this later this evening. Peace - Anthony

Show
Anthony Borrow added a comment - David - Thanks for clarifying that the weighted option seems to be working as expected. I think what you are describing makes sense to me now. You are looking for 132/200 points to be the percentage since the excluded 100 point score for E1 is excluded and should be removed from the total points. Intuitively, it sounds like we are on the same page with the overall objective. I always used the weighted option so if there is one excluded item from that they have 0 points for that category. Nevertheless, that is in my opinion how it should be and I think we are in agreement. I'll have to play with 1.6 and go back and look at what all changed in the code. But I think we have enough here to begin working toward a fix. I understand the problem and that is at least 90% of the battle. I'll play with this later this evening. Peace - Anthony
Hide
Peter Kupfer added a comment -

Any progress on this?

Show
Peter Kupfer added a comment - Any progress on this?
Hide
Anthony Borrow added a comment -

Unfortunately I got pulled away from working on this. I do know that I have been looking at GBPv2 code and realize that it really needs to be re-factored in order to fix some of the issues. This is no small task and have been hesitant to begin. My first recommendation and preference would be to upgrade to Moodle 1.9 (and let me know if there are issues migrating the GBPv2 grade events). If I get some time this summer to refactor the code used to calculate the grades and fix some of the issues I think I will do so in the HEAD branch of the code as it will need to be tested to make sure that it works properly. It would help if I had a better understanding of how many institutions or folks are impacted by this. So please encourage folks to vote on this issue. Peace - Anthony

Show
Anthony Borrow added a comment - Unfortunately I got pulled away from working on this. I do know that I have been looking at GBPv2 code and realize that it really needs to be re-factored in order to fix some of the issues. This is no small task and have been hesitant to begin. My first recommendation and preference would be to upgrade to Moodle 1.9 (and let me know if there are issues migrating the GBPv2 grade events). If I get some time this summer to refactor the code used to calculate the grades and fix some of the issues I think I will do so in the HEAD branch of the code as it will need to be tested to make sure that it works properly. It would help if I had a better understanding of how many institutions or folks are impacted by this. So please encourage folks to vote on this issue. Peace - Anthony
Hide
Anthony Borrow added a comment -

GBPv2 is no longer being supported. All users of it are encouraged to upgrade to 1.9. I'm resolving this as Won't fix. Peace - Anthony

Show
Anthony Borrow added a comment - GBPv2 is no longer being supported. All users of it are encouraged to upgrade to 1.9. I'm resolving this as Won't fix. Peace - Anthony
Hide
Anthony Borrow added a comment -

Closing all of my resolved issues. Peace - Anthony

Show
Anthony Borrow added a comment - Closing all of my resolved issues. Peace - Anthony

People

Vote (2)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: