grammatically both versions are correct but they mean slightly different things.
Je n'ai fait que mes devoirs. -- I did only my homework (and not somebody else's).Je n'ai que fait mes devoirs. -- I only did my homework (and didn't do something else).
The "que" is placed immediately preceding the part it refers to, just like in English. The change in meaning is sometimes easily perceptible sometimes more subtle.
-- Chris (not a native speaker).
Sign in to submit your answer
Don't have an account yet? Join today
Test your French to the CEFR standard