There is another typo 一週間勉強しただけで or 一週間の勉強だけで, isn't it?
~しかない is an emphasized form of ~がある when it's attached to a noun.
e.g.
机の上に本がある。
There is a book/There are books on the desk.
机の上に本しかない。
There is only a book/There are only books on the desk.
As you can see, ない is the negative form of ある in ~しかない. Thus, 勉強しかなかった means "there was only studying/only studying existed".
On the other hand, 勉強しかしなかった is an emphasized form of 勉強をした. (Notice that it's not the negative form of the -suru verb 勉強する.) Needless to say, しない is the negative form of する here.
一週間勉強しかしなかった means "he did only studying/he did nothing else but studying for a week." since しか emphasizes the noun right before it. That's why しか must be put right after 一週間, as in 勉強期間が一週間しかなかった by Mikawa-san or 一週間しか勉強しなかった by mdchachi-san.