i can understand some grammar points

hi,
i have some troubles when i do exercise. i hope you will help me. thank you very much.

1/ the Chancellor was to have opened the new wing yesterday, but it is still is not finished.
what does this grammar point, Be + to +V, mean?

2/ i’d rather you learnt English than Swedish.

i remeber that WOULD RATHER + INFINITIVE …THAN . what’s wrong here?

3/ no sooner had i walked in through the door than the phone rang.

i don’t know what gramma structer is here. i cannot also understand sentence 4 and 5.

4/ i’d sooner he bought a car than a motorbike.
5/ it’s now 9 o’clock and the train was due to arrive at 8:15.

my grammar is not good. when i write this message, if there are mistakes, could you correct me?

  1. He was to have [past participle] - The expectation is that the duty might already have been fulfilled at the (past) time referred to.
    compare with
    He was to [ base form] - The expectation is that the duty was still before him at the (past) time referred to.

  2. If I wrote that as
    “I’d rather you learn English than Swedish.” would you be happy that your rule applies? You changed to the past tense so the infinitive changes. We see it in common use:
    “I’d rather drive a car than ride a motor bike.”
    “I’d rather have driven a car than ridden a motor bike.”

3/4) No sooner had/ I’d sooner have.
sooner is comparative - In 3 it indicates ‘in or after a short time’. In 4 it indicates one’s preference in a particular matter.

  1. be due to + infinitive is a structure used for events/actions happening at specific times.
    Other examples:
    The film is due to start in 2 minutes.
    Half of our employees are due to retire in five years.

The train was due to arrive at 8.15 - this is when the train was expected. However it didn’t turn up - it is now 45 minutes later and the implication is that the train has just arrived/is just arriving/has still not arrived.