can't find data record error in moodle
1. Create a file called fixup.php with these contents:
<?php
require_once('config.php');
require_once($CFG->dirroot . '/course/lib.php');
require_login();
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
move_courses(array(1,2,3,4,5,6,7,8,9,10), 1); // the numbers from 1 to 10 are courses ids then ',1' is the category where you will be moving all your courses.
echo 'Done!';
2. put it in your top level of your moodle application folder - where the config.php file is.
3. Go to your moodle instance plus /fixup.php in the url.
https://moodle.org/mod/forum/discuss.php?d=399516