Installing and upgrading help

Can not find data record in DB table course

 
Picture of Yvonne Hamilton
Can not find data record in DB table course
 

Moodle 3.1.7 

Since updating our system a few months ago. I now have trouble deleting one particular user. I can edit the user. Enrol the user into courses but cannot delete them. Can someone help me query the DB to check if this is the only user in the database with this same problem? It makes me want to know if this is an isolated event or a wider issue.

I guess the error is enrolment plugins but I need help with running a query to find out where the problem is.

What query would I run to find where the problem is? Any help appriecated. 

Error

Debug info: SELECT id,category FROM {course} WHERE id = ?
[array (
0 => '1938',
)]
Error code: invalidrecord
Stack trace:
  • line 1526 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
  • line 1502 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
  • line 6984 of /lib/accesslib.php: call to moodle_database->get_record()
  • line 1459 of /lib/enrollib.php: call to context_course::instance()
  • line 2010 of /lib/enrollib.php: call to enrol_plugin->unenrol_user()
  • line 880 of /lib/enrollib.php: call to enrol_plugin->user_delete()
  • line 4005 of /lib/moodlelib.php: call to enrol_user_delete()
  • line 90 of /admin/user.php: call to delete_user()

Regards,

Yvonne


 
Average of ratings: -
Picture of Yvonne Hamilton
Re: Can not find data record in DB table course
 

Any ideas on this one people?

Regards,

Yvonne

 
Average of ratings: -
Picture of Ken Task
Re: Can not find data record in DB table course
Particularly helpful Moodlers

Haven't had the same problem so this an attempt to address yours ...

The error points to a course category?

The id of the the course or category is 1938 ... that's a lot of categories as id's are usually sequential and never attempt to reuse an ID number but, rather, continue to add.   OR it's a course.

What do you get for:

select * from `mdl_course` where category like '1938';

OR same table ...

select * from `mdl_course` where id like '1938';

Go to the course first if found and see about status of course (hidden, etc.) and enrolled users

Then check out site Categories to see if  that course shows and what it's order is.

Other than that .... ????

'spirit of sharing', Ken

 
Average of ratings: -