Solution 1:

When is being used as an conditional, specifically as an adverb; it indicates at what point in time something happens. For example: You can do X when Y has happened.

Why is Y has happened in the past perfect? First, because the event has to have already happened for the speaker to do X. If it has not happened, the speaker cannot do X. Second, because the past perfect is precisely for this situation. It relates something that has happened to something else closer in time -- and in this case, it is moderated by the adverb (at what time this happens).

This link goes over this in more detail (and with a British approach): https://www.oxfordlearnersdictionaries.com/grammar/online-grammar/past-perfect-simple-with-time-expressions

Solution 2:

  • You can take your country break when you have passed your last examination

is used with various meanings and emphases.

  1. Purely to show temporal sequencing availability ('Here's one possibility for you to consider – you can[/could] take your country break when you have passed your last examination. Then you'll have no revision pressure on you.)

  2. Mainly to remind the beleagured examinee that there is a pleasant country break not too far ahead (so again, the temporal sense of 'when') ('And remember, exams don't last forever – you can take your country break when you have passed your last examination. Have you forgotten?)

  3. To state a conditionality ('You can take your country break when you have passed your last examination. Until then, not a chance.')

In each case, 'when you have passed' is equivalent to the clunky 'when you have achieved your qualification', ie you are in the 'qualified state' and the passing is an accomplished event, in the past.

.............

  • When/If you [at some future 'point in time'; think of finding out the result/s] pass all your exams, you can [will then be able/allowed to] [then] take your country break.

For this, present simple ('pass') suffices to mark thefuture possibility. 'If you have then passed all your exams ...' also works, but is far stodgier.