Past Perfect
- Last week our teacher gave back the essays we had written the week before.
- The house was quiet when Andrew got home. Everyone had gone to bed several hours earlier.
- Annie didn't want to come to the movie with us because she had seen it the week before.
Present Perfect
- We have written the essays the week before.
- The house is quiet. Everyone has gone to bed several hours earlier.
- Annie has seen this movie the week before.
In these sentences, I am confused by phrases referring to a time in the past, which are highlighted in bold. I doubt that they can be used in Perfect tenses.