I- The past perfect simple:
Form:
Subject+ had+ pp
Example:
I had learned to speak English.
Use:
The past perfect is used to talk about two actions both completed in the past, and to show that one happened before another. In this sense, the past perfect usually contains two actions: the first action and the second action:
a. Use the auxiliary verb “had” with the first action.
b. Use the past participle of the verb with the first action.
c. Use the past tense of the verb with the second action.
Example:
a) I had studied English and French before I traveled to Canada.
Before I traveled to Canada, I had studied English and French.
Note: Before always introduces the first action, in which we, according to the rule, use the simple past.
b) I wrote the review after I had watched the movie.
After I had watched the movie, I wrote the review.
Note: After always presents the second action where the past perfect is used.
II- The past perfect continuous “progressive”:
Form:
Subject + had + been + verb +ing
Example:
I had been teaching at Moulay Rachid School for 10 years.
UUse:
The past perfect continuous is similar to the past perfect simple, but the first action here takes the “ing form” of the verb.
The ing form expresses a continuation of the action. In other words, the action continued for a particular period of time in the past.
Example:
I had been teaching for 10 years before I became a university professor.
The action of teaching started and continued for 10 years before he became a university professor.