了 position with 把 construction
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.