1. I could not go to school for weeks.

2. I could not for weeks go to school.

==========================
#1 is right? What about #2? In a writing test, if a boy makes a sentence as in #2, is it correct?

1 is fine. 2 is incorrect. If you write "For weeks" at the beginning of the sentence, 2 would be fine, too.