Flipped teaching and flexible learning