Taking the class before the hearing is a VERY good idea. Going in there without it after 2 years of time very well could get you a few nights in jail, and you'd still have to do the class. So just do the class NOW and beg forgiveness at the hearing. If you are claiming lack of funds prevented you, its probably best to show up WITHOUT an attorney, because the court will opine that if you can pay for an attorney, you can pay for the class. I doubt there will be more fine. Jail time is what you are worried about. Just in case, have a turn-in date in mind so you can control the situation as much as possible (weekend so no loss of work, etc). If the hearing is set OVER two years from the date of conviction there is reason for a lawyer. The court can only mess with you (have jurisdiction over you) for so long. If they took too long to haul your butt into court, they can't touch you. But discuss that with an attorney, don't make assumptions. There are all sorts of obstacles in the way. Take care.
Please don't take this chat as formal legal advice or that a attorney/client relationship has been formed at this point. It's best to speak with an attorney off a public forum such as this so you can be honest without spreading it to the world (I'm sure the cops troll Avvo all the time and can track you via IP address). Any attorney on Avvo will be happy to answer and further questions regarding your particular situation (everyone case is different and there may be a special fact about yours that changes everything). Just pick up the phone.
Get the class done now, before the hearing. Take proof to the hearing or get it filed with the court before the hearing or both. Whether or not you need a lawyer depends on the court and the judge; that's exactly what a lawyer who practices in that court can tell you and why you need one.
The answer depends on a number of things including which court this is in, who the judge is, who the prosecutor is, your criminal history, what type of disposition you entered and what the terms of that disposition were.
Taking the class before the hearing is certainly a start. If you were ordered to do the class within 30 days, or something like that, and you missed the timeframe, you could still be held in violation of the terms of the sentence. You could end up with up to 90 days in jail. Depending on the type of disposition, you could also lose the chance to have it dismissed.
I would assume you had a lawyer when you entered the plea. You need to check in with that person today.