You’ll get the visa no problems. Red flags will be raised to full mast at immigration. Expect to be taken aside and given an interview on arrival. Questions like why you live long time here as tourist, I believe you working here.
As you now state you were married overseas then you will need that marriage certificate certifying. Not sure if you have to do that overseas or if you can do it in Thailand.
denied entry as they think you are not studying as classes are in progress and you are trying to live here as a tourist longtime taking the p..s out of the system