$DB->insert_record('tl_course', $stuff);
You supply the table name, Moodle adds the database prefix (i.e. mdl_ normally, m_ in your case)
$DB->insert_record('tl_course', $stuff);
You supply the table name, Moodle adds the database prefix (i.e. mdl_ normally, m_ in your case)