Can not find data record in DB table course

Re: Can not find data record in DB table course

by Ken Task -
Number of replies: 1
Picture of Particularly helpful Moodlers

Removing any user record(s) in db is sorta taking a chance on 'orphaned' whatever - ditto for a course by id.

I know this is gonna sound strange, but, error is kinda strange ...

In admin/cli/ there is a backup.php script that can be used to backup a single course and that backup can be saved outside the 'sea' of files in /moodledata/filedir/.   You know the course ID ... 1938

So let's see if there's anything tied to the course:

mkdir /path/to/moodleDATA/check

cd /path/to/moodlecode/admin/cli/

php backup.php --courseid=1938 --destination=/path/to/moodleDATA/check/

That might very well error out ... which, in this case is a good sign that the backup can't find stuff for that course.

**Might** need to inspect what Moodle was able to build for the backup ...  in /path/to/moodleDATA/temp/backup/.  There **might** be a moodle_backup.xml file or other .xml files and from them, **might** be able to see other things that are related and **might** need to be investigated.

If user had a teacher/manager/admin role there could be files associated to user ... and one really doesn't want to get and orphaned files situation/started with moodledata/fileir/ ... especially large backups.

As far as the user ... search mdl_users for that user ID ... which is actually the row ID.

Needless to say ... make a backup of the DB before ... just in case.

'spirit of sharing', Ken


In reply to Ken Task

Re: Can not find data record in DB table course

by Yvonne Hamilton -

Thanks,

I only have adminer access not server side so might err on the side of caution at this point. Thanks for the suggestions, will see if I can get IT to try your suggestions when they are able.

Regards,

Yvonne