Gradebook error: Lesson record not found

Gradebook error: Lesson record not found

by Dawn Wright -
Number of replies: 2

On an 1.4.4+ with the CDC gradebook, I deleted an activity and now get this error message when I try to view the gradebook: Lesson record not found.  I have tried to reset the preferences and categories to no avail. Any suggesions would be appreciated.

Thanking you in advance.

dawn

In reply to Dawn Wright

Re: Gradebook error: Lesson record not found

by Jeff Graham -
hi Dawn,

I won't be doing any future coding on that version of the gradebook, but you can manually clean up that problem by deleting the corresponding record from the {$CFG->prefix}course_grades_item table (I'm not positive about that table name since they changed in 1.5)

The courseid should match the id for your course, the modid should match the id value in {$CFG->prefix}modules where the name='lesson' and the cminstance would be equal to the {$CFG->prefix}course_modules id field. In your case the cminstance will not have a corresponding record in {$CFG->prefix}course_modules since you have deleted that particular instance from your moodle install.

The other option would be to try upgrading to the latest gradebook code for 1.4 in contrib/gradebook_cdc. I think the problem you are experiencing was fixed in one of the later updates for 1.4, but I haven't touched that code in a while.

In reply to Jeff Graham

Re: Gradebook error: Lesson record not found

by Dawn Wright -

Hi Jeff

Thanks for the info.  we are going to upgrade to 1.5 soon but will use your method to clean up these errors.

dawn