Many U.S. states have specific requirements for alcohol awareness classes when a student needs a class for a legal requirement. For example, if you are looking for a Texas Alcohol Awareness Class (Drug and Alcohol Driving Awareness Program) and are trying to fulfill a requirement for a DUI, you'll need to make sure that the class is approved by the Texas Education Agency.
Other states don't have any specific requirements for an alcohol class. So it's really up to the student to make sure a class that they are considering is going to be acceptable. A good way to do this is to ask for the class curriculum or syllabus from the provider and then take it to your judge or clerk of the court to review and see if it is acceptable.
Often the court will stipulate that they prefer that you take a weekly a in-person class and not let you take an online class. This is fine if one is convenient, but if one is not, then you can often ask the judge if it's alright that you take a distance learning class. If you have a legitimate reason (maybe you work in the evenings or have a disability), then it's likely that they'll let you taken an online class.