My daughter wrote a short story at school and wrote ''said the woman'' the teacher corrected this and wrote '' the woman said'' Is it not correct either way?
It's an example of subject-verb inversion. Specifically, it's quotative inversion.
It is not used much in normal speech, which is a reason to avoid it sometimes. It is often used in literary uses, by which I don't mean literary with its nuance of "high art" but merely that it is used in stories, poetry and non-fiction narrative.
It's most often used after the quoted speech (as your daughter did), but there are certainly examples of it appearing before the quoted pharse:
Quoth the raven, 'Nevermore'.
Indeed, some poetry would be quite lost without it, and "may i feel said he" by E. E. Cummings follows the rules of grammar fine in that regard, though it breaks all those of punctuation.
But we dont need to go to such adult (in more senses than one) examples to demonstrate its use. We've got "Who Killed Cock Robin":
Who killed Cock Robin?
I, said the Sparrow,
And it has another example in each verse. We've got "The Spider And The Fly":
"Will you walk into my parlor?" said the spider to the fly;
"'Tis the prettiest little parlor that ever you may spy.
The way into my parlor is up a winding stair,
And I have many curious things to show when you are there."
"Oh no, no," said the little fly; "to ask me is in vain,
For who goes up your winding stair can ne'er come down again."
We've got "The Little Red Hen":
"Not I," barked the lazy dog.
"Not I," purred the sleepy cat.
"Not I," quacked the noisy yellow duck.
"Then I will," said the little red hen.
In all, I would expect a child of reading age to be familiar with the form as one used in stories and poems. I wouldn't necessarily expect a young child to have equal facility in using the form, but I certainly wouldn't be alarmed if one displayed it (especially if they knew both form were permitted).
There are some who prefer to avoid it, and that seems a reasonable enough as a rough guideline for when used heavily it can result in some rhythms that work well with nursery rhymes but tire otherwise. It can though also move focus nicely from quotation to the person quoted (again, a reason to avoid it in other cases) along with avoiding some horrible messes. Consider the following from the New Yorker:
“Horton, you’re one of the few people New York seems to agree with,” Tennessee Williams, another regional Young Turk who dreamed of changing the shape of commercial theatre, said.
Because the New Yorker seems very firmly to refuse the much less cumbersome:
“Horton, you’re one of the few people New York seems to agree with,” said Tennessee Williams, another regional Young Turk who dreamed of changing the shape of commercial theatre.
Presumably because they've a style guide prohibiting it (John McIntyre provides that example in his blog).
In short, if your daugher is always using the inversion she may be well-advised to cut down on it, but otherwise it will at least provide a lesson in teachers' fallibility.
I would consider both of these constructions to be correct, though they do have very different "feelings" to them.
The "the woman said" version is more widely applicable and would probably be considered standard English. The "said the woman" version sounds somehow rather quaint.
The latter actually reminds me of a regular construct from German, in which a particular part of a sentence can be moved to the front for emphasis. In such cases, the subject-verb order is inverted :
Ich gehe um sieben. (I'm going at seven.)
Um sieben gehe Ich. (I'm going at seven [not at six or eight].)
Perhaps "said the X" is left over from this Germanic construct. If true, this might help explain a bit of why it sounds quaint, like a fairy tale.