I'm not a teacher.
The Past Perfect Continuous is formed by means of the Past Perfect of the auxiliary verb “to be” and Participle I of the notional verb.
We distinguish two uses of the Past Perfect Continuous: the Past Perfect Continuous Inclusive and the Past Perfect Continuous Exclusive.
1. The Past Perfect Continuous Inclusive denotes an action which began before a definite moment in the past, continued up to that moment and was still going on at that moment. Either the starting point of the action is indicated or the whole period of duration.
We could not go out because it had been raining since early morning.
We could not go out because it had been raining for two hours.
With certain non-terminative verbs both the Past Perfect Inclusive and the Past Perfect Continuous Inclusive are used:
He said he had worked for twenty years. (The fact is emphasized.)
He said he had been working for a long time without achieving final results. (The process is emphasized.)
1. The Past Perfect Continuous Exclusive denotes an action which was no longer going on at a definite moment in the past, but which had been in progress not long before.
I sobbed a little still, but that was because I had been crying, not because I was crying then.
The Past Perfect Continuous Inclusive and the Past Continuous.
The Past Continuous is used to denote an action going on at a definite moment in the past, no previous duration 0f the action is expressed. The Past Perfect Continuous Inclusive is used when the previous duration of the action is expressed.
And now it was raining, had been raining for days the miserable fall rains of Eastern France.
The magnificent motor-car was waiting at the kerb. It had been waiting for two hours.