Most people have enough of a sense of the concept of "fair play" that I'd like to think this would be a non-issue. Unfortunately, it's almost certainly going to come up, and we don't want to deter people from legitimately using this site.
Cribbing from StackOverflow - on which the Mathematics.StackExchange site builds:
There are two principles involved:
- It is okay to ask about homework. For one, it would be impossible to stop it all even if we wanted to. Stack Overflow exists to help programmers learn and provide a standard repository for programming problems, both simple and complex, and this includes helping students.
- Providing an answer that doesn't help a student learn is not in the student's own best interest. Therefore you might choose to treat homework questions differently than other questions.
I agree that it'll be nigh-impossible to determine in advance which are homework questions 100% of the time. On the other hand, there will be those questions are going to stick out like a sore thumb as obvious homework. I don't think we want to get in the habit of providing homework answers directly, as that directly violates principle 2.
I don't think it's wrong to inquire if a question is a homework or class-related question in the comments. If it is, the questioner ought to be willing to accept help in a form similar to what they might get from a reasonably accommodating professor or TA, and it should be our job to do that.
Ideally, if we could get people with homework questions to voluntarily tag their questions appropriately, then everyone would benefit. Maybe this ought to be in our FAQs or guidelines somewhere.