There are two ways of seeing the morality of lying: The insincerity account and the false-telling approach. The insincerity account is that what is prohibited (at least prima facie) is saying something that one does not believe. The false-telling approach is that what is prohibited is saying something false (or maybe something not true, if one doesn't accept bivalence). The false-telling approach is naive: it is the approach of small children whose theory of mind is not sufficiently developed as well as the approach of uncharitable adults (it is sadly common to hear a politician be accused of lying just because the politician said something false).
For a while I've been suspecting that the naive false-telling approach is actually right, but my main reason was based on analogies with other moral issues. Thus, adultery is defined by a married person's sexual relations with someone other than one's spouse, rather than by sexual relations with someone one does not believe to be one's spouse.
However, my post on "sincere assertion" has given me a much better reason to accept the false-telling approach, namely that the insincerity approach is simply extensionally incorrect, for there are cases where it is not even prima facie wrong to say something one believes to be false.
The cases in that post could, I think, be handled by a messier insincerity account on which what is prohibited is saying S when one does not believe the conditional that were one to say S, one would be saying something true. However, this "conditional insincerity account" is implausible. What made the insincerity account plausible in the first place was seeing assertions as the sort of thing that should be an expression of belief. But the examples in the post make that untenable. The conditional insincerity view is thus not motivated as well as the standard insincerity view was. Moreover, it is far from clear that we typically have such conditional beliefs when we speak sincerity.
The main problem with the false-telling account is that we think that (a) in typical cases (ones that don't exhibit the sort of things involved in the cases in my post) it's wrong to say something one doesn't believe and (b) it's not wrong to say something false if one believes it or at least believes it with good reason.
I think (a) is very easy to handle. It is always wrong to do something that one believes to be wrong—it is a violation of the duty to obey conscience. When (except in the weird cases) one believes p to be false, and one has normal moral beliefs, one also believes that it's wrong to affirm p. In that case, whether p is in fact true or false, to affirm p is to disobey conscience, and hence wrong.
Problem (b) is harder to handle. The simplest approach is to say that, yes, it's always wrong to say something false, but one is not always culpable. This is what one should say about adultery—it's always wrong for a married person to engage in marital relations with someone one is not married to, but if the partner in adultery is believed with good reason to be one's spouse, one is not culpable.
However, there is something odd about the idea that my calculus students continually acted immorally when answering questions on my exams. We do not think mistakes on exams to be immoral. I think this is a bullet that one can bite, and then one should bring in the culpability stuff.
Alternately, one might argument that the illocutionary force of an exam answer is different from the illocutionary force of ordinary assertion, or that exam answers are within the scope of some truth-canceling operator like "I believe that according to the material of the course".