Well, the sense of the sentence is debatable since a good grade depends on more than just doing your homework. From the grammar point of view it is fine, though.
You will get a good grade in the course unless (=except if) you don't do your homework.
or, in other words
You will get a good grade in the course if you (always) do your homework.
I think you're confusing "unless" with "not - unless":
You will not get a good grade in the course unless you do your homework.
Interesting side remark: this sentence makes much more sense. It says, homework is required for good grades, whereas the original sentence says, homework is the only requirement for good grades.