By going to court, I will assume you mean the 341 meeting of creditors. As stated, you need to do it within 45 days of filing your case. Most people will do the course prior to the 341 meeting of creditors.
You must take the 2nd class within 45 days of filing your bankruptcy petition.
Be sure to designate "best answer." If you live in Oregon, you may call me for more detailed advice, 503-650-9662. Please be aware that each answer on this website is based upon the facts, or lack thereof, provided in the question. To be sure you get complete and comprehensive answers, based upon the totality of your situation, contact a local attorney who specializes in the area of law that involves your legal problem. Diane L. Gruber has been practicing law in Oregon for 26 years, specializing in family law, bankruptcy, estate planning and probate. Note: Diane L. Gruber does not represent you until a written fee agreement has been signed by you and Diane L. Gruber, and the fee listed in the agreement has been paid.
I believe the law is that you must take the post-filing 2 hour class within 45 days of filing your case. But, in our jurisdiction, they will accept it anytime before discharge.