Changing the grade order in gradebook?

Changing the grade order in gradebook?

by David Fountain -
Number of replies: 14

Is it possible to change the order the grades appear in the gradebook?

I have:

Gradebook with grade 5 followed by 1

and I would like:

Gradebook in desired order

I have tried the following with varying degrees of success:

  1. Been very careful to add grades (Gradebook plus) in the order I want them to display
  2. Renamed the grades after I have seen the order they appear in the gradebook
  3. Hacked about in the database on the 'sort_order' field

Please tell me I have missed something simple and obvious blush

In reply to David Fountain

Re: Changing the grade order in gradebook?

by Todd Hughes -
David,

Are you creating these grades as Assginments within the course or through the Manage Grades tab in Gradebook Plus? Assignments appear in date due order. In my limited experience with grades created through Manage Grades, the grades just show up in the list in the order I create them. And, grades created through Manage Grades show up to the left of grades created through Assignments.

I hope this helps.

Todd Hughes
Jacksonville, FL
In reply to Todd Hughes

Re: Changing the grade order in gradebook?

by David Fountain -

Thanks Todd,

I have a combination with some assignments and others added in gradebook plus and I have had success in getting them into the order I want but wondered if there was a *proper* way of doing it.

I have noticed that the sort_order field in the grade_items table appears to reset itself if I make changes directly to the database. I'm probably going to start hacking a method for uploading grade items from a CSV soon as I find the "Add Grade" button a little slow (I have been using this for tracking criteria and need to add about 100 grade items to each course)

In reply to David Fountain

Re: Changing the grade order in gradebook?

by Aaron Saxton -
I'm having the same problem. Did you manage to find a solution?

Any help would be much appreciated!

Aaron
In reply to Aaron Saxton

Re: Changing the grade order in gradebook?

by David Fountain -

The reordering proved to be too problematic if there were grades already in the system. In the end I just made sure I named the grades in the order I wanted, checked the order and if there were any problems renamed the gradebook entries - this does not make any sense if there were grades already in the system as the grades would not be moved.

I did hack a bulk upload of grade entries that speeded the process up

In reply to David Fountain

Re: Changing the grade order in gradebook?

by Aaron Saxton -
It's such a strange problem. I've used the same naming conventions you have displayed in your screenshot and it works no problem on a local test version of Moodle 1.8.2. However, when ever I try it on my live version of Moodle the grade items appear in random orders. Thanks you for your advice and if I do manage find a solution I'll let you know.

Aaron

In reply to Aaron Saxton

Re: Changing the grade order in gradebook?

by David Fountain -
Yes,
I had set:
grade1, grade2, grade3
and got
grade 2, grade1, grade3
so I renamed grade 2 to grade 1 and vice versa, but like I said this doesn't work if you have already entered any student grades.
In reply to David Fountain

Re: Changing the grade order in gradebook?

by Aaron Saxton -
Thanks again. Just ended up renaming, but when you have a lot of entries to enter it does take a while. I'll be training other teachers to do this so will have to find a better method soon.
In reply to Todd Hughes

Re: Changing the grade order in gradebook?

by Ray Thompson -
I have also been experimenting with how the gradebook order's activities and events. I would like to add to Todd's reply with my own observations. As noted by Todd the graded events are placed to the left of the activites in the gradebook. And they are deffinetly ordered by their date of creation. I even attempted to create a new category and placed the graded events into the new category in various order. But they always display Left to Right Oldest to Newest and before activities. Graded events and activites currently can't be mixed.

On the other hand, it appears that the order of activities can be changed by the order they are displayed on the course homepage. In other words, the gradebook lists activities left to right by the order of the activities on the course homepage from top to bottom. So, you can re-arrange activities in your gradebook by moving the resources around your course homepage.

I have received various requests from the professors at Humboldt State for the ability to re-order graded events but like many have stated there doesn't appear to be a way to do so other then creating them in the order you want them displayed. For many professor's this is no longer an efficient option.

Ray Thompson
Courseware Development Center
Humboldt State University
In reply to Ray Thompson

Re: Changing the grade order in gradebook?

by Brian Pool -
In our 1.83 production server we get the same problems from time to time.

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.

Gradebook View

However, 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.

Database view



If it was being inserted by timemodified (which I think it should) then it would be in order as well. I am unclear what field this is sorted on, if any. If I made the database order by timemodified that would fix this error. I am hesitant to do so because I am not sure how and grades are due this week.

As a side note, my teacher reports of the student grades are in the same wacky order. I would kill two birds with one stone if someone could tell me how to fix it!

Brian

As I finished writing this I decided to try something... and it worked.
1. I opened phpmyadmin, went to the grade_events table and hit the operations tab.
2. At the top there is an option to Alter Table Order By and I set that to timemodified and hit go.

And...it is fixed.

Good luck!
In reply to Brian Pool

Re: Changing the grade order in gradebook?

by A. T. Wyatt -
Hi, Brian!
This sounds like a good tip. Maybe you could tuck it into the moodle docs wiki somewhere?

atw
In reply to A. T. Wyatt

Re: Changing the grade order in gradebook?

by A. T. Wyatt -
Okay, I take that back. It would be better to fix it in the code. (See Anthony's reply below)

atw
In reply to Brian Pool

Re: Changing the grade order in gradebook?

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
Brian - Just for clarity, does that production server use the GBPv2 patch? If things are displaying out of order, then I would like to get that fixed in the code. Sorting should be fairly simple. The question is how to sort. In 1.9 grade items have a sort order; however, I would need to go in the code and see how things were being sorted. For the GBPv2 patch, I would be open to using timemodified in place of nothing if it is simply a matter of adding a sort parameter when we get the get_records. Feel free to open an issue in the tracker and I'll take a more in depth look at it. Peace - Anthony

p.s. - Also, I would be hesitant about doing too much with ALTER TABLE. Direct manipulation of the data is always risky and such suggestions should always be accompanied with the disclaimer about having a good backup.
In reply to Anthony Borrow

Re: Changing the grade order in gradebook?

by Brian Pool -
Yes it is GBPv2 and I was hesitant to try it for exactly that reason.

I do have an excellent automatic backup routine now.

The problem I am having is that teachers would like all the gradebook items in order they were due.

I don't know how to put them all together. They don't use the same datedue field names on all the available types of graded items. So we end up at the end of the quarter with a very willy nilly order for all the items.

BTW, I still think 1.9 is a stinker of a change. They gradebook is less intuitive than assembler code was my freshman year at Duke. I still think it is a case of function vs form that has gone awry...but I have said that before. I just we don't lose future Moodlers over this. I think Moodle is one of the best educational tools ever, and I hope it keeps its following.

Brian

PS I added it to the tracker per your request.
In reply to Brian Pool

Re: Changing the grade order in gradebook?

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
Brian - Sorry for the delay in looking at CONTRIB-248. I have managed to put together a proposed patch that I am hoping will resolve your issue. It is an attempt at a quick fix that I have not really tested but if it resolves your issue I will commit it. Peace - Anthony