Gradebook - Moodle 1.9 - Unable to Delete Duplicate Items under Edit Categories

Gradebook - Moodle 1.9 - Unable to Delete Duplicate Items under Edit Categories

by Ken Gibson -
Number of replies: 6
OK,
Related to the discussions here:
http://moodle.org/mod/forum/discuss.php?d=86616

http://moodle.org/mod/forum/discuss.php?d=89678

Background:
Moodle1.9 installation, migrated up from Moodle1.53. We have several courses that are now in their 7-10th generation. By this I mean that at the end of a semester, our courses are backed-up (minus the students) and then restored as new for the next semester. This worked fine (Moodle1.53) in terms of the grading areas in each course.

Problem:
After update to Moodle1.9, we have a number of courses that have "orphaned" grading items. These appear in gradebook under Edit>Categories.The title of each of these items is "Grade" (see below). There are close to 50 of these above where i took the sceenshot.

problemnm2.jpg

Most of these "Grade" items are old forums (that were once checked for grading, but are now not). Some are assignment duplicates, or assignments that are no longer graded. At any rate, how do I clear (delete) these items from showing up in my grading categories section (as they are all items that will never be assigned a grade)?

Thanks for the input.
Ken
In reply to Ken Gibson

Re: Gradebook - Moodle 1.9 - Unable to Delete Duplicate Items under Edit Categories

by Ken Gibson -
Also - for what it is worth. I cannot edit any of the items that are listed above as "Grade". I can open and view them (the forums or assignments), but if I try to edit/save any changes (even if I didn't make a change) I get the following error message:

Found more than one record in fetch() !

Simliar issue seems to be documented here:
http://tracker.moodle.org/browse/MDL-10636

Looks like the issue is from restoring pre 1.9 courses to 1.9. Any thoughts?

Ken
In reply to Ken Gibson

Re: Gradebook - Moodle 1.9 - Unable to Delete Duplicate Items under Edit Categories

by Matt Campbell -
I think we have a bug of some sort to work out, but I haven't been able to put my finger on it well enough to determine the cause. Your post helps, so if you agree, I'll file a bug and link it here.

We're seeing these 'ghosts' in lessons and SCORMs that teachers have deleted, but at one time were graded.

I can go into mdl_grade_items and search for the courseid, where itemname is null, and itemtype is not course or category, and will get a list of these items. I can backup my database, delete them, and teachers report that they are seeing the proper items in the adebook with no adverse effects.

I don't think it is wise to offer this as a fix - I think a better understanding of this issue and a bugfix is the way to go.

Without deleting them, could you duplicate my query and see if you see the same issue in your database?

Thanks,
Matt
In reply to Matt Campbell

Re: Gradebook - Moodle 1.9 - Unable to Delete Duplicate Items under Edit Categories

by Ken Gibson -

Hey Matt,

Thanks for the input.  I can confirm that the fix you posted works for me as well.  In addition, I am wondering if this tool will work a bit better:

http://moodle.org/mod/forum/discuss.php?d=78622

The issue seems to be (for us) related to:

- Upgrading to 1.8+ from 1.53
- Having forums that were (pre-moodle 1.8) assigned to be scored (ranked) and then changed back to none score.
- Various assignments in wich point totals had been changed

As always, thanks for the help.
Ken 

In reply to Matt Campbell

Re: Gradebook - Moodle 1.9 - Unable to Delete Duplicate Items under Edit Categories

by Ken Gibson -

Hey Matt,

Update. The fix that you outlined above has worked for about 1/2 of the issues we were having (I was able to edit several assignments/forums that I could not before - refresh and the gradebook shows thyem correctly now). 

But I still have a significant number of items that are listed as "Grade" in gradebook that cannot be modified in moodle (try to modify/save and get the "Found more than one record in fetch() !." error)

Do we need to run the same query (Null name) for items such as assignments/forums, etc and deleted thee as well?

Ken     

In reply to Ken Gibson

Re: Gradebook - Moodle 1.9 - Unable to Delete Duplicate Items under Edit Categories

by Ângelo Rigo -

Hi a have a similar issue and solve deleting from grade_categories and grade_itens some lines refering to the course i was having that problem.