I would like to have the default sort order to 'by due date', but it won't stick. I haven't figured when it becomes unglued but I constantly notice the pref changes back to the top one, Alphabetically by Category.

Is this function supposed to work? I clear cache every time I backup the db.

CommentFileSizeAuthor
#4 616566_gradebook_options_fix.patch6.26 KBMGN

Comments

MGN’s picture

Yes, the option is supposed to work, and has been working on my sites. The only way to reset it, to my knowledge, would be to click the button 'reset to defaults.'

See if you can identify when it becomes unglued and I can follow up on this.

Until then I'll leave this open. Perhaps someone else can reproduce this problem?

madflute’s picture

I finally found the steps to reproduce it!!

I have 4 gradebooks this semester. I want all of them to be Sort By Due Date, but only one of four takes it. Every time I move to the next gradebook and save the sort setting, the one before resets to By Alphabetical, the default.

Can you reproduce it?

MGN’s picture

Yes, I see the problem now. Thanks for the detective work. I am working on a patch.

MGN’s picture

Status: Active » Needs review
StatusFileSize
new6.26 KB

I've done a little testing on a test site and this patch seems to do the trick. Can you see if it works for you?

madflute’s picture

Sorry for taking so long. I have tried the patch a few times but I am keep getting:

warning: preg_match() expects parameter 2 to be string, array given in /mysite/drupal6_14/includes/bootstrap.inc on line 777.

And gradebook won't even show the selected setting nor let me save any setting. Since I don't know any other way but manually copy/replace strings from the patch file, I am sure I am making mistakes.

MGN’s picture

It sounds like you might have missed one or more lines of the patch (that or there is a problem with the patch, but I haven't seen this error on my sites).

Check out the Information on applying patches in the handbook, or let me know what type of operating system you are working on and I might be able to help with this. When you are working with Drupal, being able to patch and test patches can be very helpful.

madflute’s picture

Title: Default sort won't stick » Default sort won't stick - Patch worked!

Oh boy!

In the past, with other modules, patching with the instruction from the handbook never worked for me. I always ended up with errors, and I have been doing copy/paste lately. I even didn't try running patch command with your patch this time. My bad!

I just tried it under my OSX10.6.1 and it worked with no error! I couldn't believe it since I thought it has been my fault that patch never worked on me.

This made me reassure your module is one of the best I have used!! Thank you!

MGN’s picture

Status: Needs review » Fixed

Great! glad to hear its working. I've committed the fix to 6.x-2.x-dev.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.