了 position with 把 construction Good Morning. 
Today reading my chinese textbook i found the following sentence.

刚才上音乐课时把书包放在了教室的外面。

I have never seen the 了 after a preposition 在. ¿is it right or a mistake? I think the right position would be at the end of the sentence.
Both are correct. And I don't see much difference whether to put 了 after 在 or at the end of the sentence.

However, if I had to find a difference I'd say they stress on different parts of the sentence.

(1)  To stress the action

你刚刚干啥去了 = what were you doing just now

我刚刚把书包放在了教室的外面 = I was just putting my schoolbag outside the classroom

(2) To stress where the person put the bag

你的包呢 = where is your bag

我刚刚把书包放在教室的外面了 = I just put my bag outside the classroom

Still, the difference is hardly noticed.