Star-formation modes at different cosmic epochs