A Christian teacher in the UK has received an apology from the school where she works after disciplinary action was taken against her for her opposition to gay marriage.