Non-core contributed modules

GBPv2 Items are not consistently appearing in the gradebook in order

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Won't Fix
  • Affects Version/s: 1.8.2
  • Fix Version/s: None
  • Component/s: Patch: Gradebook Plus
  • Labels:
    None
  • Environment:
    Ubuntu 7.04, Apache 2, PHP5, GBPv2 modified 1.83+ production server.
  • Affected Branches:
    MOODLE_18_STABLE

Description

Items that are entered by using Graded Events in GBPv2 due not appear in date entered order in the gradebook.

Some items appear in order while others do not. They are not ordered using the timemodified field or in the order they were entered.

They show up in the same order they appear in the database. Inserted is an example from one of our courses. The teacher has them named in order and they were inserted in order.

Notice in the screen shot that item 7-1 appears in the beginning of the displayed grades in both the phmyadmin view if the database and in the gradebook.

Notice that the ID of 1070 is out of order in the database.

The events should appear in the gradebook by the date entered with the other gradeable events in the same category.

See attached screen captures

  1. CONTRIB-248.diff
    23/Mar/08 4:14 PM
    1 kB
    Anthony Borrow
  1. gradebook.jpg
    359 kB
    10/Jan/08 11:42 AM
  2. phpmysql.jpg
    298 kB
    10/Jan/08 11:42 AM

Activity

Hide
Anthony Borrow added a comment -

Brian - Here is a quick attempt at a possible patch. Without having a dataset to work with it is difficult to verify that this will work on your installation; however, we were not ordering the results at all so I figured I would go ahead and do that. Let me know if this patch file resolves the issue. If not, I'll dive a little more deeply into the code. Peace - Anthony

Show
Anthony Borrow added a comment - Brian - Here is a quick attempt at a possible patch. Without having a dataset to work with it is difficult to verify that this will work on your installation; however, we were not ordering the results at all so I figured I would go ahead and do that. Let me know if this patch file resolves the issue. If not, I'll dive a little more deeply into the code. Peace - Anthony
Hide
Caroline Moore added a comment -

Hi Anthony - I just applied this patch (manually added the two lines to lib.php instead of running the diff file). It works, but not quite as expected, since lib.php runs two separate queries - one for "gradebook grades" and one for "non-gradebook grades". Within each of these queries the events are sorted correctly, but the list of graded events as a whole isn't sorted in order.

To further complicate things, it appears that when new items are added to the gradebook, the sort_order of all events in that category is affected. Manually added events are automatically given sort_order numbers lower than automatically added events, and all of the auto added events are bumped up by one.

When I manually change the sort_order variable in the mdl_grade_items table, something in the code is changing it back every time I view that category in the gradebook.

It would be lovely to get this fixed, but I understand if it's not a high priority now that 1.9 is out. Thanks!

Show
Caroline Moore added a comment - Hi Anthony - I just applied this patch (manually added the two lines to lib.php instead of running the diff file). It works, but not quite as expected, since lib.php runs two separate queries - one for "gradebook grades" and one for "non-gradebook grades". Within each of these queries the events are sorted correctly, but the list of graded events as a whole isn't sorted in order. To further complicate things, it appears that when new items are added to the gradebook, the sort_order of all events in that category is affected. Manually added events are automatically given sort_order numbers lower than automatically added events, and all of the auto added events are bumped up by one. When I manually change the sort_order variable in the mdl_grade_items table, something in the code is changing it back every time I view that category in the gradebook. It would be lovely to get this fixed, but I understand if it's not a high priority now that 1.9 is out. Thanks!
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 (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: