Verfication before reporting: error in deleting courses in Moodle 3.5+ (Build: 20180614)

Verfication before reporting: error in deleting courses in Moodle 3.5+ (Build: 20180614)

by Steve Morris -
Number of replies: 3

Folks,

Before I file a bug report I'm looking for confirmation of an issue. I'm getting the following error when attempting to delete a course:

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 1767 of /lib/coursecatlib.php: call to delete_course()
  • line 254 of /course/management.php: call to coursecat->delete_full()

This appears to occur whenever a teacher has defined a custom grade letters as in the attached screenshot. At the moment the only means for me to proceed to delete the course is figure out the contextid of the letter definition (which is conveniently in the URL of the letters configuration) and delete the offending rows from the mdl_grade_letters table.

If someone else could confirm before I report that would be helpful.


Attachment letters.jpeg
Average of ratings: Useful (1)
In reply to Steve Morris

Re: Verfication before reporting: error in deleting courses in Moodle 3.5+ (Build: 20180614)

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Can you reproduce this problem? That is, in your bug report can you describe how to make this happen right from creating a new, empty course?

In reply to Howard Miller

Re: Verfication before reporting: error in deleting courses in Moodle 3.5+ (Build: 20180614)

by Steve Morris -

Howard,

I just reported the issue this morning. I can reproduce this in both existing and new courses on version 3.5. Turning off the edit grade letters to reapply the defaults also fails as it appears that it can't delete the entries from mdl_grade_letters table.

Average of ratings: Useful (1)
In reply to Steve Morris

Re: Verfication before reporting: error in deleting courses in Moodle 3.5+ (Build: 20180614)

by Brian Pool -

Having EXACTLY the same issue.  I can't delete old courses that had custom grades and I can't set the grades back to default either.

If you found a way to fix this please let me know!

Moodle 3.5 - Upgraded recently from 3.1

Brian

Deleting the course I get.

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

Setting back to default grades I get the same.

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

I am actually assuming if fails trying to delete the record for the custom grades and therefore can't delete the course.