Could you please do X vs. Could you do X please
Solution 1:
Could you please open the window? vs Could you open the window please?
Let's take the spoken example first.
As a native English speaker (Bos-Wash corridor) with a bit of acting ability, I can make either sentence sound polite, impatient, irritated, peremptory or downright offensive. I know, because I have been trying it out several times while doing yard work. Fortunately, I was alone.
That being said, I found it easier to make "Could you open the window please" sound ingratiating and a bit easier to make "Could you please open the window" sound peremptory.
Others might disagree, having performed the same experiment.
My conclusion: Possibly there was something in the attitude or intonation of the student that struck you as, I am guessing, peremptory. If you are teaching ESL, this might arise from the culture of the students you are teaching. Only you can decide that.
Considering the e-mail next:
"Hi, John: Could you please file the report by Thursday" carries no "you jackass" implications for me. If the e-mail had no salutation, both sentences sound a tad peremptory -- that you are too busy and important to waste time typing "Hi, John".
You asked if it was only in your head. My answer: unless there is context you aren't telling us about in your Question, probably.
Solution 2:
Placement of 'please' in both the sentences is idiomatic English.
'Please' is used commonly at the end with a syntax as in the post in English to make a request more polite.
The same sintax with 'please' in the mid or front positions brings in a change in semantics meaning the request is serious or important and sometimes, sounds more like an order.Placed at the front/ mid position, it may seem that you are, in a sense, jogging the listeners/ readers elbow to be mindful— don't-forget-type!– a sense of desperation or urgent need. The defect that we find in the post is that it is strongly worded about the mid position of it. I agree with the spirit.
Now a days, 'please' can easily be misconstrued as an expression of frustration. We call it 'irrate please' or 'impolite please'. There is a growing tendency to avoid 'please' by making the sentence wordy. Above all syntax and semantic are eually important to make 'please' meaningful.