Moodle 3.5 will not allow deletion of Custom Letters

Moodle 3.5 will not allow deletion of Custom Letters

by Brian Pool -
Number of replies: 4

If a course has the site defaults overridden, you cannot undo it.  I added custom grades into a course and it added with no errors.  Now, if I uncheck "Override site defaults" I get "Exception - Call to undefined method mysqli_native_moodle_database::delete_record()" and then I am logged out of the site when I try and go back into the course.

I cannot remove custom grades in any course (I am the site administrator) and get logged out after any attempt.

I believe this issue is also the root of why I cannot delete any course that has custom grades.  I have no issue with this on my 3.1 site (pre 3.5 upgrade) but after upgrading to 3.5 it became an issue.  

I think there is a bug that needs to be reported but I am unable to log in to report it and the password reset emails have not come through.

Exception - Call to undefined method mysqli_native_moodle_database::delete_record()


More information about this error


×Debug info: 

Error code: generalexceptionmessage

×Stack trace:

line 144 of /grade/edit/letter/index.php: Error thrown


When I try and delete a course I get the following.

Exception - Call to undefined method mysqli_native_moodle_database::delete_record()


More information about this error


×Debug info: 

Error code: generalexceptionmessage

×Stack trace:

line 1404 of /lib/gradelib.php: Error thrown

line 4924 of /lib/moodlelib.php: call to remove_grade_letters()

line 4840 of /lib/moodlelib.php: call to remove_course_contents()

line 67 of /course/delete.php: call to delete_course()

Average of ratings: -
In reply to Brian Pool

Re: Moodle 3.5 will not allow deletion of Custom Letters

by Katja Krüger -

I had exactly the same error the other way round:

I tried to delete a course, that stopped with: Call to undefined method mysqli_native_moodle_database::delete_record()

Then I found your post turned debugging on and the strack trace is the same.

I looked into the course and found in the gradebook administration, that the letters are overrriden. Turned on 'edit grade letters', turned of the checkbox 'Override site defaults', clicked on 'Save changes' and had the same errors as you.

But when I leave the checkbox checked, deleted all the entries at the left side, turned the checkbox off afterwards, I could save and the letters are on the default entries and then I could delete the course.

I will copy this to the tracker

Grüße Katja



Average of ratings: Useful (1)
In reply to Katja Krüger

Re: Moodle 3.5 will not allow deletion of Custom Letters

by Brian Pool -

Thank YOU!

I think Moodle needs fixed, but at least there is a workaround!


Brian

In reply to Katja Krüger

Ynt: Re: Moodle 3.5 will not allow deletion of Custom Letters

by Cengiz Han -

Just to let the developers know about the issue, I had the same error with Moodle 3.5.1+ (Build: 20180720) that I was not able to delete the course nor was I uncheck and save the default letters on the course. However, after reading Katja's workaround now I successfully delete the course. 


In reply to Cengiz Han

Re: Ynt: Re: Moodle 3.5 will not allow deletion of Custom Letters

by Laura Hunt -

I doesnt work to me though

I cannot delete the course although I did the same process as Katja describes  ....