General help

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

 
Picture of Steve Morris
Verfication before reporting: error in deleting courses in Moodle 3.5+ (Build: 20180614)
 

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.



 
Average of ratings: Useful (1)
Picture of Howard Miller
Re: Verfication before reporting: error in deleting courses in Moodle 3.5+ (Build: 20180614)
Core developersDocumentation writersParticularly helpful MoodlersPlugin 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?

 
Average of ratings: -
Picture of Steve Morris
Re: Verfication before reporting: error in deleting courses in Moodle 3.5+ (Build: 20180614)
 

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)
Picture of Brian Pool
Re: Verfication before reporting: error in deleting courses in Moodle 3.5+ (Build: 20180614)
 

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.

 
Average of ratings: -